i.MX93 Evaluation Kit

During this Getting Started, you will learn to:

  • Run an Application on the i.MX93 Evaluation Kit Virtual Device.
  • Run the same Application on your i.MX93 Evaluation Kit.

If you need to become more 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 with a WSL distribution Ubuntu 22.04. 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 into two main parts.

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

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

  • An i.MX93 Evaluation Kit, available here.

  • An HDMI display with touchscreen connected with an IMX-MIPI-HDMI adapter.

  • A prebuild Yocto Linux image, with all necessary linux packages preinstalled.

  • A Yocto SDK, to cross compile an sample application.

Environment Setup

To follow this Getting Started, you need to:

  • Install MICROEJ SDK 6.
  • Get the Example-Java-Widget from Github.

Install MICROEJ SDK 6

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

Get Example-Java-Widget

For this Getting Started, the Example-Java-Widget Application will be used. You can download it using the following command:

git clone -b 8.0.0 https://github.com/MicroEJ/Example-Java-Widget.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 Example-Java-Widget Application into your IDE:

Note

If you are using an IDE other 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 Example-Java-Widget 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 into IntelliJ IDEA. Your workspace contains the following projects:

Workspace view

Select the VEE Port

In the gradle build file build.gradle.kts, replace the VEE dependency microejVEE with the i.MX93, like this:

dependencies {
   microejVee("com.microej.veeport.imx93:VEEPort_eval:1.0.2")
}

For more information about how to select a VEE Port please refer to the following section: Select a VEE Port.

Accept the MICROEJ SDK EULA

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

Run an Application on the Virtual Device

To execute the Example-Java-Widget 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 the Run on Simulator section.

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

    runOnSimulator task

The Virtual Device starts and executes the Example-Java-Widget 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.MX93 Evaluation Kit, you can continue this Getting Started: Run an Application on i.MX93 Evaluation Kit.

Otherwise, learn how to Modify the Java Application.

Run an Application on i.MX93 Evaluation Kit

To deploy Example-Java-Widget application on your board, you will have to:

  • Set up your environment (toolchain, hardware setup).
  • Request a 30 days Evaluation License and install an activation key.
  • Build the Executable.
  • Run the Executable on board.

Environment Setup

This chapter takes approximately one hour and will take you through the steps to build a VEE Executable and set up the evaluation kit.

Install the Yocto SDK

The Executable is built using a Yocto SDK. It contains the following:

  • The C toolchain.
  • The cross-compiled libraries.
  • All the necessary headers (libc, but also the headers of the kernel and the libraries installed in the firmware rootfs).
  • An environment setup script (to set $CC, $LD, $SDKSYSROOT variables).

A prebuilt version of the Yocto SDK is available here: Yocto SDK Installer for iMX93

To install the Yocto SDK, use the following commands in WSL or Linux:

$ chmod +x oecore-x86_64-armv7at2hf-neon-vfpv4-toolchain-nodistro.0.sh
$ ./oecore-x86_64-armv7at2hf-neon-vfpv4-toolchain-nodistro.0.sh
MicroEJ: 32-bit userspace + 64-bit kernel SDK installer version nodistro.0
==========================================================================
Enter target directory for SDK (default: /usr/local/oecore-x86_64):
You are about to install the SDK to "/usr/local/oecore-x86_64". Proceed [Y/n]? Y
[sudo] password for xxxxx:
Extracting SDK.................................................................................done
Setting it up...done
SDK has been successfully set up and is ready to be used.
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
$ . /usr/local/oecore-x86_64/environment-setup-armv7at2hf-neon-vfpv4-oemllib32-linux-gnueabi
$ . /usr/local/oecore-x86_64/environment-setup-cortexa55-oe-linux

The installation path can then be used to build the VEE Executable.

Install Required Packages

Some additionnal packages will be required in order to build an executable. Run the following command (either in Linux or WSL):

sudo apt-get update && sudo apt-get install dos2unix make

Flash the image on an SD card

The Linux image is available here: Yocto WIC Image for iMX93

For this getting started we use a Linux image flashed on an SD card.

Linux

To flash the image on Linux, use the following command (assuming the SDCard device is /dev/mmcblk0):

bmaptool copy lib32-core-image-microej-microej-imx93.wic.gz /dev/mmcblk0
Windows

To flash the image on Windows, do the following:

  • Install Rufus: https://rufus.ie/en/.

  • Extract the .wic file from the archive lib32-core-image-microej-microej-imx93.wic.gz.

  • Select your SD card device in the list at the top (see example of configuration below).

  • Select your .wic file by clicking on SELECT

  • Finally click on START at the bottom and wait for the process to finish.

    Rufus

Hardware Setup

Setup

To setup the hardware you will need to connect the following on the EVK:

  • A USB C cable for the power (provided with the EVK).
  • A USB C cable for the serial port.
  • A USB C cable for the touchscreen device.
  • A RJ45 cable to access the network.
  • An HDMI cable connected to the IMX-HDMI-MIPI adapter.

The serial port is used to connect to a shell, it uses the following parameters:

Baudrate Data bits Parity bits Stop bits Flow control
115200 8 None 1 XON/XOFF

To connect to the shell enter the login root.

Configure boot

By default, the i.MX93 evaluation kit will boot from the eMMC. To change the boot mode to micro SD, set the DIP switch BMODE to 0010.

Insert the flashed SD card and boot the device. After a few seconds, the display will show the IMX93 Getting Started Welcome page. If no display is attached, information such as device IP address and documentation link will also be printed in the logs.

LVDS display support

This Getting Started has been tested with an HDMI display with a 1280x720 resolution. If you want to use the official display instead (the DY1212W-4856) you will need to reconfigure the device tree:

  • Boot your i.MX93 Evaluation Kit.
  • Stop the booting process to access the U-boot menu by pressing a key on the serial console.
  • In the U-boot menu, run the following commands:
setenv fdtfile imx93-11x11-evk-boe-wxga-lvds-panel.dtb
saveenv
boot
  • After the boot has completed you can test the display with: modetest -M imx-drm -s 35@33:1280x800-60.03.

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

Build the Executable for i.MX93 Evaluation Kit

To build the Executable of the Example-Java-Widget Application, the SDK provides the Gradle buildExecutable task.

Note

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

  • Before using this task, you will have to configure some environment variables that depend on the OS you are using.

    • To do so, right-click on buildExecutable then Modify Run Configuration....

    • Fill in your variables in Environment variables, each one separated by a semicolon (see screenshot):

      • If you changed the default Yocto SDK installation path, set the following environment variable

        • APP_SDK_INSTALL: Path to the Yocto SDK (by default /usr/local/oecore-x86_64/)
      • When using Windows with WSL, set the WSL distribution name, which you can get with the command wsl –list in Windows terminal

        • WSL_DISTRIBUTION_NAME: Name of the WSL distribution if using Windows (by default Ubuntu).
        IntelliJ variables
  • 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:

  • You can request your Evaluation license by following the Request your Activation Key instructions. You will be asked to fill in the machine UID you just copied.
  • 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 Example-Java-Widget application is built and ready to be flashed on i.MX93 Evaluation Kit once the hardware setup is completed.

Run the Application on the i.MX93 Evaluation Kit

To run the Example-Java-Widget Application on i.MX93 Evaluation Kit, the application provides the Gradle runOnDevice task.

Note

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

  • Before using this task, you will have to configure the device IP Address in the environment variables.

    • To do so, right-click on runOnDevice then Modify Run Configuration....
    • Fill in your variables in Environment variables, each one separated by a semicolon:
      • SSH_USER=root
      • SSH_HOSTNAME: IP address of the i.MX93 Evaluation Kit.
      • APP_SDK_INSTALL: Path to the Yocto SDK (by default /usr/local/oecore-x86_64/).
      • WSL_DISTRIBUTION_NAME: Name of the WSL distribution if using Windows (by default Ubuntu).
  • Double-click on the runOnDevice task in the Gradle tasks view. It may take some time.

    runOnDevice task

Once the application is running, you should see the Example-Java-Widget on your board.

Modify the Java Application

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

For example, we can modify the color of the items in the main page list.

  • Open MainPage.java located in the src/main/java/com/microej/demo/widget/main/MainPage.java folder
  • Odd items background color is set line 74, replace the following line:
style.setBackground(new GoToBackground(GRAY));

with

style.setBackground(new GoToBackground(Colors.CYAN));

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.