RT1010 Semihosting

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

RT1010 Semihosting

跳至解决方案
426 次查看
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

标签 (1)
0 项奖励
回复
1 解答
379 次查看
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

在原帖中查看解决方案

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