Boards definition at issue: Arduino AVR boards/Arduino Pro or Pro Mini (version 1.8.6)
Bootloaders location:C:
Users\xxxx\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\bootloaders\atmega
Boards.txt location: C:\Users\xxxx\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
I am trying to add a Pro Mini atmega328 16MHz board with an Optiboot bootloader installed. The standard Pro Mini bootloader for the 16MHz hardware version is ATmegaBOOT_168_atmega328.hex (in that bootloader folder).
I added the Optiboot bootloader for atmega328 in that folder: optiboot_atmega328.hex
And I modified the board.txt text as follows (to save space below only the original Pro Mini 328 16MHz text is shown, and below that the added definition for the Pro Mini atmeage328 16MHz using Optiboot):
##############################################################
pro.name=Arduino Pro or Pro Mini
pro.upload.tool=avrdude
pro.upload.protocol=arduino
pro.bootloader.tool=avrdude
pro.bootloader.unlock_bits=0x3F
pro.bootloader.lock_bits=0x0F
pro.build.board=AVR_PRO
pro.build.core=arduino
pro.build.variant=eightanaloginputs
## Arduino Pro Mini (5V, 16 MHz) w/ ATmega328
## -------------------------------------------------
pro.menu.cpu.16MHzatmega328=ATmega328 (5V, 16 MHz, old boot)
pro.menu.cpu.16MHzatmega328.upload.maximum_size=30720
pro.menu.cpu.16MHzatmega328.upload.maximum_data_size=2048
pro.menu.cpu.16MHzatmega328.upload.speed=57600
pro.menu.cpu.16MHzatmega328.bootloader.low_fuses=0xFF
pro.menu.cpu.16MHzatmega328.bootloader.high_fuses=0xDA
pro.menu.cpu.16MHzatmega328.bootloader.extended_fuses=0xFD
pro.menu.cpu.16MHzatmega328.bootloader.file=atmega/ATmegaBOOT_168_atmega328.hex
pro.menu.cpu.16MHzatmega328.build.mcu=atmega328p
pro.menu.cpu.16MHzatmega328.build.f_cpu=16000000L
## Arduino Pro Mini (5V, 16 MHz) w/ ATmega328 w/ Optiboot
## -------------------------------------------------
pro.menu.cpu.16MHzatmega328Optiboot=ATmega328 (5V, 16 MHz, Optiboot)
pro.menu.cpu.16MHzatmega328.upload.maximum_size=32256
pro.menu.cpu.16MHzatmega328.upload.maximum_data_size=2048
pro.menu.cpu.16MHzatmega328.upload.speed=57600
pro.menu.cpu.16MHzatmega328.bootloader.low_fuses=0xFF
pro.menu.cpu.16MHzatmega328.bootloader.high_fuses=0xDA
pro.menu.cpu.16MHzatmega328.bootloader.extended_fuses=0xFD
pro.menu.cpu.16MHzatmega328.bootloader.file=atmega/optiboot_atmega328.hex
pro.menu.cpu.16MHzatmega328.build.mcu=atmega328p
pro.menu.cpu.16MHzatmega328.build.f_cpu=16000000L
When compiling for the standard bootloader version all is ok. When compiling for the Optiboot version this error is show in verbose output:
avr-g++: error: missing device or architecture after '-mmcu='
exit status 1
Error for compiling board Arduino Pro or Pro Mini
Knowing that I added the correct Optiboot bootloader in the bootloaders\atmega\ location,
what is wrong in my new boards definition?