wawa
Junior Member
Posts: 24
|
Post by wawa on Jul 27, 2020 11:51:22 GMT -8
I get the following error when I compile the converted images: images.h:4864:1: error: too many initializers for 'const uint8_t [7640] {aka const unsigned char [7640]}' There're only 4 image but is there a limited size? (all are 200x160)
Attachments:imageconv.zip (318.35 KB)
|
|
|
Post by tftlcdcyg on Jul 27, 2020 15:17:35 GMT -8
The space available to store in the AVR-MCU flash is very limited. It is better to get assets in two parts, one of them you must save it on a microSD card (*.gd2) and the other part (*.h) in the folder of the sketch.
-f images.gd2 -o images.h img0.png img1.png img2.png img3.png PD: on MCU with massive space like teensy 4 or teensy 4.1, no problem
|
|
wawa
Junior Member
Posts: 24
|
Post by wawa on Jul 28, 2020 10:25:33 GMT -8
I thought it was a syntax error but you're right, it's a memory problem. I solved it by changing the compression mode and used a Mega instead of Uno. I also noticed the compression takes in consideration the complexity of the image: A filled image will take less memory than a photography even if they are the same size. I never used teensy but I have a STM32F103, 128Kb Flash - Half of the Mega but 4 times the Uno By the way, does this board work with Gameduino? EDIT: I just read that teensy 4.1 has 8Mb! Wow!
|
|