编译此示例Teensy源文件

时间:2011-10-10 23:28:43

标签: compilation arduino microcontroller

我似乎无法编译Teensy 2.0的blinky.c程序。这是错误:

avr-gcc -c -mmcu=atmega32u4         -I. -gdwarf-2 -DF_CPU=16000000UL -Os -funsigned-char -funsigned-bitfields -ffunction-sections -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=./blinky.lst  -std=gnu99 -MMD -MP -MF .dep/blinky.o.d blinky.c -o blinky.o
blinky.c: In function 'main':
blinky.c:69:12: error: variable '__c' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
blinky.c:72:11: error: variable '__c' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
blinky.c: In function 'morse_character':
blinky.c:83:3: error: variable '__c' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
blinky.c:88:3: error: variable '__c' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
blinky.c:90:3: error: variable '__c' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
blinky.c:93:2: error: variable '__c' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
blinky.c:100:4: error: variable '__c' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
blinky.c:103:4: error: variable '__c' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
blinky.c:110:2: error: variable '__c' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
blinky.c: In function 'morse_P':
blinky.c:125:2: error: variable '__c' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
make: *** [blinky.o] Error 1

0 个答案:

没有答案