Go Down

Topic: Problem verifying/uploading through command line with arduino --verify --upload (Read 457 times) previous topic - next topic

avalero

Hi

I am trying to verify/upload to a Mega 2560 from command line executing

./arduino --verify --board "arduino:avr:mega" ./examples/01.Basics/Blink/Blink.ino

but I get the following error

avr-g++: error: missing device or architecture after '-mmcu=' .


Any help?

Is there a list of the --board parameter boards?

Thanks!!

Alberto.

pert

You need to specify the complete fqbn (fully qualified board name). The easiest way to find this is to:
  • (in the Arduino IDE) File > Preferences > Show verbose output during: > compilation (check) > OK
  • Sketch > Verify/compile
  • After the compilation finishes, scroll all the way to the top of the black console window at the bottom of the Arduino IDE window. As part of the first line you will see something that looks like this:

Code: [Select]
-fqbn=arduino:avr:mega:cpu=atmega2560
So in this example your fqbn to use with the --board option of Arduino CLI is arduino:avr:mega:cpu=atmega2560. Thus the correct command would be:
Code: [Select]
./arduino --verify --board "arduino:avr:mega:cpu=atmega2560" ./examples/01.Basics/Blink/Blink.ino

Go Up