问题描述
最近我正尝试在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.****
我很快了解到,这是由于macOS更新Catalina不再支持32位应用程序,而avr-g ++钥匙串工具是通过32位进程运行的。
如果有人有解决此问题的解决方案,请协助我。
解决方法
在尝试为ESP8266进行IDE编译时遇到了同样的问题,我关注了Arduino论坛中的链接:
https://forum.arduino.cc/index.php?topic=620175.0
长话短说,我将Arduino IDE更新为1.8.13
版,并且在Catalina上对我有用。
对我来说,它在Catalina上的工作方式是:
- 将Arduino IDE更新到1.8.13
- 在IDE内,将“ Arduino AVR板”更新到最新版本(在Mac上,工具->板:“ xxxx”->板管理器...-> Arduino AVR板)
Access to Boards Manager in the IDE Arduino AVR Boards update location