AnsweredAssumed Answered

MX7 M4: Loading/executing freeRTOS BSP example code with and without SD card

Question asked by Lars Heinrichs on Feb 5, 2018
Latest reply on Feb 25, 2018 by D. RY

Hello! I have some questions on running bare metal/freeRTOS on the MX7's Cortex-M4 core.



For the sabre board it is possible to start the M4 core through uboot using the fatload {source path}{address} command where uboot copies a prevously stored file from the file system to a memory address. After loading a .bin/.elf file, bootaux {address} starts the M4 and runs the program starting at the specified address.


The FreeRTOS BSP Hello World example has been built succesfully using GNU MCU Eclipse.

Two terminal instances are connected to the virtual com ports to see the A7 and M4 debug output.

Using the A7 terminal, the M4 application is loaded and started as follows:

=> fatload mmc 0:1 0x80800000 M4_HelloWorld.elf
reading M4_HelloWorld.elf
33400 bytes read in 32 ms (1018.6 KiB/s)
=> bootaux 0x80800000
## Starting auxiliary core at 0x80800000 ...


I do not see any output on the M4 terminal, including echo. So something went wrong.


The fatload address is located in RAM. I randomly picked an address to load to and execute from. Are there any restrictions on what addresses might be chosen (while within RAM boundaries)?

A couple loader files like MCIMX7D_M4_ddr.ld are included in the BSP (platform/devices/MCIMX7D/linker). I have not understood what I should do with these.

Is the Hello World example meant to work out of the box or are any adjustments needed?




Our custom MX7 hardware does not have an SD card. Instead, EMMC and NAND are used in the system. JTAG is avilable, the next revision will have a USB connector on USB OTG 1 as well.

How can I actually get my program to run on the M4 under these conditions? May I use JTAG? With a JLink debugger I can connect to the two A7 cores but not to the M4 (target cpu could not be halted).


What are the steps to load a binary and execute on the M4?

(No Linux available).