arduino_sketches
arduino_sketches copied to clipboard
Atmega_Board_Programmer Compilation Error on IDE 1.8.13
avrdude log: In file included from /home/user/Arduino/arduino_sketches-1.10/Atmega_Board_Programmer/Atmega_Board_Programmer.ino:108:0: bootloader_atmega168.h:3:34: error: variable 'atmega168_optiboot' must be const in order to be put into read-only section by means of 'attribute((progmem))' byte PROGMEM atmega168_optiboot [] = { ^ In file included from /home/user/Arduino/arduino_sketches-1.10/Atmega_Board_Programmer/Atmega_Board_Programmer.ino:109:0: bootloader_atmega328.h:3:34: error: variable 'atmega328_optiboot' must be const in order to be put into read-only section by means of 'attribute((progmem))' byte PROGMEM atmega328_optiboot [] = { ^ In file included from /home/user/Arduino/arduino_sketches-1.10/Atmega_Board_Programmer/Atmega_Board_Programmer.ino:110:0: bootloader_atmega2560_v2.h:3:29: error: variable 'atmega2560_v2' must be const in order to be put into read-only section by means of 'attribute((progmem))' byte PROGMEM atmega2560_v2 [] = { ^ In file included from /home/user/Arduino/arduino_sketches-1.10/Atmega_Board_Programmer/Atmega_Board_Programmer.ino:111:0: bootloader_atmega1284.h:5:40: error: variable 'optiboot_atmega1284p_hex' must be const in order to be put into read-only section by means of 'attribute((progmem))' byte PROGMEM optiboot_atmega1284p_hex [] = { ^ In file included from /home/user/Arduino/arduino_sketches-1.10/Atmega_Board_Programmer/Atmega_Board_Programmer.ino:112:0: bootloader_lilypad328.h:5:53: error: variable 'ATmegaBOOT_168_atmega328_pro_8MHz_hex' must be const in order to be put into read-only section by means of 'attribute((progmem))' byte PROGMEM ATmegaBOOT_168_atmega328_pro_8MHz_hex [] = { ^ In file included from /home/user/Arduino/arduino_sketches-1.10/Atmega_Board_Programmer/Atmega_Board_Programmer.ino:113:0: bootloader_atmega1280.h:5:45: error: variable 'ATmegaBOOT_168_atmega1280_hex' must be const in order to be put into read-only section by means of 'attribute((progmem))' byte PROGMEM ATmegaBOOT_168_atmega1280_hex [] = { ^ exit status 1 variable 'atmega168_optiboot' must be const in order to be put into read-only section by means of 'attribute((progmem))'
etc. Tested both v.1.11 and 1.10. other sketches compile just fine.
const byte PROGMEM needs to be used instead of byte PROGMEM in the bootloader_*.h codes