Hi guys,
I'm trying to compile any sketch at all for arduino-nano, but i keep running into a compile error.
avr-g++: error: missing device or architecture after '-mmcu='
exit status 1
Error compiling for board Arduino Nano.
Windows 10
Arduino 1.8.5
I'm using the old ATmega28P-bootloader (old bootloader), and it used to work fine. I've obviously tied the newer version, but it won't upload the sketch (though it does compile). I've also tried different nana devices.
I'm guessing the compile command has been corrupted by some other program on my system (i write firmware for ARM based controllers, so i have lots of software installed).
I have no problem compiling for a standard Arduino Uno.
Any ideas?
Far outside my area of expertise but as far as I know that information is pulled from boards.txt
The original one for IDE 1.8.5 is located in C:\Program Files (x86)\Arduino\hardware\arduino\avr.
As you have the 'old bootloader' option, you have upgraded the board manager to 1.6.21 (or higher); you can find the boards.txt in C:\Users\yourUserName\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.XX (where XX is the last two digits of the board manager version).
For the Nano, the 1.6.21 boards.txt contains the following on my system
nano.name=Arduino Nano
nano.upload.tool=avrdude
nano.upload.protocol=arduino
nano.bootloader.tool=avrdude
nano.bootloader.unlock_bits=0x3F
nano.bootloader.lock_bits=0x0F
nano.build.f_cpu=16000000L
nano.build.board=AVR_NANO
nano.build.core=arduino
nano.build.variant=eightanaloginputs
## Arduino Nano w/ ATmega328P
## --------------------------
nano.menu.cpu.atmega328=ATmega328P
nano.menu.cpu.atmega328.upload.maximum_size=30720
nano.menu.cpu.atmega328.upload.maximum_data_size=2048
nano.menu.cpu.atmega328.upload.speed=115200
nano.menu.cpu.atmega328.bootloader.low_fuses=0xFF
nano.menu.cpu.atmega328.bootloader.high_fuses=0xDA
nano.menu.cpu.atmega328.bootloader.extended_fuses=0xFD
nano.menu.cpu.atmega328.bootloader.file=optiboot/optiboot_atmega328.hex
nano.menu.cpu.atmega328.build.mcu=atmega328p
## Arduino Nano w/ ATmega328P (old bootloader)
## --------------------------
nano.menu.cpu.atmega328old=ATmega328P (Old Bootloader)
nano.menu.cpu.atmega328old.upload.maximum_size=30720
nano.menu.cpu.atmega328old.upload.maximum_data_size=2048
nano.menu.cpu.atmega328old.upload.speed=57600
nano.menu.cpu.atmega328old.bootloader.low_fuses=0xFF
nano.menu.cpu.atmega328old.bootloader.high_fuses=0xDA
nano.menu.cpu.atmega328old.bootloader.extended_fuses=0xFD
nano.menu.cpu.atmega328old.bootloader.file=atmega/ATmegaBOOT_168_atmega328.hex
nano.menu.cpu.atmega328old.build.mcu=atmega328p
## Arduino Nano w/ ATmega168
## -------------------------
nano.menu.cpu.atmega168=ATmega168
nano.menu.cpu.atmega168.upload.maximum_size=14336
nano.menu.cpu.atmega168.upload.maximum_data_size=1024
nano.menu.cpu.atmega168.upload.speed=19200
nano.menu.cpu.atmega168.bootloader.low_fuses=0xff
nano.menu.cpu.atmega168.bootloader.high_fuses=0xdd
nano.menu.cpu.atmega168.bootloader.extended_fuses=0xF8
nano.menu.cpu.atmega168.bootloader.file=atmega/ATmegaBOOT_168_diecimila.hex
nano.menu.cpu.atmega168.build.mcu=atmega168
Compare this with your boards.txt; the line of interest is probably
nano.menu.cpu.atmega328.build.mcu=atmega328p
under the 'old bootloader'