AnsweredAssumed Answered

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

Question asked by Ramazan Kurban on Jul 19, 2019
Latest reply on Jul 28, 2019 by Alice_Yang

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);        }}