I have been developing for the 0- and 1-series ATtinies for some time and have been using avr-gcc under linux with device pack version 1.3.229. When setting up my build environment on a new computer I instead used the latest device pack with version 1.4.301. Compiling a super simple project for ATtiny202, without any hard coded addresses or such, then resulted in the output:
/home/d/devel/avr/toolchain/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld: address 0x803f80 of main.elf section `.data' is not within region `data'
/home/d/devel/avr/toolchain/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld: address 0x803f81 of main.elf section `.bss' is not within region `data'
/home/d/devel/avr/toolchain/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld: address 0x803f80 of main.elf section `.data' is not within region `data'
/home/d/devel/avr/toolchain/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld: address 0x803f81 of main.elf section `.bss' is not within region `data'
collect2: error: ld returned 1 exit status
I then installed and used the older device pack 1.3.229 and everything worked. Should this be a bug report to Microchip or am I missing something fundamental?
I use a make bash-script that looks like this:
#!/bin/bash
GCCPATH="$HOME/devel/avr/toolchain/avr8-gnu-toolchain-linux_x86_64/bin"
BPATH="$HOME/devel/avr/toolchain/Atmel.ATtiny_DFP.1.3.229.atpack_FILES/gcc/dev/attiny202"
IPATH="$HOME/devel/avr/toolchain/Atmel.ATtiny_DFP.1.3.229.atpack_FILES/include"
$GCCPATH/avr-gcc -Wall -mmcu=attiny202 -Os -B $BPATH -I $IPATH main.c -o main.elf
Thanks!