How to run a program without debugger

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to run a program without debugger

5,081 次查看
rudycoppens
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

标签 (1)
4 回复数

3,947 次查看
deniscollis
Contributor V

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 项奖励
回复

3,947 次查看
lpcxpresso_supp
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.

3,949 次查看
BlackNight
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 项奖励
回复

3,949 次查看
rudycoppens
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 项奖励
回复