Hi all,
I am trying to use semihosting on IMXRT1010 Dev kit with Segger Jtrace pro.
I need to print floating point numbers & hence I am using NewlibNano with printf float and scanf float enabled.
The prints work fine. However, I cannot use SCANF or GETCHAR. GETCHAR always gives me 255 as return.
I see that Redlib(semihost) is able to execute GETCHAR properly. However, when PRINTF prints %f or %d, it fills console with garbage.
My question in a nutshell is. What are the settings to be used ( libraries and others) to
1. get %f , %d working with PRINTF with semihosting
2. get SCANF working
Thanks
Syam K
Solved! Go to Solution.
Hi @Syam_Krishnan ,
Thanks for your interest in NXP MIMXRT series!
I have test a modified with CMSIS-DAP on-board debugger. And it works well!
Here is my configuration for your reference:
And I attached my demo for your test. However, I don't have JTrace available for testing right now, so if you have no problem using my project with CMSIS-DAP, but still have problems with JTrace, we suggest you contact Segger for a solution.
Best regards,
Gavin
Hey Gavin,
Thank you very much. I tried your settings on an RTC example and I was able to do printf and scanf of floating point numbers using segger JTAG and semihosting. In my earlier project, I was missing the below settings
PRINTF_ADVANCED_ENABLE=1
SCANF_ADVANCED_ENABLE=1
I had been using Newlib. I will move to redlib
Hi @Syam_Krishnan ,
Thanks for your interest in NXP MIMXRT series!
I have test a modified with CMSIS-DAP on-board debugger. And it works well!
Here is my configuration for your reference:
And I attached my demo for your test. However, I don't have JTrace available for testing right now, so if you have no problem using my project with CMSIS-DAP, but still have problems with JTrace, we suggest you contact Segger for a solution.
Best regards,
Gavin