Upload problem from mac

Hi

I get this error msg when I try to upload bootloader from my macbook pro with MacOS Catalina ver 10.15.4

Arduino:1.8.12 (Mac OS X), Kort"Arduino/Genuino Uno"

java.io.IOException: Cannot run program “/Users/tkh/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino14/bin/avrdude”: error=86, Bad CPU type in executable
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at java.lang.Runtime.exec(Runtime.java:485)
at processing.app.helpers.ProcessUtils.exec(ProcessUtils.java:11)
at cc.arduino.packages.Uploader.executeUploadCommand(Uploader.java:129)
at cc.arduino.packages.uploaders.SerialUploader.runCommand(SerialUploader.java:383)
at cc.arduino.packages.uploaders.SerialUploader.burnBootloader(SerialUploader.java:372)
at processing.app.Editor.lambda$handleBurnBootloader$61(Editor.java:2366)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: error=86, Bad CPU type in executable
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
… 8 more
Feil oppstod under skriving av oppstartslaster.

I don’t have a clue, could not find anything in the forums either.

Thanks in advance.

Trond Kjetil

This is caused by you using an outdated version of Arduino AVR Boards.

Do this:

  • Tools > Board > Boards Manager
  • Wait for the download to finish.
  • From the list of platforms, click on "Arduino AVR Boards"
  • Click the "Update" button.
  • Wait for the update to finish.
  • Click the "Close" button.

After that, the error should no longer occur.

Had it been that well..

I did check boards manager Arduino ver 1.6.23 in use, last version i think. I even tried a clean install of Arduino with no luck.

I get the same results trying to upload bootloader. (But bootloader is ok, I think, I could manage to upload sketches to the ardoino from a small linux netbook. Also there I got error while trying to upload the bootloader)

Anyway, I get this error while trying to upload a sketch from the mac:

Arduino: 1.8.12 (Mac OS X), Board: "Arduino/Genuino Uno"

/Applications/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/tkh/Library/Arduino15/packages -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/tkh/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/tkh/Documents/Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10812 -build-path /var/folders/hn/yfnc06kd58dcxkrpxxqlcws00000gn/T/arduino_build_855889 -warnings=none -build-cache /var/folders/hn/yfnc06kd58dcxkrpxxqlcws00000gn/T/arduino_cache_994117 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/Users/tkh/Library/Arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2 -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=/Users/tkh/Library/Arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2 -prefs=runtime.tools.avrdude.path=/Users/tkh/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino14 -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=/Users/tkh/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino14 -prefs=runtime.tools.arduinoOTA.path=/Users/tkh/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.2.1 -prefs=runtime.tools.arduinoOTA-1.2.1.path=/Users/tkh/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.2.1 -verbose /Applications/Arduino.app/Contents/Java/libraries/LiquidCrystal/examples/HelloWorld/HelloWorld.ino
/Applications/Arduino.app/Contents/Java/arduino-builder -compile -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/tkh/Library/Arduino15/packages -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/tkh/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/tkh/Documents/Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10812 -build-path /var/folders/hn/yfnc06kd58dcxkrpxxqlcws00000gn/T/arduino_build_855889 -warnings=none -build-cache /var/folders/hn/yfnc06kd58dcxkrpxxqlcws00000gn/T/arduino_cache_994117 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/Users/tkh/Library/Arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2 -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=/Users/tkh/Library/Arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2 -prefs=runtime.tools.avrdude.path=/Users/tkh/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino14 -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=/Users/tkh/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino14 -prefs=runtime.tools.arduinoOTA.path=/Users/tkh/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.2.1 -prefs=runtime.tools.arduinoOTA-1.2.1.path=/Users/tkh/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.2.1 -verbose /Applications/Arduino.app/Contents/Java/libraries/LiquidCrystal/examples/HelloWorld/HelloWorld.ino
Using board 'uno' from platform in folder: /Users/tkh/Library/Arduino15/packages/arduino/hardware/avr/1.8.1
Using core 'arduino' from platform in folder: /Users/tkh/Library/Arduino15/packages/arduino/hardware/avr/1.8.1
Detecting libraries used...
/Users/tkh/Library/Arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10812 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Users/tkh/Library/Arduino15/packages/arduino/hardware/avr/1.8.1/cores/arduino -I/Users/tkh/Library/Arduino15/packages/arduino/hardware/avr/1.8.1/variants/standard /var/folders/hn/yfnc06kd58dcxkrpxxqlcws00000gn/T/arduino_build_855889/sketch/HelloWorld.ino.cpp -o /dev/null
fork/exec /Users/tkh/Library/Arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2/bin/avr-g++: bad CPU type in executable
Error compiling for board Arduino/Genuino Uno.

Nope, 1.6.23 is outdated - it still uses 32-bit compiler and avrdude, which Catalina dropped support for. You need to update the avr board package to 1.8.2, which will pull in the 64-bit versions of compiler and avrdude.

Ok then. I could not see any update of the board package so I just deleted it. After that it showed ver 1.8.1 and now it works. (But no upgrade to 1.8.2, btw)

Thanks anyway, now it is working :slight_smile: