开发者

Compiling this sample Teensy source file

开发者 https://www.devze.com 2023-04-11 21:27 出处:网络
I can\'t seem to get the blinky.c program for Teensy 2.0 to compile. Here is the error: avr-gcc -c -mmcu=atmega32u4-I. -gdwarf-2 -DF_CPU=16000000UL -Os -funsigned-char -funsigned-bitfields -ffunction

I can't seem to get the blinky.c program for Teensy 2.0 to compile. Here is the error:

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: vari开发者_如何学编程able '__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

精彩评论

暂无评论...
验证码 换一张
取 消