Build Your First MicroEJ Firmware

An example on how-to build a minimal MicroEJ Multi-App Firmware.
EXAMPLE for MISC
Supported MicroEJ Version: 4.1
Supported MicroEJ Edition: SDK
Last updated:
5 September 2017
<!--
	Markdown
	Copyright 2017 IS2T. All rights reserved.
	Use of this source code is subject to license terms.
-->

# Overview

This repository provides an example of a minimal MicroEJ Multi-App Firmware that features:
* a default implementation of the Wadapps framework.
* an administration server for managing the applications lifecycle (INSTALL, START, STOP, UNINSTALL).
* the exposure of a set of default APIs for applications (`EDC` + a communication channel - `NET` or `ECOM-COMM`).
* the virtual device configuration including Applications Local Deployment and Wadapps Administration Console tools.

The minimal Multi-App Firmware is declined into two distinct projects, depending on the communication channel used by the administration server:
* `com.microej.example.firmware.minimal.comm`: communication over TCP/IP network (`NET` API).
* `com.microej.example.firmware.minimal.net`: communication over a serial link (`ECOM-COMM` API).

The minimal Multi-App Firmware is headless, meaning it does not expose nor use user interfaces (such as GUI, buttons, ...). It is an entry point for developers that want, in only few steps, build their first Multi-App Firmware and test deploying an application on it.

# Requirements

* MicroEJ SDK 4.1.1 or higher.
* A MicroEJ 4.1 Multi-App platform (binary) imported into the MicroEJ repository. Please consult (<http://developer.microej.com>) for a list available evaluation platforms.
* An activated Evaluation or Production license.
* For `NET` example, a board connected to the same sub-network than the PC.
* For `COMM` example, a board with a USB-TTL cable plugged to the PC and connected to RX/TX pins.

# Dependencies

All dependencies are retrieved from _MicroEJ Central Repository 4.1_ (<http://developer.microej.com/ivy/4.1/>) using Apache Ivy. Those dependencies include:
* A set of foundation libraries, required for any Multi-App Firmware (such as `EDC` and `KF` libraries).
* A foundation library specific to each project, depending on the administration server back-end (`NET` or `ECOM-COMM`).
* Wadapps add-on libraries (_Wadapps Application Framework_, _Storage_ back-ends, ...).
* A firmware bootstrap library, that simplifies firmware development.
* A set of APIs exposed to applications.
* A set of Resident Applications, that are linked together with the Kernel to produce the Multi-App Firmware.
* A set of Virtual Device tools, such as Local Deployment and Wadapps Administration Console.

# Usage

## Import Firmware Projects

Start MicroEJ SDK on an empty workspace and clone this Git repository (`File > Import > Git > Projects From Git`).

At the end of the process, two projects have been imported:
  * `com.microej.example.firmware.minimal.net`
  * `com.microej.example.firmware.minimal.comm`

In the rest of the document, the term `[backend]` has to be replaced with either `net` or `comm` depending on the chosen firmware project.

## Select and Configure the Firmware

In case of the `net` back-end, the project is already configured.

In case of the `comm` back-end, the COM port on which the administration server will be connected must be set. Please consult the documentation of the selected platform to get the list of available platform COM ports. Edit `com.microej.example.firmware.minimal.comm/build/common.properties` and update with the appropriate value:

    ej.ecom.com.0.port=[PLATFORM_COM_VALUE]

## Setup a Platform

Before building the firmware, a target platform must be configured in the MicroEJ workspace.

* Go to `Window > Preferences > MicroEJ > Platforms` and put the mouse pointer over the desired platform.
* A tooltip with some information should appear. Press `F2` to show more information.
* Select the the platform _Path_ and copy it to the clipboard.
* Go to `Window > Preferences > Ant > Runtime` and select the `Properties` tab.
* Click on `Add Property...` button and set a new property named `platform-loader.target.platform.dir` with the platform path pasted from the clipboard.

There are other ways to setup the input platform for building the firmware. Please consult the _Multi-App Firmware Developer's Guide_ for more informations.

## Build the Firmware

* Right-click on the chosen firmware project and select `Build With EasyAnt`. This may take several minutes.

After successful build, the firmware artifacts are available in firmware project build folder `target~/artifacts` and contains:
* the firmware executable file (`minimal.[backend].out`).
* the corresponding virtual device (`minimal.[backend].jpf`).
* the firmware package for the MicroEJ Store (`minimal.[backend].kpk`)

## Program the Firmware on the Device

The procedure to program a firmware is platform specific. Please refer to the platform documentation for the detailed firmware flashing procedure.

To flash the firmware, open `Run Configurations` menu, then create a `MicroEJ Tool` run configuration named `Flash Firmware`.
* In `Execution` tab:
	* In `Target Platform`, select the platform used to build the firmware,
	* In `Settings`, select `Program with [Flasher Tool]` (e.g `ST Link` or `Segger J-Link`),
	* Set `Output Folder` to firmware project folder.
* In `Configuration` tab:
	* Set the application binary file to `target~/artifacts/minimal-[backend].out` file.
* Click on `Run` and wait until the flashing procedure is terminated.

# Develop and Deploy an Application

Prior to develop an application, the virtual device has to be imported:

* Go to `File > Import > MicroEJ > Platforms, Virtual Devices and Architectures`
* Browse the file `\target~\artifacts\minimal.[backend].jpf` and put the mouse pointer over the desired platform.

Note that the application development can be done in a dedicated MicroEJ Studio instance (the virtual device can be freely distributed).

To create and deploy a basic application, please refer to the _Sandboxed Application Developer's Guide_ (sections _Background Service Application_ and _Wadapps Administration Console_).


# Additional Resources

## Developer Web Site

MicroEJ developer web site (<http://developer.microej.com>) is the entry point to find examples, tools and documentation.

Specifically, foundation libraries javadoc can be found at <http://developer.microej.com/javadoc/microej_4.1/foundation/>, and addon libraries (such as _Wadapps Application Framework_) javadoc can be found at <http://developer.microej.com/javadoc/microej_4.1/addons/>.

## License

Examples are subject to license agreement. See `LICENSE.txt` in firmware projects.

## Change Log

Please consult `CHANGELOG.md` in firmware projects for the firmware content versioning.

### 1.0.0 (June 1st, 2017)

Features:
* Initial public revision for MicroEJ 4.1.

JUnit Example (Sandboxed)

This project gathers simple sandboxed applications tested with JUnit.
EXAMPLE for MISC
Supported MicroEJ Version: 4.1
Supported MicroEJ Edition: Studio
Last updated:
29 August 2017
# Overview

This project gathers simple sandboxed applications tested with JUnit.

# Requirements

* MicroEJ Studio or SDK 4.1 or later

# Usage

Each subfolder contains a distinct application.

# Changes

* See the change log file [CHANGELOG.md](CHANGELOG.md) located at the root of this repository.

# License

* See the license file [LICENSE.txt](LICENSE.txt) located at the root of this repository.

Using IOT Libraries APIs (Sandboxed)

This project gathers simple Sandboxed application using net libraries.
EXAMPLE for IOT
Supported MicroEJ Version: 4.1
Supported MicroEJ Edition: Studio & SDK
Last updated:
29 August 2017
# Overview
This project gathers simple sandboxed applications using net libraries.

## Requirements
* MicroEJ Studio or SDK 4.1 or later

# Usage
Each subfolder contains a distinct IOT application.

# Changes
- See the change log file [CHANGELOG.md](CHANGELOG.md) located at the root of this repository.

# License
- See the license file [LICENSE.md](LICENSE.md) located at the root of this repository.

Resources in External MCU Memories

Example that shows how to store resources in external non-byte addressable memories.
EXAMPLE for MISC
Supported MicroEJ Version: 4.1
Supported MicroEJ Edition: SDK
Last updated:
29 August 2017
# Overview
The following project illustrates the MicroEJ external resource loader feature (used for resources stored on non-byte-addressable memories).

## ExternalImages
This example displays images supposed to be in the external resources.

### Requirements
- MicroEJ 4.1 or later.
- Java platform with (at least) EDC-1.2.3, MICROUI-2.0.6, BON-1.2.4 and containing the module `External Resources Loader`.

### Project structure
- `src/main/java`
     - Java sources
- `src/main/resources`
     - Images supposed to be in the external resources.
- `src/main/c`
    - C sources

## Running the application on simulator
Using MicroEJ, you may deploy and run your application on an embedded target (if the hardware and related BSP are available) or you may run your application on a Java simulator mimicking the behavior of your embedded target.

## Building for the simulator

* Select **Run > Run Configurations...** menu item
* Select **MicroEJ Application** group
* Create a new configuration:
    * In **Project** field, Click the **Browse** button and select **Example-ExternalResourceLoader**
	* In **Execution** tab
		* In **Target** frame
			* Click the **Browse** button next to the JPF Field and select your platform
		* In **Execution** frame
			* Notice that "Execute on SimJPF" radio button option is checked
	* Click on "Run"
	
## Running the application on target

### Building for the target

* Select **Run > Run Configurations...** menu item
* Select **MicroEJ Application** group
* Create a new configuration:
    * In **Project** field, Click the **Browse** button and select **Example-ExternalResourceLoader**
	* In **Execution** tab
		* In **Target** frame
			* Click the **Browse** button next to the JPF Field and select your platform
		* In **Execution** frame
			* Notice that "Execute on EmbJPF" radio button option is checked
	* Click on "Run"

### Opening the generated C project (BSP specific)
* From the **Project Explorer** view
	* Navigate to the [**-bsp/Project/MicroEJ/MDK-ARM](**-bsp/Project/MicroEJ/MDK-ARM) folder
	* Double-click on the [Project.uvproj](C**-bsp/Project/MicroEJ/MDK-ARM/Project.uvproj) file (this will open the BSP project in the MicroVision IDE)

### Linking (BSP specific)
* From the MicroVision IDE
	* Select **Project > Build Target** menu item (or press F7 keyboard shortcut)

### Flashing the board (BSP specific)
* Connect your board
* Select **Flash > Download** menu item (or press F8 keyboard shortcut).

## LLEXT implementations

### LLEXT_static_array.c
This file should be part of a MICROEJ -bsp project and is the low level driver for the external resource module.
This implementation simply stores the images in a static array (as PNG encoded).
You can also use decoded images (bitmap) generated by the image generator in MicroEJ.

## Changes
- First release: ExternalImages example and LLEXT_static_array.c.

## License
See the license file `LICENSE.md` located at the root of this repository.

Examples Eclasspath

This project gather all the examples of eclasspath.
EXAMPLE for MISC
Supported MicroEJ Version: 4.1
Supported MicroEJ Edition: SDK
Last updated:
29 August 2017
# Overview

This project gather all the examples of eclasspath. Eclasspath contains Java runtime libraries.

Note that to run them on board:

* If you are using MicroEJ SDK:
 * You need a supported board (see http://developer.microej.com/index.php?resource=JPF for a list of supported boards using MicroEJ SDK evaluation version)
 * And the associated platform binary .jpf file (retrieve it from the previous link and import it into MicroEJ SDK)

* If you are using MicroEJ Studio:
 * You need to convert them from standalone applications to sandboxed applications.
 * Follow the [How-To convert a standalone app into a sandboxed app](https://github.com/MicroEJ/How-To/tree/master/StandaloneToSandboxed) guide.
 
# Details
## logging
**Available Examples**:
* [com.microej.examples.eclasspath.logging](com.microej.examples.eclasspath.logging) : Writes in the logger.

Using SNI and SP Libraries API (Standalone)

This repository contains examples showing how to enable communication between programs written in C and programs written in Java using MicroEJ APIs.
EXAMPLE for MISC
Supported MicroEJ Version: 4.1
Supported MicroEJ Edition: SDK
Last updated:
29 August 2017
[](Markdown)
[](Copyright 2016 IS2T. All rights reserved.)
[](IS2T PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.)
# Overview

Although MicroEJ lets you leverage Java in an embedded context, there are still some cases where your Java threads need to synchronize and exchange data with OS tasks written in C/C++.

This repository contains examples showing how to enable communication between programs written in C and programs written in Java using MicroEJ APIs.

## Available examples

For calling C functions from a Java class, MicroEJ provides the SNI API. The following examples illustrate how to use this API :
* [CallingCFromJava](/CallingCFromJava) provides an example of invocation of a C function from a Java method
* [CallingCFromJava](/CallingCFromJavaMock) is a helper project required in order to be able to run the Java application on simulator

The SNI library also provides APIs for tasks/threads synchronisation via function calls and callbacks.

For data exchange issues between tasks/threads, MicroEJ provides a few options:
* Shielded Plug API (suitable for sharing structured data, with built-in wait/release synchronisation APIs)
* Immortals API and SNI API (suitable for sharing access to raw data, but you need to provide your own synchronisation mechanism)

The following examples, based on the consumer/producer problem, illustrate how to use those APIs :

* [Producer Consumer with ShieldedPlug](/ProducerConsumerUsingShieldedPlug) using Shielded Plug API as the delivery mechanism
* [Producer Consumer with SNI and Immortals](/ProducerConsumerUsingQueues) using SNI and Immortals APIs to wrap the native FreeRTOS message queue API as the underlying delivery mechanism

Each example comes with a launch configuration. These launch configurations require that the target platform (common to each configuration) is built.

# Building the Java Platform (JPF)

We need to generate and build a Java Platform (JPF), i.e. the set of object files and libraries required to execute Java code on the target platform linked by an executable C program.

The following assumes that you have downloaded and imported the STM32F646-DISCO platform from [MicroEJ SDK Getting Started](http://developer.microej.com/getting-startetd-sdk.html) web page.

### Creation

* Select **File > New > Other... > MicroEJ > Platform** menu item
	* Click **Browse** button next to the **Architecture** field and select **STMicroElectronics STM32F7J ARMCC**
	* Check the **Create from a platform reference implementation** option
		* Select **STM32F746-Disco > Standalone**
	* Click **Next**
		* Set the name field to "**SNI**"
		* Set the version field to "**1.0.0**"
	* Click **Finish**. This will lead to the generation of a few projects in our workspace :
		* [STM32F746GDISCO-SNI-CM7hardfp_ARMCC5-bsp](STM32F746GDISCO-SNI-CM7hardfp_ARMCC5-bsp)
		* [STM32F746GDISCO-SNI-CM7hardfp_ARMCC5-configuration](STM32F746GDISCO-SNI-CM7hardfp_ARMCC5-configuration)
		* [STM32F746GDISCO-SNI-CM7hardfp_ARMCC5-fp](STM32F746GDISCO-SNI-CM7hardfp_ARMCC5-fp)

### Build
* From the **Overview** tab of the generated [full.platform](/STM32F746GDISCO-SNI-CM7hardfp_ARMCC5-configuration/full.platform) file
	* Click on the **Build platform** hyperlink. This will generate the following project :
		* [STM32F746GDISCO-SNI-CM7hardfp_ARMCC5-1.0.0](STM32F746GDISCO-SNI-CM7hardfp_ARMCC5-1.0.0)


## API Selection Criteria

Here are a few things to consider when choosing between Shielded Plug and an SNI and Immortals based solution

* Performance
	* Generally speaking, Shielded Plug (SP for short) will copy data from/to a database block and will therefore take more processing time and memory than an SNI-based solution relying on a shared memory area with less data copying.
	* SP is more suitable for asynchronous (post) processing of published data

* Data Integrity
	* Given that with SP there is no buffering of data, it makes it more suitable for sampling scenarios where losing a value once in a while is not critical .

* API convenience
	* SP requires that you describe your data in an xml based configuration file.
	* However, the SP synchronization API is quite simple
	* Using SNI and Immortals, it is easier to pass data directly to/from C native functions

In summary, for simple use cases, Shielded Plug shall suffice, but for more intensive and more constrained environments, SNI and Immortals may be a better fit.

## Additional references

### B-ON Library Specification

Among other things, the **Beyond Profile Specification** document contains detailed information on:

* sharing memory areas between Java and C/C++ using **immortal objects**

**immortal objects** : such objects are never garbage collected and keep the same physical memory location forever. This makes them useful for specifying shared memory areas between C and Java.

The document can be downloaded from [www.e-s-r.net/specifications/index.html](www.e-s-r.net/specifications/index.html)

### SNI Library Specification

The **Simple Native Interface for GreenThread Context Profile Specification** document contains detailed information on :

* how to map Java primitive types to portable C types for methods/functions parameters and return types
* naming conventions for C functions implementing Java SNI native implementations
	* these have to be followed to generate valid linker configuration files
* sharing memory areas between Java and C/C++ using **immortal objects**
* controlling (as in suspend and resume) Java Thread execution from C code

The document can be downloaded from [www.e-s-r.net/specifications/index.html](www.e-s-r.net/specifications/index.html)
	
### Shielded Plug Library Specification

The **Shielded Plug Profile Specification** document contains detailed information on :

* the concepts underlying the Shielded Plug API
* how to map Java primitive types to portable C types for methods/functions parameters and return types
* how to create dedicated readers/writers that can translate Shielded Plug Blocks into Java Objects
* the reference API for both C and Java languages

The document can be downloaded from [www.e-s-r.net/specifications/index.html](www.e-s-r.net/specifications/index.html)
	
### Simulation

The **Simulation** section of the **Device Developer's Guide** document contains useful info for :

* creating Java mocks simulating native code using the same naming conventions as SNI
* using the Hardware In the Loop (HIL) engine as a replacement for the SNI/GreenThread interface used on target environments

To access the document from MicroEJ:

* Select **Help > MicroEJ Resource Center** menu item
	* Select **Manual > Device Developer's Guide**
	
# Requirements

* MicroEJ SDK 4.0.0 or later
* Keil MicroVision v5.0 or later

Arabic Font (Standalone)

Example that shows how to use arabic fonts.
EXAMPLE for UI
Supported MicroEJ Version: 4.1
Supported MicroEJ Edition: SDK
Last updated:
29 August 2017
# Overview
This example shows how to use the arabic fonts.

# Usage

1. First of all, you must have a font containing the characters of the unicode block called `Arabic Presentation Forms-B` i.e. the range `0xFE70-0xFEFF`.

2. Then your strings must be formed with the characters of this range too (as you can see with the strings of HowToUseArabicFontDisplayable.TITLE and HowToUseArabicFontDisplayable.AVAILABLE_TEXTS, /u0020 corresponds to the space character).
3. Finally the order of the strings must be reversed.

## Run on MicroEJ Simulator
1. Right Click on the project
1. Select **Run as -> MicroEJ Application**
1. Select your platform 
1. Press **Ok**

## Run on device
### Build
1. Right Click on [HowToUseArabicFont.java](HowToUseArabicFont/src/main/java/com/microej/example/arabicfont/HowToUseArabicFont.java)
1. Select **Run as -> Run Configuration**
1. Select **MicroEJ Application** configuration kind
1. Click on **New launch configuration** icon
1. Select **Execute on Device**
1. Select **Build & Deploy**
1. Go to **Execution** tab
	* Select your platform 
1. Press **Apply**
1. Press **Run**
1. Copy the generated `.out` file path

### Flash
1. Use the appropriate flashing tool.

# Requirements
* MicroEJ Studio or SDK 4.0 or later
* A platform with at least:
	* EDC-1.2 or higher
	* MICROUI-2.0 or higher
	
## Dependencies
_All dependencies are retrieved transitively by Ivy resolver_.

# Source
N/A

# Restrictions
None.

Components Hello World (Standalone)

This project illustrates the ej.components library.
EXAMPLE for MISC
Supported MicroEJ Version: 4.1
Supported MicroEJ Edition: SDK
Last updated:
29 August 2017
# Overview
This project illustrates the _ej.library.runtime.components_ library.
It contains a service implementation and two bundles: the service publisher and the service user.

## Project structure
- [com.microej.example.components.helloworld.service](com.microej.example.components.helloworld.service) 
	- [[â¦]/Hello.java](com.microej.example.components.helloworld.service/src/main/java/com/microej/example/components/helloworld/service/Hello.java): the interface defining the service.

- [com.microej.example.components.helloworld.publisher](com.microej.example.components.helloworld.publisher)
	- [[â¦]/HelloPrint.java](com.microej.example.components.helloworld.publisher/src/main/java/com/microej/example/components/helloworld/publisher/HelloPrint.java) : an implementation of the service.
	- [[â¦]/HelloPublisherBundle.java](com.microej.example.components.helloworld.publisher/src/main/java/com/microej/example/components/helloworld/publisher/HelloPublisherBundle.java) : the bundle publishing the service implementation.
	
- [com.microej.example.components.helloworld.user](com.microej.example.components.helloworld.user)
	- [[â¦]/SayHelloToEveryone.java](com.microej.example.components.helloworld.user/src/main/java/com/microej/example/components/helloworld/user/SayHelloToEveryone.java) : an application that uses the service.
	- [[â¦]/HelloUserBundle.java](com.microej.example.components.helloworld.user/src/main/java/com/microej/example/components/helloworld/user/HelloUserBundle.java) : the bundle retrieving the service.
	
- [com.microej.example.components.helloworld](com.microej.example.components.helloworld) : the startup (main) of the example.
	- [src/main/java](com.microej.example.components.helloworld/src/main/java) : Java sources.
	- [src/main/resources](com.microej.example.components.helloworld/src/main/resources) : the properties and bundles list.

  
## Usage
See [README.md](com.microej.example.components.helloworld/README.md).

# Requirements
See [README.md](com.microej.example.components.helloworld/README.md).

# Source
See [README.md](com.microej.example.components.helloworld/README.md).

# Restrictions
See [README.md](com.microej.example.components.helloworld/README.md).

# Changes
See [CHANGELOG.md](CHANGELOG.md).

## License
See [LICENSE.md](LICENSE.md).

Examples Custom Events for MicroUI

This project illustrate how to propagate custom events from the hardware to MicroUI.
EXAMPLE for MISC
Supported MicroEJ Version: 4.1
Supported MicroEJ Edition: SDK
Last updated:
29 August 2017
# Overview
This example illustrates how to propagate custom events from the hardware to MicroUI. MicroUI already supports generic events like touch, button and joystick.
Hardware events (e.g. sensors movement) can be used for specific display action upon occurrence.

See the Device Developer's Guide at section **Inputs** (13.5) for more information.

# Usage
1. Create a platform with at least the UI module.
2. Before building this platform, some configuration is required. In the **xxx-configuration project** in the **microui/microui.xml** file, add the following xml element as the first eventgenerator.

        <eventgenerator name="CUSTOM" class="com.microej.example.customevent.CustomEventGenerator"/>

3. Build your platform.
4. In the [/com.microej.example.customevent/src/main/c](com.microej.example.customevent/src/main/c) folder
	1. Choose the file corresponding to the board/RTOS used 
	2. Replace the application entry point in the /xxx-bsp project by the file selected in the previous step
5. In MicroEJ, create a launch configuration for the Java application
	1. Set the name to "CustomEvent_Build"
	2. In the **Main** tab
		1. Set the **Project** field to "com.microej.example.customevent"
		2. Set the **Main type** field  to "CustomEventExample"
	3. In the **Execution** tab
		1. In the **Target** frame, set the JPF to the one built in step #3
		2. In the **Execution** frame, select the **Execute on EmbJPF** radio button
6. Run the launch configuration.
7. Compile, link and flash the xxx-bsp project.

# Requirements
- JRE 7 (or later) x86.
- MicroEJ 4.0 or later.
- Java platform with (at least) EDC-1.2, MICROUI-2.0.

# Project structure
- src/main/java
	- Java sources
- src/main/c
	- Entry points (main.c) examples for the given board/RTOS that generates custom events.

# Dependencies
_All dependencies are retrieved transitively by Ivy resolver_.

# Source
N/A

# Restrictions
None.

Using Foundation Libraries APIs (Standalone)

This project gathers all the basic examples of the foundation libraries.
EXAMPLE for MISC
Supported MicroEJ Version: 4.1
Supported MicroEJ Edition: SDK
Last updated:
22 August 2017
# Overview
This project gathers some basic examples of the foundation libraries. Those examples are developed as standalone applications and as such can be run by following the associated instructions (see **README.md** file of each example).

Note that to run them on board:

* If you are using MicroEJ SDK:
 * You need a supported board (see http://developer.microej.com/index.php?resource=JPF for a list of supported boards using MicroEJ SDK evaluation version)
 * And the associated platform binary .jpf file (retrieve it from the previous link and import it into MicroEJ SDK)

* If you are using MicroEJ Studio:
 * You need to convert them from standalone applications to sandboxed applications.
 * Follow the [How-To convert a standalone app into a sandboxed app](https://github.com/MicroEJ/How-To/tree/master/StandaloneToSandboxed) guide.

# Details
## Core
### EDC
EDC contains the minimal standard runtime environment for embedded devices.

**Available Examples**:
* [com.microej.example.foundation.edc.helloworld](com.microej.example.foundation.edc.helloworld): Prints Hello World on the standard output stream.

### BON
BON focuses on devices with non-volatile and volatile memories. This library allows to fully control memory usage and start-up sequences on devices with limited memory resources.

**Available Examples**:

* [com.microej.example.foundation.bon.immortals](com.microej.example.foundation.bon.immortals): Shows how to manipulate the immortals.
* [com.microej.example.foundation.bon.immutables](com.microej.example.foundation.bon.immutables): Shows how to manipulate the immutables.


## Communicate with other hardwares

### ECOM
ECOM libraries provides a standard communication over UART.

**Available Examples**:
* [com.microej.example.foundation.ecom.hotplug](com.microej.example.foundation.ecom.hotplug): Shows how to listen on plug/unplug of dynamic ComConnections and shows their properties.
* [com.microej.example.foundation.ecom.writer](com.microej.example.foundation.ecom.writer): Shows how to write some bytes to a CommConnection.
* [com.microej.example.foundation.ecom.reader](com.microej.example.foundation.ecom.reader): Shows how to read some bytes from a CommConnection.

### HAL
HAL libraries presents an abstraction of the communication with the hardware.

**Available Examples**:
* [com.microej.example.foundation.hal.gpio](com.microej.example.foundation.hal.gpio): Shows how to use gpio.


## Design a user interface

### MicroUI
MicroUI provides the minimal cornerstone for quick construction of advanced, portable and user-friendly applications for a wide and heterogeneous range of devices with just-what-is-needed resources.

**Available Examples**:
* [com.microej.example.foundation.microui.antialiased](com.microej.example.foundation.microui.antialiased): Shows how to use anti-aliased shapes.
* [com.microej.example.foundation.microui.font](com.microej.example.foundation.microui.font): Shows how to create and use a font.
* [com.microej.example.foundation.microui.helloworld](com.microej.example.foundation.microui.helloworld): Shows how to print a string on a display.
* [com.microej.example.foundation.microui.image](com.microej.example.foundation.microui.image): Shows how to create and use images.
* [com.microej.example.foundation.microui.input](com.microej.example.foundation.microui.input): Shows how to listen the MicroUI input events.
* [com.microej.example.foundation.microui.led](com.microej.example.foundation.microui.led): Shows how to use the LEDs.
* [com.microej.example.foundation.microui.movableimage](com.microej.example.foundation.microui.movableimage): Shows how to create and use a movable image.
* [com.microej.example.foundation.microui.mvc](com.microej.example.foundation.microui.mvc): Shows how to create and use a MVC design pattern.
* [com.microej.example.foundation.microui.out](com.microej.example.foundation.microui.out): Shows how to redirect the standard SystemOut to the display.
* [com.microej.example.foundation.microui.transform](com.microej.example.foundation.microui.transform): Shows how to use MicroUI transform.

### MWT
MWT is a widget toolkit designed for a wide range of devices, including embedded devices with limited processing power.

**Available Examples**:
* [com.microej.example.foundation.mwt.helloworld](com.microej.example.foundation.mwt.helloworld): Shows a simple hello world using MWT.
* [com.microej.example.foundation.mwt.mvc](com.microej.example.foundation.mwt.mvc): Shows how to create and use a MVC design pattern.

### NLS
NLS provides tools to use localized strings.

**Available Examples**:
* [com.microej.example.foundation.nls.helloworld](com.microej.example.foundation.nls.helloworld): Shows how to print a localized string on a display.


## Communicate with the world

### NET
NET is a lightweight Java library dedicated to networking applications. It supports stream (TCP/IP) and datagram (UDP) socket connection APIs.

**Available Examples**:
* [com.microej.example.foundation.net.echo](com.microej.example.foundation.net.echo): Shows a simple echo server.
* [com.microej.example.foundation.net.helloworld](com.microej.example.foundation.net.helloworld): Shows a simple helloworld using NET.

## Store data

### FS
FS is a library to access multiple storage devices (in and out data streams) through a simple file system API.

**Available Examples**:
* [com.microej.example.foundation.fs.helloworld](com.microej.example.foundation.fs.helloworld): Creates a list of folders, adds some files and deletes them all.