I am having a problem writing a floating point value to the UART. I read about an issue at the link below, and my problem likely is related somehow .
The problem is that the UART terminal does not respond at all when attempting to write floating point data to it. This happens even if you set the compiler to not use the nano libraries.
I know my UART setup is working because integers and ASCII strings print flawlessly.
Thanks for any suggestions or workarounds.
this should work
#if defined (__GNUC__)
/* Add an explicit reference to the floating point printf library */
/* to allow the usage of floating point conversion specifiers. */
/* This is not linked in by default with the newlib-nano library. */
asm (".global _printf_float");
char strMsg1;//output UART buffer
sprintf(strMsg1, "%f", 0.01);
Kind of a wild guess: try to increase the head size for your project. There were reports that the 128 bytes its now set to by default might be too small.
I adjusted the heap size and that fixed my original problem. I now am having a new problem. The UART arbitrallarly simply just stops writing floating point data to the UART.
I was thinking the interrupt was the cause, but I took it out of the loop. Same problem.
Is there a memory leak or something going on?
My updated project is attached.