RT1010 Semihosting

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

RT1010 Semihosting

Jump to solution
291 Views
Syam_Krishnan
Contributor I

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

Labels (1)
0 Kudos
Reply
1 Solution
244 Views
Gavin_Jia
NXP TechSupport
NXP TechSupport

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!

Gavin_Jia_0-1719390737192.png

 

Here is my configuration for your reference:

Gavin_Jia_1-1719390872139.png

 

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

View solution in original post

2 Replies
207 Views
Syam_Krishnan
Contributor I

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

 

0 Kudos
Reply
245 Views
Gavin_Jia
NXP TechSupport
NXP TechSupport

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!

Gavin_Jia_0-1719390737192.png

 

Here is my configuration for your reference:

Gavin_Jia_1-1719390872139.png

 

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