MIMXRT1064-EVK SW compiled with SDK not re-running after reboot

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MIMXRT1064-EVK SW compiled with SDK not re-running after reboot

437 Views
omrisarig
Contributor I

Hello,

I have an evaluation kit - MIMXRT1064-EVK.
I'm trying to build a program using the NXP SDK, but I'm experiencing some failures and would appreciate help in the matter.

At the moment, I'm trying to just compile the hello_world example, and have it running on my board.

I've followed the steps described here to install J-LINK on my evaluation kit. I'm trying to follow the steps described in run_a_project_using_armgcc.md, from the SDK repository.

 

I can compile the example using the steps in the documentation, and get an elf output file. I can connect to the board using JLinkGDBServer, and I can program the application to the memory of the device using the toolchain's gdb. After following these steps (exactly as described in the documentation), my program is running on the device.

However, when I reboot the device (either through the reboot button or by taking the power off and on on the device), my program does not run again. This is not the behaviour I expected - I thought that by programming this SW, it should be persistent, and my board would keep running it after every boot.

 

While investigating the issue, I tried running the hello-world application from the MCUXpresso. This example can run without any problems on my board, and the example keeps running after reboots of the board (which is the exact behaviour I was expecting).
Following that, I programmed this example to my device using the J-Link and GDB, and also after programming the example this way, the SW was persistent and it kept running every time after a reboot.

Therefore, I think that for some reason the application that is being compiled using the SDK is fundamentally different from the example using the MCUXpresso. I don't understand where this difference lies, or how to fix it.

By looking at the size of these two applications, I can see that it is completely different - the size of the application compiled using MCUXpresso (which is working as expected) is 1.9Mb, while the size of the application compiled with the SDK is 160Kb. I'm attaching both applications to this question.

 

My setup is:
* My computer runs Ubuntu 22.04
* I'm using J-Link GDB server version "V7.92n Command Line Version"
* The command line for J-Link GDB server is: "JLinkGDBServer -device MIMXRT1064XXX6A -speed 4000kHz -if SWD"
* I've tried running the examples with GCC versions 13.2 and 12.2, with same results.

I've tried running different examples from the SDK, I always received the same results.

Please let me know if there is any more information I can provide.
Any help will be greatly appreciated.
With Kind Regards,
Omri

Labels (1)
0 Kudos
1 Reply

418 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @omrisarig 

I pressume that your ARMGCC application is setup to run in internal RAM. This would explain the reason why it is not persistent. You can check the memory usage in the generated .map by the compiler. Or after downloading the application, you can use the debugger to read the current stack pointer. If the main routine is executing in on chip ram, not flash that is the reason. 

If you want to use ARMGCC with ease,  there are always a lot of steps with traditional setup. You can try out our new MCUXpresso Visual Studio Code extension. See https://www.nxp.com/design/software/development-software/mcuxpresso-software-and-tools-/mcuxpresso-f...

You first need to install and run Visual Studio code for Ubuntu. Then run the program in the extension market find the MCUXpresso Studio for VS code. With the extension  can install the SDK from the same github repo. Now here is the important part for you, you can change the linker to execute from SRAM or flash.  Let me know if you need more details.

All the best,

Diego

 

 

 

0 Kudos