Dumping memory blocks with the shell #27
philj404
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Here's something I added which might be useful. It's a few memory dump commands I added to examples/ArduinoTextInterface.
eeprom? [<beginHex> [<numBytesHex>]]progmem? [<beginHex> [<numBytesHex>]]ram? [<beginHex> [<numBytesHex>]](note that only AVR processors will support all these commands, as some processors have no EEPROM etc.)
You might use it to see memory leaks over time.
It was particularly useful for me for finding redundant
Serial.println("look! more text");string arrays strings using RAM. Wrapping each instance with the F() macro (e.g. asSerial.println(F("look! more text"));) freed a lot of RAM .For example I found some interesting constant strings in PROGMEM:
In addition for AVR processors there were some useful hints for internal variables used to manage the stack and heap:
The
memory?andstackheap?work for AVR microcontrollers, as that is what I needed. You may be able to find a way to do something similar for other architectures. But that's left as an exercise for the student 😁.Thanks to/further reading:
Beta Was this translation helpful? Give feedback.
All reactions