How do I get my embedded application to run when I exit the debugger?

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

How do I get my embedded application to run when I exit the debugger?

跳至解决方案
1,507 次查看
smick
Contributor I

With the Kinetis Design Studio, when I load my application using the debugger (JLink), it starts automatically when I exit the debugger or first power up by board. With MCUXpresso, it does not start up automatically.  What am I missing?

Thanks,

Steve

1 解答
1,406 次查看
BlackNight
NXP Employee
NXP Employee

Hi Steve,

typical reasons for this are:

- using semihosting: in that case, if you use printf()/etc, it will wait for the debugger to retrieve the data

- using a RAM target: make sure that your application is loaded to FLASH, not RAM.

- you are using/waiting for periopherals configured by the debugger, e.g. hardware counters (see Cycle Counting on ARM Cortex-M with DWT | MCU on Eclipse ), make sure you properly initialize it from your application.

I hope this helps,

Erich

在原帖中查看解决方案

2 回复数
1,407 次查看
BlackNight
NXP Employee
NXP Employee

Hi Steve,

typical reasons for this are:

- using semihosting: in that case, if you use printf()/etc, it will wait for the debugger to retrieve the data

- using a RAM target: make sure that your application is loaded to FLASH, not RAM.

- you are using/waiting for periopherals configured by the debugger, e.g. hardware counters (see Cycle Counting on ARM Cortex-M with DWT | MCU on Eclipse ), make sure you properly initialize it from your application.

I hope this helps,

Erich

1,406 次查看
smick
Contributor I

Erich,

It was the semihosting. I simply commented out a printf() at the beginning of my program and it now works as expected. Thanks for your help and especially for all you do with MCU on Eclipse! You have saved me many hours over the last 8 months.

Steve

0 项奖励