【发布时间】:2013-11-28 11:15:40
【问题描述】:
我在下面收到此错误,我找不到解决方案。有谁知道如何 修复这个错误?
rafael@ubuntu:~/avr/projeto$ clang -fsyntax-only -Os -I /usr/lib/avr/include -D__AVR_ATmega328P__ -DARDUINO=100 -Wno-ignored-attributes -Wno-attributes serial_tree.c
In file included from serial_tree.c:3:
In file included from /usr/lib/avr/include/util/delay.h:43:
/usr/lib/avr/include/util/delay_basic.h:108:5: error: invalid output
constraint
'=w' in asm
: "=w" (__count)
^
1 error generated.
【问题讨论】:
-
This answer 有点相关。
-
命令的哪一部分为 AVR 编译它?
-
clang 的主线版本(或者更确切地说,它的后端 LLVM)不支持为 Arduino 上使用的 AVR 微控制器编译。您是否尝试过使用
avr-gcc代替?该版本作为 Arduino IDE 的一部分提供。 -
他正在使用'-fsyntax-only',所以这显然是一些自动完成工具。
-
貌似和clangs内部汇编有关,How to switch off LLVM's integrated assembler?有帮助吗?