sprintf with ewl_noio

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

sprintf with ewl_noio

1,278 次查看
PO220
Contributor IV

Hi

I'm trying to use sprintf with MQX lite on a KL15 but with Debug option "Ewl_noio" (needed for work without multilink ) an error occurs :

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

I see here

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

a solution for printf (add a low level UART) but for sprintf there is no UART.  I just need to format a char array :

"

char a8char[50];

unsigned short u16titi ;

u16titi = 262390;

sprintf(a8char,"%hu",u16titi);

"

With librarian settings "ewl_hosted" sprintf works well but without multilink the application don't run...

How can I activate sprintf without UART ?

thank you in advance for your explanations.

0 项奖励
回复
2 回复数

376 次查看
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello PO220:

You have to use the library "ewl" (NOT the hosted option). As you mentioned the sprintf function does not need any physical interface, so you should have no problem using it. Then the project will work standalone (without the debugger).


Regards!,
Jorge Gonzalez

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

376 次查看
PO220
Contributor IV

Hi

thank you

I finaly understand Ewl, Ewl_noio and Ewl_hosted.

Ewl_hosted can be an awesome fonction (debug with console in CodeWarrior is awesome) but it don't work correctly (breakpoint no longer work correcktly, too too slow in debug) and after, you need alway connect the debugger, not possible in really application.

0 项奖励
回复