Post by jackroffel on Nov 21, 2015 18:30:28 GMT -8
It appears to me that assets loaded via LOAD_ASSETS() are loaded into video memory, and remain there for the duration of the sketch. These assets take significantly more GD2 RAM as opposed to what they take in flash memory.
My project uses several large png files, but these are never displayed on the same screen at the same time. Since I am using a Mega 2560, I have sufficient flash memory to include a gd2assets.h file containing all these png files, but when I add up the GD2 memory needed by the output returned from the asset converter, I clearly do not have enough GD2 memory to load them all at once.
I was going to use multiple .h files by editing them to create unique labels, and then load them as needed using a differently names LOAD_ASSETS() macro - but am reluctant to do what does not seem to be documented as even possible. Can I load different LOAD_ASSET() setups in the same sketch? How do I unload previous ones?