How to run a program without debugger

cancel
Showing results for 
Search instead for 
Did you mean: 

How to run a program without debugger

1,342 Views
Contributor III

Hello,

I am using the following hard and software:

- NXP MKE14F512

- Segger J-Link Edu

- MCUXpresso  10.1.1_606

- FREERTOS

For months I am working on a new product (first real embedded project for me) and I am on a point that I want 

to run the code on his own without the debugger attached. I thought this was easy but nothing works.

What I tried:

- At the "hammer" in MCUXpresso set it to "Release mode" 

- Make a bin file from release .axf and program it with Segger J-Flash-Lite

- Changed all the settings at "green spider" to attached files

What am I missing? thx!! 

Best Regards,
Rudy

Labels (1)
4 Replies

210 Views
Contributor IV

I have also encountered this problem with a project that ran perfectly before, within or without the debug environment.  I spent a few weeks building i2c and QSPI functionality, which all ran fine in the debug environment.  But when I restarted the board without the MCUXpresso debug environment, it hangs (no more blinking led)!

Note that I moved from a managed linker script to custom script, and have just noticed that the "Semihost Console" and "UART Console" are both grayed-out in Quick Settings >> SDK Debug Console.  I added the suggested hard-fault handler, but that has not helped.

I'll be back to fight on Monday - have a good weekend,

Denis

0 Kudos

210 Views
NXP Employee
NXP Employee

Your project is probably configured semihosting printf : See section 15.4, "What is Semihosting?" (and in particular section 15.4.5,"Semihosted printf and Debugging"), of the MCUXpresso IDE v10.2.0 User Guide for details.

Either ensure that you have the hard fault handler in your project, or else you can probably use Quick Settings to reconfigure the PRINTF macro to point to the UART DEBUG_CONSOLE system (see section 18.1, "Quick Settings" for details).

Regards,

MCUXpresso IDE Support.

210 Views
NXP Employee
NXP Employee

Hi Rudy,

does it work if you use the 'Debug' configuration and download it with the debugger?

Keep in mind that the 'Release' build is basically the same, but with different build settings (e.g. for higher optimizations).

In the embedded space you rarely really need a 'release' build, as this is more of an artifact from the Desktop world (see Debug vs. Release? | MCU on Eclipse ).

I hope this helps,

Erich

0 Kudos

210 Views
Contributor III

Thanks for your reply Erich!

The only problem is that if the debugger is not attached the program will not run. 

The program only runs when the debugger is connected and I press the play button.

The moment that I disconect the debugger the program stops running. 

0 Kudos