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

Note

This Getting Started has been tested on Windows 10 & 11.

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 RT1170 Evaluation Kit, available here.
  • RK055HDMIPI4MA0 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-SmartThermostat 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-SmartThermostat

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

git clone -b 1.0.0 https://github.com/MicroEJ/Demo-SmartThermostat.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-SmartThermostat 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-SmartThermostat 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-SmartThermostat 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-SmartThermostat application.

Virtual Device

Note

The Front Panel may be too big for your screen, that is because of the RK055HDMIPI4MA0 display resolution. You can scroll down to see the bottom of the display.

If you want to know more about the use of the Demo-SmartThermostat, 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 RT1170 Evaluation Kit, you can continue this Getting Started: Run an Application on i.MX RT1170 Evaluation Kit.

Otherwise, learn how to Modify the Java Application.

Run an Application on i.MX RT1170 Evaluation Kit

To deploy Demo-SmartThermostat 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 RT1170 Evaluation Kit

  • Check that the dip switches (SW1) are set to OFF, OFF, ON and OFF.
  • Ensure jumpers J6 and J7 are closed.
  • Connect the micro-USB cable to J11 to power the board.
  • You can connect 5 V 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 Evaluation Kit 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 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 RT1170 Evaluation Kit

In order to build the Executable of the Demo-SmartThermostat 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 Application in the BSP and then builds the BSP using Make.

The Demo-SmartThermostat 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 Demo-SmartThermostat Application on i.MX RT1170 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-SmartThermostat running on your board.

Fig 1. Application running on i.MXRT1170 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 background that is shown on the inside part of the Home Screen.

  • Open ThermoColors.java file located in the src/main/java/com/microej/demo/smart_thermostat/style folder.
  • Background color is set line 31, replace the following line:
public static final int BG_INSIDE = 0xB6B1AB;

by

public static final int BG_INSIDE = Colors.RED;

Here is the modified application running in simulation:

Virtual Device