printf in FreeRTOS

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

printf in FreeRTOS

4,341 Views
harish_cont41
Contributor I

Hi,

How to enable printf support in FreeRTOS. I am using S32k146 and segger debugger. I want the prints in Debugger console. Though I use newlib and nanolib I am not able to get the prints. Please help.

0 Kudos
6 Replies

4,328 Views
harish_cont41
Contributor I

Hi Petr,

I had already seen those links in NXP forums. I am using newlib_nano debug console. Is it that I need to use EWL_c debug console instead? Also my telnet port is 2333 and the link says telnet port should be 51794. What is the correct settings here? I have followed your links, checked and configured accordingly but I am using S32 DS V3.3. The link talks about some version lower. Also I do not get semihosting enabled messages in the debug console or console. This is what my worry is. Please help.

regards,

Harish.

0 Kudos

4,332 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

 

beside the C lib supporting debug console you also need to enable semihosting console in debug session settings. You can refer to e.g. below thread

https://community.nxp.com/t5/S32-Design-Studio/printf-through-OpenSDA/m-p/813615

Otherwise you can refer to example that use PC terminal

https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/EXAMPLE-S32k144-UART-printf-scanf-unde...

 

BR, Petr

0 Kudos

4,316 Views
harish_cont41
Contributor I

Hi,

 

I still do not see the prints in debug console. I am using nanolib debug console library support. Should I use ewl_c library instead. Aslo, I have followed the links that u sent me in the previous post. but still in vain.Please help.

regards,

Harish.

0 Kudos

4,299 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

for me it is not clear - are you trying to use remote terminal (like putty, realterm etc. connected to uart) or semihosting console - which forwards printf output to S32DS semihosting console window? 

0 Kudos

4,293 Views
harish_cont41
Contributor I

Hi,

 

I am trying to use the debug console, not the terminal like putty or real term. I do not get semihosting enabled messages in the debug console when I start debugging with the all the settings that are mentioned in your reply to my query earlier. I am using S32DS V3.3 and all the related settings in debug configurations are done. Also I am using segger J-Link configuration for debugging with the J-Link Hardware. One more thing I want to mention here is that I used is freeRTOS and an automotive application which needs some debug console prints to help debugging.  Please help.

 

regards,

Harish. 

0 Kudos

4,287 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

please make sure that you enabled Semihosting console in debug configurations: 

jiri_kral_0-1606225664212.png

And check, if you are using STDC library with Debugger console support: 

jiri_kral_1-1606225728412.png

 

If all is set correctly, semihosting console should work: 

jiri_kral_2-1606225782750.png

 

Jiri

0 Kudos