简体   繁体   中英

Arduino not compiling - bad CPU type in executable

Recently I was attempting to upload some code on my Arduino and got this error:

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

fork/exec /Users/Gu/Desktop/Every single yhing/coding stuff/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++: bad CPU type in executable
Error compiling for board Arduino/Genuino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.****

I quickly learned that is was due to the macOS update Catalina no longer supporting 32-bit applications and the avr-g++ keychain tool is run through a 32-bit process.

If anyone has any solution to fix this problem please assist me.

Had the same problem trying to get the IDE compiling for an ESP8266, I followed the thread from the Arduino Forums linked here:

https://forum.arduino.cc/index.php?topic=620175.0

Long story short, I updated the Arduino IDE to version 1.8.13 and it worked for me on Catalina.

For me it worked on Catalina by:

  • updating the Arduino IDE to 1.8.13
  • Inside the IDE, updating "Arduino AVR Boards" to the latest version (on a Mac, Tools -> Board: "xxxx" -> Boards Manager... -> Arduino AVR Boards)

Access to Boards Manager in the IDE Arduino AVR Boards update location

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM