MicroEJ supports several STMelectronics Development Boards

Get Started: Application Development on STMicroelectronics STM32F746G-DISCO

Develop Java/C applications on STMicroelectronics STM32F746G-DISCO development board with MicroEJ Software Development Kit.

Follow the steps* below to get your first app running on both a virtual device, and a real device (final hardware). In case you are not familiar with MicroEJ, please visit Discover MicroEJ to understand the principles of our technology.

*For your information, this edition is obsolete with the latest SDK, which is not recommended for new designs. Contact us for the newest SDK.

1 – Download MICROEJ SDK

MICROEJ SDK is an IDE built on Eclipse for creating feature-rich applications for MicroEJ Virtual Execution Environment (VEE).


Supported Operating System

MICROEJ SDK runs on all popular desktops operating systems: Windows (7, 8, 8.1, 10), Linux, macOS.

A Java™ Runtime Environment 8 is needed on your host computer for running MICROEJ SDK. Download Java™ Runtime Environments


Download MICROEJ SDK

Click the below button to download the installer package corresponding to your host computer OS (about MICROEJ SDK download).

 

Download MicroEJ SDK Dist. 21.11

2 – Install MICROEJ SDK

  • Unzip the downloaded installer package, if needed.
  • Run the unzipped executable file.
  • On Windows, accept the administrator privileges elevation.
  • Follow the installer steps.
  • Proceed to the next step.

3 – Download And Use Your Virtual Device

  • Start MICROEJ SDK.
  • Select the workspace where to put your applications. If you are not familiar with Eclipse workspaces, select the default one and press Launch.
  • Select the repository where to put your Virtual Device. If you are not familiar with MicroEJ repositories, select the default one and press OK.
  • Select the Window > Preferences > MicroEJ > Virtual Device menu.
  • Download the Virtual Device (See release notes)
  • Press the Import... button and select the Virtual Device file previously downloaded (all virtual devices have the .vde extension).
  • Accept the license terms and press Finish. The MicroEJ Virtual Device is successfully installed.
  • Download your first application examples
  • Inside MICROEJ SDK.
  • Select File > Import... > General > Existing Projects into Workspace > Select archive file and select the downloaded archive.
  • Import everything to your workspace.
  • Your first applications are loaded, ready to execute:
    • com.microej.demo.hello.
    • com.microej.example.iot.ssl.rest.headless.

4 – Run the Examples on the Virtual Device

Running the UI Example

  • Right-click the MicroEJ project com.microej.demo.hello.
  • Then Run As > MicroEJ Application.
  • Select the VDE-BLUE-STM32F746GDISCO-CXLQH.
  • It should launch the simulation displaying the Front Panel (simulated device on PC).
  • The demo is displaying a simple UI on the Front Panel.

UI Example on STMelectronics STM32F746G DISCO Development Board


Running the REST Client Example

  • Right-click the MicroEJ project com.microej.example.iot.ssl.rest.headless.
  • Then Run As > MicroEJ Application.
  • Select the VDE-BLUE-STM32F746GDISCO-CXLQH.
  • It should launch the simulation displaying the Front Panel (simulated device on PC).
  • In the Eclipse Console you should have a similar trace printed:
 =============== [ Initialization Stage ] ===============
=============== [ Converting fonts ] ===============
=============== [ Converting images ] ===============
=============== [ Launching on Simulator ] ===============
https example INFO: {"headers":{"user-agent":"Resty/0.1 (Java)","accept":"application/json","host":"postman-echo.com","x-forwarded-proto":"https","x-forwarded-port":"443"},"args":{},"url":"https://postman-echo.com/get"}
https example INFO: user-agent: Resty/0.1 (Java) host: postman-echo.com
https example INFO: =========== POST REQUEST ===========
https example INFO: {"form":{},"headers":{"user-agent":"Resty/0.1 (Java)","content-length":"20","accept":"application/json","host":"postman-echo.com","x-forwarded-proto":"https","content-type":"text/plain; charset=UTF-8","x-forwarded-port":"443"},"files":{},"json":null,"data":"My POST request data","args":{},"url":"https://postman-echo.com/post"}
https example INFO: Data sent for POST request: My POST request data
https example INFO: =========== PUT REQUEST ===========
AbstractPage.renderContent()
AbstractPage.renderContent()
https example INFO: {"form":{},"headers":{"user-agent":"Resty/0.1 (Java)","content-length":"19",
"accept":"application/json","host":"postman-echo.com","x-forwarded-proto":"https","content-type":"text/plain; charset=UTF-8","x-forwarded-port":"443"},"files":{},"json":null,"data":"My PUT request data","args":{},"url":"https://postman-echo.com/put"}
https example INFO: Data sent for PUT request: My PUT request data
https example INFO: =========== DELETE REQUEST ===========
https example INFO: {"form":{},"headers":{"user-agent":"Resty/0.1 (Java)","accept":"application/json","host":"postman-echo.com","x-forwarded-proto":"https","x-forwarded-port":"443"},"files":{},"json":null,"data":{},"args":{},"url":"https://postman-echo.com/delete"}
  • It confirms HTTPS communication between the Virtual Device and the postman-echo.com server.

5 – Run the Examples on Your Board

Prerequisites

Hardware

Software

Hardware Configuration

  • All tests of this getting started have been done on the STMicroelectronics STM32F746G-DISCO.
  • Plug the microSD card in the STM32F746G-DISCO.
  • The jumper configuration for the power (below the black reset button) must be on 5V link.
  • Connect the board through the Ethernet port to a network providing a DHCP server and DNS via DHCP.
  • The 32F746GDISCOVERY board has three USB connectors, with the screen facing upward and from left to right:
    • CN14 – USB ST-LINK (Mini-B connector)
    • CN13 – USB_FS (Micro-B connector)
    • CN12 – USB_HS (Micro-B connector)

    For power supply, you can select the ST-LINK connector by setting jumper JP1 on the back of the board, next to the reset button. You must select “CN14 USB ST-LINK” (factory settings) when you use the STM32 ST-LINK utility, you need a cable with a “Mini-B” connector.

  • Connect the board to the PC using a mini USB to USB cable on connector CN14.
  • Standard output traces can be read through a UART link (through USB) Configuration of the UART is: 115200 bps, 8N1, no handshake

Flashing the MicroEJ BLUE Firmware

Setup ST-LINK Utility

  • Start ST-LINK Utility.
  • Select External Loader > Add External Loader.
  • Check N25Q128A_STM32F746G-DISCO loader and press Validate.

Program the Flash

  • Select Target > Program.
  • Download the MicroEJ firmware (See release notes)
  • Unarchive the file.
  • Browse for the content of the unarchived file.
  • Press Start and wait until programming complete (this may take a while).
  • Exit from ST-Link Utility.

Running the UI Example

  • Right-click the MicroEJ project com.microej.demo.hello.
  • Then Run As > MicroEJ Application.
  • Select the VDE-BLUE-STM32F746GDISCO-CXLQH.
  • It will instanciate a Run Configuration, you can stop the Virtual Device.
  • Edit the new Run Configuration.
  • Then configure the Execution mode to Execute on Device, Core Engine Default and Settings Local Deployment (Socket)
  • In the Configuration tab in Local Deployment (Socket) insert the IP of the STM32F746G-DISCO in the Host parameter. You should have the IP displayed on the screen of the STM32F746G-DISCO (leave the other parameters unchanged).
  • Click on Run button.
  • The demo is displaying a simple UI on display of the STM32F746G-DISCO.

Running the REST Client Example

  • Right-click the MicroEJ project com.microej.example.iot.ssl.rest.headless.
  • Then Run As > MicroEJ Application.
  • Select the VDE-BLUE-STM32F746GDISCO-CXLQH.
  • It will instanciate a Run Configuration, you can stop the Virtual Device.
  • Edit the new Run Configuration.
  • Then configure the Execution mode to Execute on Device, Core Engine Default and Settings Local Deployment (Socket)
  • In the Configuration tab in Local Deployment (Socket) insert the IP of the STM32F746G-DISCO in the Host parameter. You should have the IP displayed on the screen of the STM32F746G-DISCO (leave the other parameters unchanged).
  • Click on Run button.
  • In the board’s UART link you should have a similar trace printed:
=============== [ Initialization Stage ] ===============
=============== [ Converting fonts ] ===============
=============== [ Converting images ] ===============
=============== [ Launching on Simulator ] ===============
https example INFO: {"headers":{"user-agent":"Resty/0.1 (Java)","accept":"application/json","host":"postman-echo.com","x-forwarded-proto":"https","x-forwarded-port":"443"},"args":{},"url":"https://postman-echo.com/get"}
https example INFO: user-agent: Resty/0.1
https example INFO: =========== POST REQUEST ===========
https example INFO: {"form":{},"headers":{"user-agent":"Resty/0.1 (Java)","content-length":"20","accept":"application/json","host":"postman-echo.com","x-forwarded-proto":"https","content-type":"text/plain; charset=UTF-8","x-forwarded-port":"443"},"files":{},"json":null,"data":"My POST request data","args":{},"url":"https://postman-echo.com/post"}
https example INFO: Data sent for POST request: My POST request data
https example INFO: =========== PUT REQUEST ===========
AbstractPage.renderContent()
AbstractPage.renderContent()
https example INFO: {"form":{},"headers":{"user-agent":"Resty/0.1 (Java)","content-length":"19","accept":"application/json","host":"postman-echo.com","x-forwarded-proto":"https","content-type":"text/plain; charset=UTF-8","x-forwarded-port":"443"},"files":{},"json":null,"data":"My PUT request data","args":{},"url":"https://postman-echo.com/put"}
https example INFO: Data sent for PUT request: My PUT request data
https example INFO: =========== DELETE REQUEST ===========
https example INFO: {"form":{},"headers":{"user-agent":"Resty/0.1 (Java)","accept":"application/json","host":"postman-echo.com","x-forwarded-proto":"https","x-forwarded-port":"443"},"files":{},"json":null,"data":{},"args":{},"url":"https://postman-echo.com/delete"
  • It confirms HTTPS communication between the board and the postman-echo.com server.
GOING FURTHER

Test specifically-tailored IoT examples

Extend your application with communication, in this suite of examples that explores the following subjects:

  • Connectivity detection.
  • JSON processing.
  • REST server setup.
  • REST client use.
  • Interaction with a MQTT server.
  • SSL security.
  • WebSocket client use.
SEE MORE
GOING FURTHER

Widget Demo

This demo illustrates the Widget library (ej.widget, ej.style, ej.animation, ej.color) based on MicroUI 2 and MWT 2.

 

SEE MORE
NEXT STEP

Build a VEE For Your Device

Learn how to create and extend your MICROEJ VEE in order to start prototyping your embedded device. You may also access more resources and examples on Embedded GUI and IoT Connectivity on the dedicated pages.

Build Your VEE

MicroEJ Developer Forum

Need Help?

Developer forum

Tips and tricks, insights and discussions…
MicroEJ community helps you solve your challenges!

Go To Forum