Lpc1769 software floating point unit (FPU) - ( for printf family)

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

Lpc1769 software floating point unit (FPU) - ( for printf family)

1,298件の閲覧回数
ramazan_kurban3
Contributor III

I use gnu arm on eclipse ( lpc1769 m3 cortex ). I want to convert float value to string with sprintf but it doesnt work.

I add -u_printf_float to linker option but it is didnt work because m3 cortex has not hard FPU.  Therefore i add -mfloat-abi=soft to linker option for use software FPU but it doesnt work. How can i solve this problem.

int main(void) {

    InitBoard();         float flt = 1.1;        char msg[256];        sprintf(msg , "number is %.3f ", flt);        while (1){             KC_UART_sendstring(LPC_UART0, msg);             delay_ms(500);        }}
0 件の賞賛
返信
1 返信

1,179件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Ramazan Kurban,

Could you please show what's the data inside msg[] when it doesn't work。

I test on MCUXpresso IDE (it based on Eclipse), it seems can work well:

pastedImage_1.png

BR

Alice

0 件の賞賛
返信