AnsweredAssumed Answered

Run helloworld example on EVK iMX 1064 using the arm-gcc toolchain

Question asked by on May 28, 2019
Latest reply on Oct 15, 2019 by Camille Louapre



We have been trying to compile and flash a demo application on the MIMXRT1064-EVK. The CPU is a iMX RT 1064 DVL6A variant. The helloworld is taken from an SDK built with the MCUXpresso SDK Builder with the toolchain "GCC ARM Embedded". Its version is 2.4.1. The helloworld is the FreeRTOS variant, and is found in the zip of the SDK in boards/evkmimxrt1064/rtos_examples/freertos_hello. The host is an Ubuntu.


We followed the "Getting Started with MCUXpresso SDK for MIMXRT1064" guide, part 5 "Run a demo using Arm ® GCC" the installation of the toolchain went well, as well as the compilation, which produced a "freertos_hello.elf".


However, we are not able to run this application on the board.


If I understand correctly, the board is not shipped with a J-Link OpenSDA firmware. We can see that by starting the JLinkExe binary, which fails with "FAILED: Cannot connect to J-Link via USB.". So we cannot flash the binary on the iMX 1064.


Solutions that we tried:

- put the board in maintenance mode, drag n drop the OpenSDA firmware given by NXP (OpenSDA Serial and Debug Adapter | NXP). This has been inspired by this discussion (NXP RT1064 board and JLink Debugging), without success.

- flash an all different bootloader on the LPC4322, such as the generic OpenSDA v2.1 firmware published by SEGGER (SEGGER - The Embedded Experts - Downloads) using lpscrypt. This was a failure AND we had problems flashing back a valid image afterwards (we had to extract the factory image from another EVK to flash it on the first one, using lpscrypt, as we did not find the factory images online).

- copy the compiled binary "freertos_hello.elf" to the "RT1064-EVK" Mass Storage device that pops when plugging the card through USB. This fails silently.


Finally, we also used the MCUXpresso IDE to build some examples and put them on the board through copy-paste with the filesystem, which works as expected (the board automatically resets, the binary is correctly flashed, and we can see the output on the emulated serial port).


We are porting an existing solution to FreeRTOS. Our workflow is based on automated tests and continuous integration. Moreover, we have multiple separated test applications. Hence, it is important to us to have a non-IDE based solution for compilation and flash.


Do you have an insight that would help us (ideally) compile and flash through the command line?



Best regards,