Arduino版本:1.8.2
Max OS X版本:10.12.3
arduino-builder -compile -hardware /Applications/Arduino.app/Contents/Java/hardware -tools /Applications/Arduino.app/Contents/Java/tools -fqbn arduino:avr:uno -verbose SimpleTimer.ino
错误:
fork/exec /bin/avr-g++: no such file or directory
答案 0 :(得分:1)
在上述命令工作之前,我必须进行一些修复。
在档案中
/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/platform.txt
更改此属性:
compiler.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/
在档案/Applications/Arduino.app//Contents/Java/hardware/platform.txt
中
更改此属性:
tools.ctags.path=/Applications/Arduino.app/Contents/Java/tools-builder/ctags/5.8-arduino11
信用: https://github.com/Sloeber/arduino-eclipse-plugin/issues/236
答案 1 :(得分:1)
Marcello的回答对我有用,但我会以包装脚本的形式提出一个更方便的解决方案来完成所有肮脏的工作:
#!/usr/bin/env bash
arduino-builder \
-compile \
-hardware /Applications/Arduino.app/Contents/Java/hardware \
-tools /Applications/Arduino.app/Contents/Java/tools \
-fqbn arduino:avr:uno \
-libraries ../libraries/ \
-prefs=compiler.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/ \
-prefs=tools.ctags.path=/Applications/Arduino.app/Contents/Java/tools-builder/ctags/5.8-arduino11 \
-verbose \
SimpleTimer.ino