问题描述
****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 @R_654_4045@ion 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