Arduind board programmer won't compile

Hi

I have the Arduino bard programmer by Nick Gammon and it won’t compile o IDE 2.3.7.

Is there an new version that will work .

This is the compilation error

In file included from C:\Work 2024\Desktop Folders\arduino files\Atmega_Board_Programmer\Atmega_Board_Programmer.ino:120:0:
C:\Work 2024\Desktop Folders\arduino files\Atmega_Board_Programmer\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 C:\Work 2024\Desktop Folders\arduino files\Atmega_Board_Programmer\Atmega_Board_Programmer.ino:121:0:
C:\Work 2024\Desktop Folders\arduino files\Atmega_Board_Programmer\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 C:\Work 2024\Desktop Folders\arduino files\Atmega_Board_Programmer\Atmega_Board_Programmer.ino:122:0:
C:\Work 2024\Desktop Folders\arduino files\Atmega_Board_Programmer\bootloader_atmega2560_v2.h:50:41: error: variable 'atmega2560_bootloader_hex' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
 byte PROGMEM atmega2560_bootloader_hex [] = {
                                         ^
In file included from C:\Work 2024\Desktop Folders\arduino files\Atmega_Board_Programmer\Atmega_Board_Programmer.ino:123:0:
C:\Work 2024\Desktop Folders\arduino files\Atmega_Board_Programmer\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 C:\Work 2024\Desktop Folders\arduino files\Atmega_Board_Programmer\Atmega_Board_Programmer.ino:124:0:
C:\Work 2024\Desktop Folders\arduino files\Atmega_Board_Programmer\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 C:\Work 2024\Desktop Folders\arduino files\Atmega_Board_Programmer\Atmega_Board_Programmer.ino:125:0:
C:\Work 2024\Desktop Folders\arduino files\Atmega_Board_Programmer\bootloader_atmega1280.h:5:39: error: variable 'optiboot_atmega1280_hex' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
 byte PROGMEM optiboot_atmega1280_hex [] = {
                                       ^
In file included from C:\Work 2024\Desktop Folders\arduino files\Atmega_Board_Programmer\Atmega_Board_Programmer.ino:126:0:
C:\Work 2024\Desktop Folders\arduino files\Atmega_Board_Programmer\bootloader_atmega8.h:5:27: error: variable 'atmega8_hex' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
 byte PROGMEM atmega8_hex [] = {
                           ^
exit status 1

Compilation error: variable 'atmega168_optiboot' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

Hi @ullisees.

Yes. I'll provide instructions you can follow to obtain it:

  1. Click the following link to open the homepage of the GitHub repository where Nick Gammon hosts this sketch in your web browser:
    https://github.com/nickgammon/arduino_sketches
  2. Click the "Code ▾" button you see on that page.
  3. Select Download ZIP from the menu.
    A download of the ZIP file of the project will start.
  4. Wait for the download to finish.
  5. Extract the downloaded file to any convenient location on your computer
  6. Start Arduino IDE.
  7. Select File > Open... from the Arduino IDE menus.
    The "Open" dialog will open.
  8. Navigate to the folder you extracted from the ZIP file in the "Open" dialog.
  9. Navigate to the Atmega_Board_Programmer subfolder.
  10. Select the file Atmega_Board_Programmer.ino
  11. Click the "Open" button at the bottom of the "Open" dialog.

You should now be able to compile the sketch without encountering any errors.


FYI, here is the change that fixed the error:

Thank you. Just tried it and it now compiles in IDE 2.3.7

You are welcome. I'm glad it is working now.

Regards, Per