Enable semihost debug printing

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

Enable semihost debug printing

2,861 次查看
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 项奖励
回复
2 回复数

2,826 次查看
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 项奖励
回复

2,841 次查看
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 项奖励
回复