Sparklet on i.MXRT1170 EVK
Running Sparklet on i.MXRT1170
This comprehensive guide outlines the essential steps for running Sparklet powered UI application on the NXP IMXRT1170 EVK.
It’s crucial to follow these instructions meticulously and sequentially to guarantee a smooth setup on your target device.
If you’re new to Sparklet, it’s advisable to begin by familiarizing yourself with the basic concepts and completing the quick tour tutorial in the following order.
Also get to know about the board more via its Quick Start Guide.
These will help you grasp the fundamentals of Sparklet, and the workflow involved in GUI development.
Prerequisites
This section contains the pre-requisites for running Sparklet on any IMXRT1170 platform.
Hardware components
NXP IMXRT1170 EVK board or your custom board.
SEGGER debugger (in case of EVK, it has CMSIS DAP inbuilt) to connect to your board.
A serial cable to connect the debugger to your PC and power supply adapter for your board. (5V for IMXRT1170 EVK).
Software components
MCUXpresso IDE from NXP.
IMXRT1170 SDK
If any of these are not available, kindly install them as per the vendor instructions.
Sparklet Example Code Organization
Uncompress the example project, estorm_c2_galactus.zip in this case, on to your working directory. (e.g. E:nxp_imxrt1170classic_modern_cluster).
The provided MCUXpresso project for IMXRT1170 contains everything you need to create, compile, link and flash a Flint UI application for the IMXRT1170 EVK target. This example is running on top of FreeRTOS with screen elements dynamically modified for demo and the screen looks like :
The Flint project for the same can be downloaded from Downloads Section.
After unpacking, you will find the following subdirectories:
Directory |
Description |
\source |
This folder contains the file main.c, where you will find the initialization of the system and the FreeRTOS task to drive a Flint application. |
\device |
This folder contains the necessary IMXRT1170 device files. |
\drivers |
This folder contains necessary IMXRT1170 drivers. |
\vglite |
This folder contains VGlite Library files. |
\libs |
This folder contains Sparklet library files. |
\src\App |
This folder contains the prepared application files specific to the example vehicle instrument cluster built using Flint. |
Of these some files of interest are:
File |
Description |
flint_ids.h |
This file contains all IDs of the Flint project. |
flint_data_def.h |
This file contains all Data IDs of the Flint project. |
model_classic_modern.c |
Sparklet widgets APIs are handled here. |
main.c |
This file contains basic board support initialization and FreeRTOS task creation. |
sparklet_main.c |
This file contains basic Sparklet initialization and runs Sparklet engine. |
Building the Sparklet Example
The following steps capture the procedure to build and flash the application using the NXP toolchain.
Building the Project
Select the project from File->Import Project:
After importing, build the project by clicking on the Build icon.
On successful build, the following output are available:
Flashing program in EVK (using CMSIS-DAP)
The firmware can be flashed on the target via CMSIS-DAP probe as given in following process:
Flashing Flint image in EVK (using CMSIS-DAP).
Flashing Application firmware in EVK (using CMSIS-DAP).
Flashing Flint Image in EVK (using CMSIS-DAP)
Step 1: Select the Flash tool icon from the toolbar.
Please select the CMSIS-DAP probe from the wizard that appears below and then Click OK:
Step 2: Choose the “Sparklet_data_Internal_Flash_Block.bin” file and Click Run.
Step 3: The flashing operation begins with a pop as given below:
Step 4: After flashing the program, a pop would appear as given below:
Flashing Application firmware in EVK (using CMSIS-DAP)
Step 1: Select the Flash tool icon from the toolbar.
Please select the CMSIS-DAP probe from the wizard that appears below and then Click OK.
Step 2: Choose the “Sparklet.axf” file and Click Run.
Step 3: The flashing operation begins with a pop as given below:
Step 4: After flashing the program, a pop would appear as given below:
Debugging the Project with MCUXpresso
While the above steps are suitable for deployment, generally to develop and debug the MCUXpresso IDE can be used as given in the below steps.
Open debug view by clicking on Debug icon on the toolbar:
Double click on the “C/C++ (NXP Semiconductors) MCU Application”. Browse the project on the project tab and choose the “output.axf ” (example: SparkletForIMXRT1170) file of our project.
Click Debug. Choose the probe from the below wizard and click OK.
And we are ready to debug: