ArduinoCore-stm32l0 icon indicating copy to clipboard operation
ArduinoCore-stm32l0 copied to clipboard

Checking free memory

Open SloMusti opened this issue 6 years ago • 1 comments

While debugging an application which is mis-behaving, I have discovered the need to determine the free memory available in real-time to see if something is going wrong.

For Arduino there is the library https://github.com/maniacbug/MemoryFree which does not work because:

...\Arduino\libraries\MemoryFree-master/MemoryFree.cpp:18: undefined reference to `__brkval'
...\Arduino\libraries\MemoryFree-master/MemoryFree.cpp:18: undefined reference to `__bss_end'

I believe it would be useful to have this feature in the core itself or have a known method that works to check this.

SloMusti avatar Nov 26 '18 10:11 SloMusti

This library will not work with ArduinoCore-stm32l0. Mainly because the heap/malloc layout in memory is different as to what the code assumes.

On Mon, Nov 26, 2018 at 3:23 AM SloMusti [email protected] wrote:

While debugging an application which is mis-behaving, I have discovered the need to determine the free memory available in real-time to see if something is going wrong.

For Arduino there is the library https://github.com/maniacbug/MemoryFree which does not work because:

...\Arduino\libraries\MemoryFree-master/MemoryFree.cpp:18: undefined reference to __brkval' ...\Arduino\libraries\MemoryFree-master/MemoryFree.cpp:18: undefined reference to __bss_end'

I believe it would be useful to have this feature in the core itself or have a known method that works to check this.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GrumpyOldPizza/ArduinoCore-stm32l0/issues/49, or mute the thread https://github.com/notifications/unsubscribe-auth/AG4QfO_eGGheyYVgkNr5WSzcGy7C91tfks5uy8EIgaJpZM4Yyuo- .

GrumpyOldPizza avatar Nov 26 '18 12:11 GrumpyOldPizza