Enable semihost debug printing

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Enable semihost debug printing

2,168 Views
maleman
Contributor I

MCUXpresso version: 11.4.1
SDK MCU: MKV31F512xxx12
board: frdmkv31f

Project is using freedom_bootloader, when creating the project, semihost is selected for the SDK Debug Console under Project Options.

Have tried creating the project using different library types like Redlib(semihost), NewlibNano(semihost) but the SDK Debug Console is still often not set to semihost, and calls to printf() or debug_printf() do not appear in the console.

Have tried managing the MCU linker script to reselect these same libraries, which results in a MCU linker error regarding the location counter address.

Would appreciate any advice on how to set up the MCU linker for this

0 Kudos
Reply
2 Replies

2,133 Views
maleman
Contributor I

Hi Daniel,

Thanks for your reply. I had SDK_DEBUGCONSOLE=0 in my project settings, but I think the semihosting would not work for me because of active interrupts in the program I was running (https://community.nxp.com/t5/LPCXpresso-IDE-FAQs/What-is-Semihosting/m-p/475390). Got it working with UART instead

0 Kudos
Reply

2,148 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi maleman:

 

Please check the project properties, change the preprocessor macro  from SDK_DEBUGCONSOLE=1  to SDK_DEBUGCONSOLE=0

0 means output to toolchain.

1 means output to SDK version printf

 

danielchen_0-1641436108762.png

 

Regards

Daniel

 

0 Kudos
Reply