Цитата(_Артём_ @ Nov 29 2012, 13:59)

Оно хочет чтобы вы сделали массив константным.
Код
const uint8_t tabl_rb1[] PROGMEM={0,2,3,7,3,1,5,4,6};
да я поставил const перед таблице , скомпилировал, выдало несколько новых ругательств:
Цитата
FlashRGB2.h:22:1: warning: optimization may eliminate reads and/or writes to register variables [-Wvolatile-register-var]
ну с этим более менее понятно , почему только оно раньше не вывдавалась и что с этим делать ? как я понимаю нужно включить указанный ключик
Вообще протокол компиляции меня както напряг.
Цитата
> "C:\Program Files\WinAVR-20100110\utils\bin\make.exe" all
-------- begin --------
avr-gcc (GCC) 4.7.2
Copyright © 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Compiling: FlashRGB2.c
avr-gcc -c -mmcu=attiny13a -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=FlashRGB2.lst -std=gnu99 -Wp,-M,-MP,-MT,FlashRGB2.o,-MF,.dep/FlashRGB2.o.d FlashRGB2.c -o FlashRGB2.o
In file included from FlashRGB2.c:10:0:
FlashRGB2.h:22:1: warning: optimization may eliminate reads and/or writes to register variables [-Wvolatile-register-var]
FlashRGB2.h:23:1: warning: optimization may eliminate reads and/or writes to register variables [-Wvolatile-register-var]
FlashRGB2.h:24:1: warning: optimization may eliminate reads and/or writes to register variables [-Wvolatile-register-var]
FlashRGB2.h:25:18: warning: call-clobbered register used for global register variable [enabled by default]
FlashRGB2.h:26:1: warning: optimization may eliminate reads and/or writes to register variables [-Wvolatile-register-var]
FlashRGB2.c:123:6: warning: return type of 'main' is not 'int' [-Wmain]
FlashRGB2.c: In function 'main':
FlashRGB2.c:199:11: warning: assignment discards 'const volatile' qualifier from pointer target type [enabled by default]
FlashRGB2.c:205:11: warning: assignment discards 'const volatile' qualifier from pointer target type [enabled by default]
FlashRGB2.c:217:11: warning: assignment discards 'const volatile' qualifier from pointer target type [enabled by default]
FlashRGB2.c:223:11: warning: assignment discards 'const volatile' qualifier from pointer target type [enabled by default]
FlashRGB2.c:235:11: warning: assignment discards 'const volatile' qualifier from pointer target type [enabled by default]
FlashRGB2.c:241:11: warning: assignment discards 'const volatile' qualifier from pointer target type [enabled by default]
FlashRGB2.c:258:9: warning: assignment discards 'const volatile' qualifier from pointer target type [enabled by default]
FlashRGB2.c:157:9: warning: 'GCnt' may be used uninitialized in this function [-Wmaybe-uninitialized]
FlashRGB2.c:156:13: warning: 'Cnt_0' may be used uninitialized in this function [-Wmaybe-uninitialized]
FlashRGB2.c:154:13: warning: 'Cnt_1' may be used uninitialized in this function [-Wmaybe-uninitialized]
Assembling: a_FlashRGB2.S
avr-gcc -c -mmcu=attiny13a -I. -x assembler-with-cpp -Wa,-adhlns=a_FlashRGB2.lst,-gstabs a_FlashRGB2.S -o a_FlashRGB2.o
Linking: FlashRGB2.elf
avr-gcc -mmcu=attiny13a -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=FlashRGB2.o -std=gnu99 -Wp,-M,-MP,-MT,FlashRGB2.o,-MF,.dep/FlashRGB2.elf.d FlashRGB2.o a_FlashRGB2.o --output FlashRGB2.elf -Wl,-Map=FlashRGB2.map,--cref -lm
Creating load file for Flash: FlashRGB2.hex
avr-objcopy -O ihex -R .eeprom FlashRGB2.elf FlashRGB2.hex
Creating load file for EEPROM: FlashRGB2.eep
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 -O ihex FlashRGB2.elf FlashRGB2.eep
c:\Program Files\WinAVR-20100110\bin\avr-objcopy.exe: --change-section-lma .eeprom=0x00000000 never used
Creating Extended Listing: FlashRGB2.lss
avr-objdump -h -S FlashRGB2.elf > FlashRGB2.lss
Creating Symbol Table: FlashRGB2.sym
avr-nm -n FlashRGB2.elf > FlashRGB2.sym
Converting to AVR Extended COFF: FlashRGB2.cof
avr-objcopy --debugging --change-section-address .data-0x800000 --change-section-address .bss-0x800000 --change-section-address .noinit-0x800000 --change-section-address .eeprom-0x810000 -O coff-ext-avr FlashRGB2.elf FlashRGB2.cof
avr-objcopy:FlashRGB2.cof: Invalid bfd target
avr-objcopy: --change-section-vma .eeprom+0xff7f0000 never used
avr-objcopy: --change-section-lma .eeprom+0xff7f0000 never used
avr-objcopy: --change-section-vma .noinit+0xff800000 never used
avr-objcopy: --change-section-lma .noinit+0xff800000 never used
avr-objcopy: --change-section-vma .bss+0xff800000 never used
avr-objcopy: --change-section-lma .bss+0xff800000 never used
avr-objcopy: --change-section-vma .data+0xff800000 never used
avr-objcopy: --change-section-lma .data+0xff800000 never used
make: *** [extcoff] Error 1
> Process Exit Code: 2
> Time Taken: 00:03
хотя hex на выходе вывалился, неясно
Цитата
make: *** [extcoff] Error 1
в чем ошибка ?
п.с. неприятно удивил размер , прошивка получилась на 24 слова больше !!