Skip to content

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

@ChillarAnand

Description

@ChillarAnand

When running arduino from rasp pi cli, it is not passing mmcu.

Picked up JAVA_TOOL_OPTIONS: 
Loading configuration...
Initializing packages...
Preparing boards...
Verifying...
/home/pi/projects/vendor/arduino/arduino-builder -dump-prefs -logger=machine -hardware /home/pi/projects/vendor/arduino/hardware -tools /home/pi/projects/vendor/arduino/tools-builder -tools /home/pi/projects/vendor/arduino/hardware/tools/avr -built-in-libraries /home/pi/projects/vendor/arduino/libraries -libraries /root/Arduino/libraries -fqbn=arduino:avr:mega -vid-pid=0X2341_0X0042 -ide-version=10804 -build-path /tmp/arduino_build_293002 -warnings=null -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=/home/pi/projects/vendor/arduino/hardware/tools/avr -prefs=runtime.tools.avr-gcc.path=/home/pi/projects/vendor/arduino/hardware/tools/avr -prefs=runtime.tools.arduinoOTA.path=/home/pi/projects/vendor/arduino/hardware/tools/avr -verbose /tmp/arduino.ino
/home/pi/projects/vendor/arduino/arduino-builder -compile -logger=machine -hardware /home/pi/projects/vendor/arduino/hardware -tools /home/pi/projects/vendor/arduino/tools-builder -tools /home/pi/projects/vendor/arduino/hardware/tools/avr -built-in-libraries /home/pi/projects/vendor/arduino/libraries -libraries /root/Arduino/libraries -fqbn=arduino:avr:mega -vid-pid=0X2341_0X0042 -ide-version=10804 -build-path /tmp/arduino_build_293002 -warnings=null -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=/home/pi/projects/vendor/arduino/hardware/tools/avr -prefs=runtime.tools.avr-gcc.path=/home/pi/projects/vendor/arduino/hardware/tools/avr -prefs=runtime.tools.arduinoOTA.path=/home/pi/projects/vendor/arduino/hardware/tools/avr -verbose /tmp/arduino.ino
Using board 'mega' from platform in folder: /home/pi/projects/vendor/arduino/hardware/arduino/avr
Using core 'arduino' from platform in folder: /home/pi/projects/vendor/arduino/hardware/arduino/avr
Detecting libraries used...
"/home/pi/projects/vendor/arduino/hardware/tools/avr/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= -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   "-I/home/pi/projects/vendor/arduino/hardware/arduino/avr/cores/arduino" "-I/home/pi/projects/vendor/arduino/hardware/arduino/avr/variants/mega" "/tmp/arduino_build_293002/sketch/arduino.ino.cpp" -o "/dev/null"
Generating function prototypes...
"/home/pi/projects/vendor/arduino/hardware/tools/avr/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= -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   "-I/home/pi/projects/vendor/arduino/hardware/arduino/avr/cores/arduino" "-I/home/pi/projects/vendor/arduino/hardware/arduino/avr/variants/mega" "/tmp/arduino_build_293002/sketch/arduino.ino.cpp" -o "/tmp/arduino_build_293002/preproc/ctags_target_for_gcc_minus_e.cpp"
avr-g++: error: missing device or architecture after '-mmcu='

Here is the same working correctly from ubuntu cli

"/home/chillaranand/projects/vendor/arduino/hardware/tools/avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   "-I/home/chillaranand/projects/vendor/arduino/hardware/arduino/avr/cores/arduino" "-I/home/chillaranand/projects/vendor/arduino/hardware/arduino/avr/variants/mega" "/home/chillaranand/projects/vendor/arduino/hardware/arduino/avr/cores/arduino/WMath.cpp" -o "/tmp/arduino_build_178850/core/WMath.cpp.o"
"/home/chillaranand/projects/vendor/arduino/hardware/tools/avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections
 -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   "-I/home/chillaranand/projects/vendor/arduino/hardware/arduino/avr/cores/arduino" "-I/home/chillaranand/projects/vendor/arduino/hardware/arduino/avr/variants/mega" "/home/chillaranand/projects/vendor/arduino/hardware/arduino/avr/cores/arduino/WString.cpp" -o "/tmp/arduino_build_178850/core/WString.cpp.o"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: CLIThe Arduino IDE's command line interfaceType: InvalidOff topic for this repository, or a bug report determined to not actually represent a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions