I Cannot seem to find a way to do a serial print of a floating number with NUCLEO-C031C6?
- February 26, 2023
- 4 replies
- 1683 views
I am using the NUCLEO-C031C6 dev board and I seem to be having many difficulties. I am trying to do a printf() or use a sprintf() method to print a float number to the serial port. I noticed that this controller device(STM32C031C6T6) does not have an FPU and when I try to enable the linker flag -u_printf_float I automatically get a compilation error: "Nucleo_C031_FirstTest.elf section `.text' will not fit in region `FLASH'
\tools\arm-none-eabi\bin\ld.exe: region `FLASH' overflowed by 8676 bytes
collect2.exe: error: ld returned 1 exit status" I am not sure how to circumvent this? Is there a way to increase the allocation for FLASH? I tried changing the HEAP and STACK sizes but that has no effect. I am sure this device should be able to handle the extra code to do a printf of a float value? Once again any help or suggestions are greatly appreciated. I have attached my project file here
