i.MX RT595 Evaluation Kit

During this Getting Started, you will learn to run:

  • run an Application on the i.MX RT595 Evaluation Kit Virtual Device,

  • run the same Application on your i.MX RT595 Evaluation Kit.

In case you are not familiar with MicroEJ, please visit Discover MicroEJ to understand the principles of our technology.

Prerequisites

Note

This Getting Started has been tested on Windows 10 & 11. Also note that examples used in this Getting Started could depend on older tools and libraries. Most notably our dependency manager plugin (using Gradle) could be an older version.

This Getting Started is separated in two main parts.

The first part consists of running a demo application on the Virtual Device. All you need is:

The second part consists of running the same demo application on your device. For that you will need:

  • i.MX RT595 Evaluation Kit, available here.

  • G1120B0MIPI display panel, available here,

  • A GNU ARM Embedded Toolchain, Cmake and Make are needed to build the BSP. You will be guided on how to install the toolchain later.

  • LinkServer tool to flash the board. You will be guided on how to install this tool later.

Environment Setup

To follow this Getting Started, you need to:

  • Install MICROEJ SDK 6.

  • Get the Demo-Wearable-VG from Github.

Install MICROEJ SDK 6

Install MICROEJ SDK 6 by following Installation instructions. IntelliJ IDEA is used on this Getting Started but feel free to use your favorite IDE.

Get Demo-Wearable-VG

For this Getting Started, the Demo-Wearable-VG Application will be use. You can download it using the following command:

git clone -b 2.0.0 https://github.com/MicroEJ/Demo-Wearable-VG.git

Note

If you don’t have Git installed, you can download the source code directly from our GitHub repository. Then you can click on :Code > Download ZIP.

Set up the Application on your IDE

Import the Project

The first step is to import the Demo-Wearable-VG Application into your IDE:

Note

If you are using another IDE than IntelliJ IDEA, please have a look at Import a Project section.

  • If you are in the Welcome Screen, click on the Open button. Otherwise click either on File > Open… or on File > New > Project From Existing Sources….

  • Select the Demo-Wearable-VG directory located where you downloaded it and click on the OK button.

    Import demo application
  • If you are asked to choose a project model, select Gradle.

    Fig 1. Project Model Selection when Opening in IntelliJ IDEA Fig 2. Project Model Selection when Importing in IntelliJ IDEA
  • Click on the Create button.

The Gradle project should now be imported in IntelliJ IDEA, your workspace contains the following projects:

Workspace view

Accept the MICROEJ SDK EULA

You may have to accept the SDK EULA if you didn’t already do, please have a look at SDK EULA Acceptation.

Run an Application on the Virtual Device

In order to execute the Demo-Wearable-VG Application on the Virtual Device, the SDK provides the Gradle runOnSimulator task.

Note

If you are using another IDE than IntelliJ IDEA, please have a look at Run on Simulator section.

  • Double-click on the runOnSimulator task in the Gradle tasks view. It may takes few seconds.

    runOnSimulator task

The Virtual Device starts and executes the Demo-Wearable-VG application.

Virtual Device

Note

If you want to know more about the use of the Demo-Wearable-VG, please have a look at its README.md file.

Well Done

Well done !

Now you know how to run an application on a Virtual Device.

If you want to learn how to run an application on your i.MX RT595 Evaluation Kit, you can continue this Getting Started: Run an Application on i.MX RT595 Evaluation Kit.

Otherwise, learn how to Modify the Java Application.

Run an Application on i.MX RT595 Evaluation Kit

To deploy Demo-Wearable-VG application on your board, you will have to:

  • Setup your Environment (Toolchain, flashing-tool, hardware setup).

  • Request a 30 days Evaluation License and install an activation key.

  • Build the Executable.

  • Flash the board.

Environment Setup

This chapter takes approximately one hour and will take you through the steps to set up your board and build the BSP.

Install the C Toolchain

The C toolchain must be installed, it is composed of the GNU ARM Embedded Toolchain, CMake and Make.

Note

This Getting Started has been tested with the following configuration:

  • GNU ARM Embedded Toolchain version 10.3 2021.10.

  • CMake version 3.26.5.

  • Make version 3.81.

Later versions may or may not work, and may need modification to the Getting Started steps.

Install GNU ARM Embedded Toolchain

The toolchain is the GNU ARM Embedded Toolchain.

At the end of the installation, it will ask you to complete the Setup of the wizard, choose the following options:

Import demo application

Once installed, ARMGCC_DIR must be set as an environment variable and point to the toolchain directory. To do so:

  • Open the Edit the system environment variables application on Windows.

  • Click on the Environment Variables… button.

  • Click on the New… button under the User variables section.

  • Set Variable Name to ARMGCC_DIR.

  • Set Variable Value to the toolchain directory (e.g. C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2021.10).

  • Click on the Ok button until it closes Edit the system environment variables application.

Install CMake

CMake is the application used by the build system to generate the firmware.

During the installation, it will ask you if you wish to add CMake to your system Path, add it at least to the current user system path. If you missed it, you can manually add CMake/bin folder to your path.

Install Make

Make is the tool that will generate the executable based on the files generated by CMake. It will also be used to flash the board. Under Download section, you can select the Setup program for the complete package, except sources.

By default, it will automatically add Make to your path. If not, you can manually add GnuWin32\bin folder to your path.

Install the Flashing Tool

Note

This Getting Started has been tested with LinkServer version 1.2.45.

Later versions may or may not work, and may need modification to the Getting Started steps.

LinkServer is needed to flash the board.

Once installed, LinkServer_xxx/binaries folder must be set on your Path. To do so:

  • Open the Edit the system environment variables application on Windows.

  • Click on the Environment Variables… button.

  • Select Path variable under the User variables section and edit it.

  • Click on New and point to the binaries folder located where you installed LinkServer (e.g. nxp/LinkServer_1.2.45/binaries).

Hardware Setup

Hardware Setup

Setup the i.MX RT595 Evaluation Kit:

  • Check that the dip switches (SW7) are set to OFF, OFF and ON (ISP0, ISP1, ISP2).

  • Ensure jumpers JP18 and JP19 are closed.

  • Remove jumper JP4.

  • Connect the micro-USB cable to J40 to power the board.

The USB connection is used as a serial console for the SoC, as a CMSIS-DAP debugger, and as a power input for the board.

A COM port is automatically mounted when the board is plugged into a computer using a USB cable. All board logs are available through this COM port.

The COM port uses the following parameters:

Baudrate

Data bits

Parity bits

Stop bits

Flow control

115200

8

None

1

None

You can have a look at your application logs with an RS232 Terminal (e.g. Termite).

Congratulations, you have finished the setup of your environment. You are now ready to discover how to build and flash a MicroEJ application.

Build the Executable for i.MX RT595 Evaluation Kit

In order to build the Executable of the Demo-Wearable-VG Application, the SDK provides the Gradle buildExecutable task.

Note

If you are using another IDE than IntelliJ IDEA, please have a look at Build an Executable section. Come back on this page if you need to activate an Evaluation License.

  • Double-click on the buildExecutable task in the Gradle tasks view.

  • The build stops with a failure.

  • Go to the top project in the console view and scroll up to get the following error message:

    Console Output License UID
  • Copy the UID. It will be required to activate your Evaluation license.

Request your Evaluation License:

  • Request your Evaluation license by following the Request your Activation Key instructions. You will be asked to fill the machine UID you just copied before.

  • When you have received your activation key by email, drop it in the license directory by following the Install the License Key instructions (drop the license key zip file to the ~/.microej/licenses/ directory).

Now your Evaluation license is installed, you can relaunch your application build by double-clicking on the buildExecutable task in the Gradle tasks view. It may takes some time.

The gradle task deploys the MicroEJ application in the BSP and then builds the BSP using Make.

Warning

On Windows, the build may fail because of file path length limit exceeded with following error message:

arm-none-eabi-gcc.exe: fatal error: no input Files

In this case, shorten the build directory path in ./watch-vg/build.gradle.kts:

buildDir = file("C:/Demo-Wearable-VG/build")

The Demo-Wearable-VG application is built and ready to be flashed on i.MX RT595 Evaluation Kit once the hardware setup is completed.

Flash the Application on the i.MX RT595 Evaluation Kit

In order to flash the Demo-Wearable-VG Application on i.MX RT595 Evaluation Kit, the application provides the Gradle runOnDevice task.

Note

If you are using another IDE than IntelliJ IDEA, please have a look at Run on Device section.

  • Double-click on the runOnDevice task in the Gradle tasks view. It may takes some time.

    runOnDevice task

Once the firmware is flashed, you should see the Demo-Wearable-VG running on your board.

Fig 1. Application running on i.MXRT595 Evaluation Kit Fig 2. Application logs on Termite

Modify the Java Application

With MicroEJ, it is easy to modify and test your Java application on the Virtual Device.

For example, we could modify the color of the date on the Flower Watchface that is shown at the startup of the application.

  • Open FlowerWatchface.java file located in the watchface-flower/src/main/java/com/microej/demo/watch/watchface/flower folder.

  • On the renderDate method, replace the following line:

g.setColor(style.getColor());

by

g.setColor(Colors.GREEN);

Here is the modified application running in simulation:

Virtual Device

Going Further

You have now successfully executed a MicroEJ application on an embedded device so what’s next?

If you are an application developer you can continue to explore MicroEJ’s API and functionalities by running and studying our samples at GitHub:

Foundation Libraries

Eclasspath

IoT

This project gathers all the basic examples of the foundation libraries.

This project gather all the examples of eclasspath.

This project gathers simple applications using net libraries.

https://github.com/MicroEJ/Example-Foundation-Libraries

https://github.com/MicroEJ/Example-Eclasspath

https://github.com/MicroEJ/Example-IOT

You can also learn how to build bigger and better applications by reading our Application Developer Guide.

If you are an embedded engineer you could look at our VEE port examples at GitHub. And to learn how create custom VEE ports you can read our VEE Porting Guide.

You can also follow the Kernel Developer Guide for more information on our multi-applications framework or read about our powerful wearable solution called VEE Wear.

Last but not least you can choose to learn about specific topics by following one of our many tutorials ranging from how to easily debug application to setting up a Continuous Integration process and a lot of things in between.