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

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Jump to solution
1,843 Views
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 Solution
370 Views
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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

3 Replies
371 Views
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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

370 Views
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 Kudos
370 Views
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 Kudos