I have a sketch that displays a slideshow of files (bmp) on a 320*480 TFT LCD.
It works perfectly. All pictures on the SD (using SdFat) display correctly.
As well as display the picture(s) I want to load them in PROGMEM.
....
unsigned short BackGround[0x25800] PROGMEM;
...
b = inputbuffer[buffidx++];
g = inputbuffer[buffidx++];
r = inputbuffer[buffidx++];
tft.drawPixel(col, row, tft.color565(r,g,b));//paints the pixel, all okay
//BackGround[col*320+row] = tft.color565(r,g,b);//This line causes errors
....
The code snippet as above compiles (doesn't work but compiles okay).
If I uncomment the "//BackGround[col..." I get these errors
Arduino: 1.6.8 (Windows 10), Board: "Arduino Due (Programming Port)"
c:/users/louis/appdata/local/arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe: address 0x200bc940 of C:\Temp\Arduino/DigitalClock.ino.elf section .bss' is not within region ram'
c:/users/louis/appdata/local/arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe: address 0x200bc940 of C:\Temp\Arduino/DigitalClock.ino.elf section .bss' is not within region ram'
c:/users/louis/appdata/local/arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe: address 0x200bc940 of C:\Temp\Arduino/DigitalClock.ino.elf section .bss' is not within region ram'
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino Due (Programming Port).
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
I am a total newbie so I hope it is something simple and obvious ![]()
I played with various formats to no avail.... Similar code in another sketch compiles okay? The only difference the "unasigned short" is also "extern".
Could someone please tell me how I'm going wrong ![]()