error: "undefined reference to __pformatter" when using sprintf with CodeWarrior

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

error: "undefined reference to __pformatter" when using sprintf with CodeWarrior

ソリューションへジャンプ
3,354件の閲覧回数
lukaszpacyga
Contributor I

Hi,

I can not build c "Bareboard" project when using sprintf with additional parameters in code. For example:

sprintf(RadioTransmitBuff, "%d\n\r", temperature);

This line causes following error during build:

ARM_GCC_Support/ewl/EWL_C/src/stdio/vsnprintf.c:58: undefined reference to `__pformatter'

mingw32-make: *** [Testing_Sprintf.elf] Error 1

 

Project builds fine if there is no additional parameters:

sprintf(RadioTransmitBuff, "Hallo\n\r");

 

I used sprintf with Kinetis Design Studio without any problems therefore it must be something to do with CodeWarrior IDE.

Im using CodeWarrior for MCU Version: 10.6

 

I hope someone can advice?

 

Many thanks

Lukasz

ラベル(1)
0 件の賞賛
返信
1 解決策
2,388件の閲覧回数
lukaszpacyga
Contributor I

Thank you Alice for interest.

I have been using KL25Z128 with PE.

Experimentally I figured out the cause of the problem:

It was to do with "I/O support" option during new project setup.

For full support of stdio.h library a "I/O support: UART" option need to be selected.

I found more information on the various options during project setup here:

Tutorial: Printf() with (and without) Processor Expert | MCU on Eclipse

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
2,390件の閲覧回数
marceli1
Contributor III

It fix when change Settings/Librarian back to "ewl" from ewl-noio. I thelps with any printf type as sprintf.  

2,390件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Lukasz,

Please tell me which chip , and about your project information , for example , with PE or bare board project ?

And do  you sprinft show the result to UART or console window ?  Thank ! I will test it on my side .

BR

Alice

0 件の賞賛
返信
2,389件の閲覧回数
lukaszpacyga
Contributor I

Thank you Alice for interest.

I have been using KL25Z128 with PE.

Experimentally I figured out the cause of the problem:

It was to do with "I/O support" option during new project setup.

For full support of stdio.h library a "I/O support: UART" option need to be selected.

I found more information on the various options during project setup here:

Tutorial: Printf() with (and without) Processor Expert | MCU on Eclipse

0 件の賞賛
返信