i.MX RT1170 Evaluation Kit

During this Getting Started, you will learn to:

  • Run an Application on the i.MX RT1170 Evaluation Kit Virtual Device.

  • Run the same Application on your i.MX RT1170 Evaluation Kit.

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

Prerequisites

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:

  • An i.MX RT1170 EVKB Evaluation Kit, available here.

  • An RK055HDMIPI4MA0 display panel, available here.

  • The MCUXPresso SDK to build the BSP and flash the board. You will be guided on how to install this tool later.

  • The West command line tool from the Zephyr project. 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 VEE Port sources from Github.

Install MICROEJ SDK 6

Install MICROEJ SDK 6 by following Installation instructions.

IntelliJ IDEA is used in this Getting Started, but feel free to use your favorite IDE.

Install West

West is a Zephyr tool for multiple repository management systems. It will be used to fetch the code and its dependencies.

  • Install West by following Installing west instructions (tested with west 1.2.0).

  • Check that the tool has been properly installed by running the command: west --version, it should print the west version you installed.

Get the i.MX RT1170 VEE Port project

For this Getting Started, the NXP i.MX RT1170 Evaluation Kit VEE Port will be used.

It contains the sources of the VEE Port which will be necessary to build and run applications on the simulator and on the device. The VEE Port also includes some applications samples which will be used in this Getting Started.

You can download the i.MX RT1170 VEE Port using the following commands:

mkdir nxpvee-mimxrt1170-prj
cd nxpvee-mimxrt1170-prj
west init -m https://github.com/nxp-mcuxpresso/nxp-vee-imxrt1170-evk .
west update

Warning

The toolchain requires the path to the VEE Port sources to be as short as possible and contain no whitespace or non-ASCII character. It is recommended to clone the repository as close as possible to your file system root.

Set up the i.MX RT1170 VEE Port project on your IDE

Import the Project

The first step is to import the i.MX RT1170 VEE Port 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 on the Welcome Screen, click on the Open button. Otherwise click either on File > Open… or on File > New > Project From Existing Sources….

  • Select the nxp-vee-imxrt1170-evk directory located where you downloaded it and click on the OK button.

    Import VEE Port sources
  • If you are asked to choose a project model, select Gradle and click on the Create button.

    New Project From Existing Sources view

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 haven’t already done it, please have a look at SDK EULA Acceptation.

Run an Application on the Virtual Device

In this example, we will run the animatedMascot Application, which is available as an example sample in the i.MX RT1170 VEE Port.

In order to execute the animatedMascot Application on the Virtual Device, the SDK provides the runOnSimulator Gradle task.

Note

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

  • In the Gradle view, navigate to nxpvee-mimxrt1170-evk > apps > animatedMascot > Tasks > microej. Double-click on the runOnSimulator task.

    runOnSimulator task

The Virtual Device starts and executes the animatedMascot application.

Virtual Device
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 RT1170 Evaluation Kit, you can continue this Getting Started: Run an Application on the i.MX RT1170 Evaluation Kit.

Otherwise, learn how to Modify the Java Application.

Run an Application on the i.MX RT1170 Evaluation Kit

To deploy the animatedMascot 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 and Flash it on 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.

MCUXPresso SDK Setup

Install MCUXPresso SDK
  • Download and install MCUXpresso Installer.

  • Once installed, open it.

  • Select MCUXpresso SDK Developer and LinkSever and click Install:

    MCUXPresso setup
  • Once done, a green tick appears next to the installed packages:

    MCUXPresso setup
Add GNU ARM Embedded Toolchain Environment variable

MCUXpresso Installer installs a GNU ARM Embedded Toolchain in the $user/.mcuxpressotools folder.

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:\Users\MicroEJ\.mcuxpressotools\arm-gnu-toolchain-13.2.Rel1-mingw-w64-i686-arm-none-eabi).

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

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 the 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 the GnuWin32\bin folder to your path.

Check that the tool has been properly installed:

Make setup
Add the Flashing Tool Environment variable
  • 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 LinkServer_{version} folder located where you installed LinkServer (e.g. C:\nxp\LinkServer_1.6.133).

Hardware Setup

Set up the NXP i.MX RT1170 EVKB:

NXP i.MX RT1170 EVKB Hardware Setup

NXP i.MX RT1170 EVKB Hardware Setup

  • Check that the dip switches (SW1) are set to OFF, OFF, ON, and OFF.

  • Connect a micro-USB cable to J86 to power the board.

  • You can connect a 5V power supply to J43 if you need to use the display

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.

The VEE Port uses the virtual UART from the i.MX RT1170 EVKB USB port. 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 setting up your environment. You are now ready to discover how to build and flash a MicroEJ application.

Build the Executable for i.MX RT1170 Evaluation Kit

In order to build the Executable of the animatedMascot Application, the SDK provides the buildExecutable Gradle task.

Note

If you are using another IDE than IntelliJ IDEA, please have a look at Build an Executable section. Come back to 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 field with the UID you 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 take some time.

The Gradle task deploys the Application in the BSP and then builds the BSP using Make.

The animatedMascot application is built and ready to be flashed on i.MX RT1170 Evaluation Kit once the hardware setup is completed.

Flash the Application on the i.MX RT1170 Evaluation Kit

In order to flash the animatedMascot Application on i.MX RT1170 Evaluation Kit, the application provides the runOnDevice Gradle 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 take some time.

    runOnDevice task

Once the firmware is flashed, you should see the animatedMascot running on your board.

Fig 1. The Application running on the i.MXRT1170 Evaluation Kit Fig 2. The Application logs on Termite

Modify the Java Application

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

We will modify the simpleGFX Application which is available as an example sample in the i.MX RT1170 VEE Port.

The simpleGFX Application can be executed on the Virtual Device with the he runOnSimulator Gradle task:

simpleGFX Application on the Virtual Device
  • Open SimpleGFXWidget.java file located in the src/main/java/com/nxp/example/simplegfx folder.

  • The rectangles colors are set line 22, replace the following lines:

private static final int NXP_ORANGE = 0xF9B500;
private static final int NXP_BLUE = 0x0EAFE0;
private static final int NXP_GREEN = 0x69CA00;

by

private static final int NXP_ORANGE = Colors.RED;
private static final int NXP_BLUE = Colors.BLUE;
private static final int NXP_GREEN = Colors.GREEN;
  • Relaunch the application on the Virtual Device:

    Modified simpleGFX Application on the 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 APIs 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 gathers 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 to 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-application 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 Training Courses ranging from how to easily debug applications to setting up a Continuous Integration process and a lot of things in between.