PRINTF() doesn't dump anything into the console

cancel
Showing results for 
Search instead for 
Did you mean: 

PRINTF() doesn't dump anything into the console

1,178 Views
laszlomonda
Contributor IV

Hi guys,

 

For some reason, PRINTF() doesn't dump anything into the console. I don't know whether it matters but I have the SEGGER OpenSDA firmware installed, and I also get the `No source available for "0x0"` message. Please see the attached screenshot.

 

Thanks in advance!

- Laci

Labels (1)
0 Kudos
5 Replies

290 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Laci,

Which demo do you test ? And what about the KDS version ?

About print to console on KDS2.0 and KDS3.0 , the method is different , please refer to here :

How to use printf() to print string to Console and UART in KDS2.0  , not refer to the DOC, please

refer to the common Erich Styger said :

"

KDS v2.0.0 and KDS v3.0.0 are using different libraries.

See Semihosting with Kinetis Design Studio | MCU on Eclipse  how to do semihosting with KDS v2.0.0.

See Semihosting for Kinetis Design Studio V3.0.0 and GNU ARM Embedded (launchpad) | MCU on Eclipse  how to use semihosting with KDS v3.0.0.

I hope this helps,

Erich

"


Have a great day,
Alice Yang

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

0 Kudos

290 Views
laszlomonda
Contributor IV

Hi Alice,

I've tried pretty much everything that's described in the linked resources and it still doesn't work. I'm using KDS 3.1.0 and printf() doesn't work with any demo neither on the FRDM-K22F, nor the FRDM-KL03Z.

Any further hints?

Thank you!

0 Kudos

290 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

- Firstly i recommend you do not use the printf() to print to the console , for it

generate greatly code size , for the kl03z32 chip, the memory is limited , so for the KSDK demo

code , it hard to use it , for the KSDK generate great code size , so add the printf() , it maybe overflow.

And also in the demo code you mentioned , the function of "PRINTF()" is print the character to the terminal of PC,

i think this is simple and useful .

If you must use the console , you can create one simple project by yourself , then configure it refer to the DOC

i mentioned before , it can work well , i test it on my side , also attach the project .

- About the frdm-k22 board , it is unstable when download the KSDK demo code , for sometimes we should restart

the PC, or it will show "No source available for..", also recommend you use the PRINTF() to print to the terminal of PC.

For the function is realized on the demo code , we do not change anything.

About why do not recommend you use the console , you can refer to here :Why I don’t like printf() | MCU on Eclipse

Hope it helps

Alice

0 Kudos

290 Views
laszlomonda
Contributor IV

Hi Alice,

The printf() call in your project works perfectly for me! The problem is, I still don't know what to tweak in my projects. I'm wondering whether you could take a look at my projects to give me an idea what's wrong with them.

The Git repo can be found at https://github.com/UltimateHackingKeyboard/firmware-kinetis

The

git clone --recursive git@github.com:UltimateHackingKeyboard/firmware-kinetis.git

command checks out the repo, and then there are 2 KDS projects in it, one in the "left" and one in the "right" directory. "left" runs on the FRDM-KL03Z and "right" runs on the FRDM-K22F.

I understand if you don't have the time to help me further, and your help is already very much appreciated.

Thank you!

- Laci

0 Kudos

290 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Laci,

I have  download and checked your project , while i don't know your question , build error ? or function's problem?

For the FRDM-KL03 project,  when i build it , for some path reason , there some build error,  what about on your side ?

If it without error , please tell me the problem in detail ,thank !  And about the other project, sorry , i know USB a little .

And there is a thread about how to create one now KSDK project :Writing your first toggle LED application with FRMD-K64F + KDS 1.1.0 + KSDK 1.0.0 Non-Processor Expe...  it is the same with KSDK1.3, you only need read from :

"Next step is to create a new KDS project. Go to “File>New>Kinetis Design Studio Project” option"

Hope it help

Alice

0 Kudos