I've only been using Atmel stuff for a couple of weeks, so I'm still not up to speed on them (been a PIC man, man and boy !).
I'm using AVR studio + AVR GCC + STK500 ISP to develop some code for an ATtiny24V, which is just about complete, so far so good :)
When I include a LUT (Look up table):
static const char Data_Table[ ] =
0, 94, 188, 226, 97, 63, 221, 131, 194, 156, 126, 32, 163, 253, 31, 65.... etc
OR I include :
#define HEADER "TEST_HEADER"
It also seems to copy the data into RAM space (I can see it when I look via AVR Studio), and it leaves no room for the stack + the one or two variables I'm actually using (see below). I don't get why it says that Data=220% (and it does crash) but warnings=0.
OK, the compiler might want to use the RAM to improve the running speed, but how do I turn it off ? I've tried all the -0x options I can see. Any idea ? Suggestions ?
Build started 31.10.2008 at 13:22:47
avr-gcc.exe -mmcu=attiny24 -Wall -gdwarf-2 -std=gnu99 -DF_CPU=8000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT main.o -MF dep/main.o.d -c ../main.c
avr-gcc.exe -mmcu=attiny24 -Wl,-Map=WPTT.map main.o -o WPTT.elf
avr-objcopy -O ihex -R .eeprom WPTT.elf WPTT.hex
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O ihex WPTT.elf WPTT.eep || exit 0
avr-objdump -h -S WPTT.elf > WPTT.lss
AVR Memory Usage
Program: 1448 bytes (70.7% Full)
(.text + .data + .bootloader)
Data: 282 bytes (220.3% Full)
(.data + .bss + .noinit)
Build succeeded with 0 Warnings...