简体   繁体   English

Arduino 未编译 - 可执行文件中的 CPU 类型错误

[英]Arduino not compiling - bad CPU type in executable

Recently I was attempting to upload some code on my Arduino and got this error:最近我试图在我的 Arduino 上上传一些代码并得到这个错误:

****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.我很快了解到这是由于 macOS 更新 Catalina 不再支持 32 位应用程序,并且 avr-g++ 钥匙串工具通过 32 位进程运行。

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:在尝试为 ESP8266 编译 IDE 时遇到了同样的问题,我遵循了此处链接的 Arduino 论坛中的线程:

https://forum.arduino.cc/index.php?topic=620175.0 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.长话短说,我将 Arduino IDE 更新到版本1.8.13 ,它在 Catalina 上对我有用。

For me it worked on Catalina by:对我来说,它通过以下方式在 Catalina 上工作:

  • updating the Arduino IDE to 1.8.13将 Arduino IDE 更新到 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)在 IDE 内部,将“Arduino AVR 板”更新到最新版本(在 Mac 上,工具 -> 板:“xxxx” -> 板管理器... -> Arduino AVR 板)

Access to Boards Manager in the IDE Arduino AVR Boards update location在 IDE Arduino AVR 板更新位置访问板管理器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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