This is what the latest release already gives you in the form of running a static code analyser (cppcheck
) (link).
Depending on the framework this is entirely possible already. For example, mbed-os already has heap memory tracing (hooked free()
and malloc()
and stored alloc/dealloc metadata in a table, really not black magic) and stack usage tracing for the all the threads.
Though static analysers are pretty powerful, a dynamic approach, as you would e.g. do with valgrind
on Unix like systems, would be nice for embedded systems. Based on how valgrind works this tool is basically impossible to run on a microcontroller without very significant modifications.