FreeRTOS and non-nano newlib

Your response was the hint I needed :slight_smile:

My IDE had a checkbox to select nano or not under the linker options, but “–specs=nano.specs” was also being included in the compiler arguments independantly of that, and I had to manually remove it. Doing so cleared the errors. I have not yet tested if it solved the underlying bug.

To answer the rest of your question,

I’m using GNU C, specifically GNU Arm Embedded Toolchain: 6-2017-q2-update. This has version 2.5 of newlib in it.

The link to FreeRTOS is that this bug manifests as a memory leak when
configUSE_NEWLIB_REENTRANT is set to 1 and a task using certain newlib functions (in my case snprintf with floats) is created and deleted.

I have a thread here: Memory Leak using snprintf with floats - #15 by hillridge

there’s also an older thread (linked via a response in mine) that covers the same issue.

Unfortunately, it looks like the root cause was never fully uncovered, just that “something” is wrong with some newlib builds provided with toolchains. I would like to both solve my immediate problem, and get to the bottom of this one if possible.

I know there are workarounds, and I’ll likely use one for other reasons, but I’d still like to understand what is causing this within newlib.