很久没用Arduino,还停留在1.8.5版本。今天发现连示例文件都无法编译,报错如下
fork/exec /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++: bad CPU type in executable
查了资料发现是因为Mac系统升级到了Catalina版本,与Arduino1.8.5不兼容。解决办法是下载1.8.10的新版Arduino,编译通过。
下载链接http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-8976-BUILD-869-macosx.zip