This is my current challenge in making OS for AVR microcontroller. I got only 2KB of RAM and it's eaten by avery function all and variable used.
In my text editor i started to get corrupted screen as the stack/heap started ovevriten screen buffer space ;)
So much fun!
#Arduino #Clang #Memory #OS
@golemwire
Yes, I found that recently. I'm using PROGMEM for ALL the strings. As each string even the one in parameters for a function took a piece of ram.
When I need to print a string, I first copy the data from PROGMEM variable to the small buffer and use that buffer for print parameter. I'll do that to every string in the app.
Unfortunately those buffers NEEDS to be in ram. And the screen one is way too big - that's why I found a sweet spot of 112x88 pixels to work with.