MK10DX256VLK7 doesn't run standalone, just when debugging. Verified it's running from FLASH, not RAM.

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

MK10DX256VLK7 doesn't run standalone, just when debugging. Verified it's running from FLASH, not RAM.

跳至解决方案
3,293 次查看
carloscuev
Contributor V

I'm using MK10DX256VLK7 with internal oscillator, the problem is that it runs just when I'm debugging (I use Segger J-Link) but it doesn't run standalone, I'm sure I'm writing the code to FLASH, I have selected the FLASH target and verified code is running from FLASH. Any thoughts about what I'm doing wrong? Thanks.

MK10DX256VLK7.png

1 解答
1,820 次查看
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Carlos:

I guess the problem is that you might be compiling with a "semihosting" ewl library.

Please go to Project -> Properties -> C/C++ Build -> Settings -> Librarian, and make sure that you do not have selected any of the "XXX_hosted" options. You can go with ewl_noio.

Libraries.png

Hope this solves the problem.

Regards!

Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

3 回复数
1,821 次查看
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Carlos:

I guess the problem is that you might be compiling with a "semihosting" ewl library.

Please go to Project -> Properties -> C/C++ Build -> Settings -> Librarian, and make sure that you do not have selected any of the "XXX_hosted" options. You can go with ewl_noio.

Libraries.png

Hope this solves the problem.

Regards!

Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,820 次查看
carloscuev
Contributor V

That was the problem, thank you very much Jorge, now I see how inadvertently enabled this when creating my project:

Semihosting.png

This means now I have no Debugger Console IO support right?

0 项奖励
1,821 次查看
Jorge_Gonzalez
NXP Employee
NXP Employee

Good to know it worked.

You are right, without one of those "hosted" libraries you have no debugger console support. It is always better to use a UART and a terminal program. In case you really need printfs, you can use the ConsoleIO component. Check the next tutorial:

Tutorial: Printf() with (and without) Processor Expert | MCU on Eclipse

Regards!

Jorge Gonzalez

0 项奖励