cannot see any "printf" in "Semihosting and SWV"

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

cannot see any "printf" in "Semihosting and SWV"

1,419 Views
gloria
Contributor III

HI, when I debugged example program provided by KSDK1.2.0 -- "C:\Freescale\KSDK_1.2.0\examples\frdmk64f\driver_examples\dspi\dspi_blocking\master\kds" using KDS3.0, I wanted to see if any "printf" can be shown in the "Semihosting and SWV". However, nothing appeared in the console.

47696_47696.pngpastedImage_0.png

I have followed the instruction "How to use printf() to print string to Console and UART in KDS". But it didn't work.

I have no idea about it. Could you please help me?

 

Many many thanks!

Labels (1)
5 Replies

845 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Qingyan,

The insturction "How to use printf() to print string to Console and UART in KDS" is test on KDS2.0,

(1) As Erich said "KDS v2.0.0 and KDS v3.0.0 are using different libraries." , so if you want  shown in the "Semihosting and SWV".  , please configure like this :

(I test also on the demo you mentioned )

pastedImage_0.png

pastedImage_1.png

then on the code ,please use "printf();" , then run the code , you will see as this :

pastedImage_2.png

(2) About the demo project , the function of " PRINTF()" will show on the terminal :

pastedImage_3.png

Please have a try .

If still have any question , please contact us .


Have a great day,
Alice

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

845 Views
gloria
Contributor III

Hi Alice,

I have followed your instruction. However, there is still nothing appear. Could it be caused by my computer or software?

Many thanks and have a good day!

BR,

Qingyuan Meng

845 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Qingyuan ,

Which system about your PC ?

And the attachment is a simple project i create on KDS 3.0 , ksdk 1.2 , and please try on your side , check whether it can print to console view.

pay attention :

The linker option -specs=nosys.specs need to be changed to specify

-specs=rdimon.specs

Semihosting Enabled in KDS v3.0.0

If still this still can not work , please tell me !


Have a great day,
Alice

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

845 Views
gloria
Contributor III

Hi Alice,

I am using Win7 32bit system.

I have paid attention on the linker option: -specs=rdimon.specs

However, it still doesn't work.

pastedImage_3.png

pastedImage_4.png

pastedImage_5.png

Many thanks  and have a nice day!

Best Regards,

Qingyuan Meng

0 Kudos

845 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

(1) Oh, :smileysad:    please  show me the code you use to print to console ,

for example on my project , i use  pirntf("test on console \n");  what about yours .

(2)  Have you test on the project i send  to you , and configure only have the  "-specs=rdimon.specs"  like this :

Semihosting Enabled in KDS v3.0.0

BR

Alice

0 Kudos