[Solved] Arduino Nano - missing argument to '-mmcu='

Hi,

I joined the beta for Arduino Create last night, and had no issues with Arduino Uno coding, and adding libraries. I tried importing some code and compiling for Arduino Nano this morning on another machine, and ran into this error:

"/opt/tools/avr-gcc/4.8.1-arduino5/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu= -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-I/opt/cores/arduino/avr/cores/arduino" "-I/opt/cores/arduino/avr/variants/eightanaloginputs" "/tmp/tmp/webide_tmp670672/Blink/sketch/Blink.ino.cpp" -o "/tmp/tmp/webide_tmp670672/Blink/preproc/ctags_target_for_gcc_minus_e.cpp"

avr-g++: error: missing argument to '-mmcu='

I noticed that another person had reported the error here, and it was marked as being resolved here. I have only just installed the Arduino Create agent (using a freshly downloaded "ArduinoCreateAgent-1.1-windows-installer.exe"), and the Agent is reporting itself to be v1.0.21.

Any ideas as to what is going on, or am I just stuck between updates :slight_smile:

Pete


OS: Windows 10 Pro x64
Browser: Chrome v48

Thanks for the report, it was indeed fixed but appears to be broken again, we will look into it right away and let you know.

Thanks for your patience!

@matteosuppo fixed it!

Try now and let us know if this still happens :slight_smile:

@00alis Sorry for the delay. Yes, that fixed it... works great now. Didn't have to re-install or update anything - just picked Arduino Nano from the compile targets list and it worked perfectly this time :wink:

Off to check about another bug that has since surfaced :wink:

I have the same problem with the nano board. I installed the driver SW an the program (blink) compiles fine but it will not upload. It just hangs.

I just tried an upload on nano and worked fine. Could you please give us more details about browser, OS and output / errors you get? You could check the js console of your browser also

I am using Chrome V52.02743.116. I am using the program Blink. It compiles fine but when I try to upload the display just says “Busy” and locks up.

I verified that the COM port is active by looking at Control Panel. I verified that it is working by testing it with a Desktop version of Arduino.

One observation, when I select the Arduino Nano from the pull down the software displays an X over the text and states it can not connect.

I did run ArduinoCreateAgent-1.1-windows-installer without any issues.

Any ideas on how to debug this would be great.

Thank you,
Rob

Since the Arduino Nano is pretty old when you plug it in it is not automatically recognised by the system.
Try to reselect it again as it seems you metadata got corrupted from some reason.

  1. connect your Nano
  2. click on the board dropdown
  3. click on the last item: Select other board and port
  4. pick the Arduino Nano and the port from the list
  5. try to upload

Let me know if this fixed the problem :slight_smile:

I have tried running on three different computers. I turned on Verbose during the compile and got the following. I tried a Nano, an Uno and a Mega with no success. Any ideas on how to fix this?

I could not post the whole output because it exceeded 9000 characters.

Thank you,
Rob

Using board ‘nano’ from platform in folder: /opt/cores/arduino/avr

Using core ‘arduino’ from platform in folder: /opt/cores/arduino/avr

Detecting libraries used…

“/opt/tools/avr-gcc/4.9.2-atmel3.5.3-arduino2/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR “-I/opt/cores/arduino/avr/cores/arduino” “-I/opt/cores/arduino/avr/variants/eightanaloginputs” “/tmp/tmp/webide_tmp989192/Blink/sketch/Blink.ino.cpp” -o “/dev/null”

“/opt/tools/avr-gcc/4.9.2-atmel3.5.3-arduino2/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR “-I/opt/cores/arduino/avr/cores/arduino” “-I/opt/cores/arduino/avr/variants/eightanaloginputs” “/tmp/tmp/webide_tmp989192/Blink/sketch/Blink.ino.cpp” -o “/dev/null”

Generating function prototypes…

“/opt/tools/avr-gcc/4.9.2-atmel3.5.3-arduino2/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR “-I/opt/cores/arduino/avr/cores/arduino” “-I/opt/cores/arduino/avr/variants/eightanaloginputs” “/tmp/tmp/webide_tmp989192/Blink/sketch/Blink.ino.cpp” -o “/tmp/tmp/webide_tmp989192/Blink/preproc/ctags_target_for_gcc_minus_e.cpp”

“/opt/arduino-builder/tools/ctags/5.8-arduino10/ctags” -u --language-force=c++ -f - --c+±kinds=svpf --fields=KSTtzns --line-directives “/tmp/tmp/webide_tmp989192/Blink/preproc/ctags_target_for_gcc_minus_e.cpp”

Compiling sketch…

“/opt/tools/avr-gcc/4.9.2-atmel3.5.3-arduino2/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR “-I/opt/cores/arduino/avr/cores/arduino” “-I/opt/cores/arduino/avr/variants/eightanaloginputs” “/tmp/tmp/webide_tmp989192/Blink/sketch/Blink.ino.cpp” -o “/tmp/tmp/webide_tmp989192/Blink/sketch/Blink.ino.cpp.o”

Compiling libraries…

Compiling core…

“/opt/tools/avr-gcc/4.9.2-atmel3.5.3-arduino2/bin/avr-gcc” -c -g -x assembler-with-cpp -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR “-I/opt/cores/arduino/avr/cores/arduino” “-I/opt/cores/arduino/avr/variants/eightanaloginputs” “/opt/cores/arduino/avr/cores/arduino/wiring_pulse.S” -o “/tmp/tmp/webide_tmp989192/Blink/core/wiring_pulse.S.o”

“/opt/tools/avr-gcc/4.9.2-atmel3.5.3-arduino2/bin/avr-gcc” -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR “-I/opt/cores/arduino/avr/cores/arduino” “-I/opt/cores/arduino/avr/variants/eightanaloginputs” “/opt/cores/arduino/avr/cores/arduino/WInterrupts.c” -o “/tmp/tmp/webide_tmp989192/Blink/core/WInterrupts.c.o”

“/opt/tools/avr-gcc/4.9.2-atmel3.5.3-arduino2/bin/avr-gcc” -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR “-I/opt/cores/arduino/avr/cores/arduino” “-I/opt/cores/arduino/avr/variants/eightanaloginputs” “/opt/cores/arduino/avr/cores/arduino/hooks.c” -o “/tmp/tmp/webide_tmp989192/Blink/core/hooks.c.o”

“/opt/tools/avr-gcc/4.9.2-atmel3.5.3-arduino2/bin/avr-gcc” -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR “-I/opt/cores/arduino/avr/cores/arduino” “-I/opt/cores/arduino/avr/variants/eightanaloginputs” “/opt/cores/arduino/avr/cores/arduino/wiring.c” -o “/tmp/tmp/webide_tmp989192/Blink/core/wiring.c.o”

“/opt/tools/avr-gcc/4.9.2-atmel3.5.3-arduino2/bin/avr-gcc” -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR “-I/opt/cores/arduino/avr/cores/arduino” “-I/opt/cores/arduino/avr/variants/eightanaloginputs” “/opt/cores/arduino/avr/cores/arduino/wiring_analog.c” -o “/tmp/tmp/webide_tmp989192/Blink/core/wiring_analog.c.o”

Could you please paste the last part of the output? I think the error message is in the last rows

if you want you can copy/paste the whole output on https://gist.github.com/ and just share the URL with us, sorry for these limitations of the Forum

I have very similar problem. I am using RobotDyn Nano, successfully tested with Blink on desktop editor. In web editor when I select Arduino Nano and COM4 it keeps telling me “Please reselect the board from the dropdown” and does not upload.

Any ideas on how to proceed?

OS: Windows 10 Pro x64
Browser: Chrome v53.0.2785.116 m

Does the issue occurs also if you press 'change' and reselect the board from the popup list?

Thanks for the reply. Unfortunately does. I’ve checked it many times. When I press change, I select COM4 and Arduino Nano and OK. Dropdown says Board as Arduino Nano but the red message on the bottom keeps telling me “Please reselect the board from the dropdown”. When I press upload, nothing happens.

Can you please try to empty your browser cache or using incognito window?

I tried in Chrome incognito window. The only difference was that it took longer (about a minute or two) and then again the same error, see the log below. I do not understand much the log but I noticed there is
"arduino:avr:nano:cpu=atmega328" in it and I do have atmega168 for sure. Maybe it is the issue? If so how can I change it?

Thanks.

arduino-builder/arduino-builder -compile -core-api-version 10611 -build-path /tmp/300287736 -hardware arduino-builder/hardware -hardware arduino-builder/packages/cores -tools arduino-builder/tools -tools arduino-builder/packages/tools -built-in-libraries arduino-builder/latest -libraries /tmp/658418877/pinned -libraries /tmp/658418877/custom -fqbn arduino:avr:nano:cpu=atmega328 -verbose=false /tmp/658418877/Blink

WARNING: Category '' in library ArduinoUnit is not valid. Setting to 'Uncategorized'

WARNING: Category '' in library Parse Arduino SDK is not valid. Setting to 'Uncategorized'

WARNING: Category '' in library Pushetta is not valid. Setting to 'Uncategorized'

WARNING: Category '' in library SparkFun MG2639 CellShield is not valid. Setting to 'Uncategorized'

WARNING: Category '' in library StereoSID is not valid. Setting to 'Uncategorized'

WARNING: Category 'Robotics' in library Svante is not valid. Setting to 'Uncategorized'

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xb9

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xb9

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xb9

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xb9

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xb9

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xb9

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xb9

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xb9

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xb9

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xb9

Could not program the board

Ah, yes, that's probably the issue. By default we select the atmega328 and there's still no way to select an atmega168.

Since there are are lots of boards with multiple cpus we'll add the possibility to change the flavour in the future.

Sorry for the inconvenience

Sorry @Indy7 we are not supporting ATMega168 at the moment.

I see... Do you know, by any chance, if it will be weeks, months or years until you support ATMega168?

Thanks.

We are releasing an experimental version with the option to choose the ATMega168 in the next few days.

Since it is such an old processor we are not going to be able to do extensive testing. I will let you know when it is available and it would be great if you let us know if it works!