Ro5bert / avra

Assembler for the Atmel AVR microcontroller family
GNU General Public License v2.0
156 stars 40 forks source link

8KB devices #63

Open PeterWurmi opened 1 year ago

PeterWurmi commented 1 year ago

Hello

I'm working with 8KB avr devices (4K words flash , currently m8515). I see this error on rjmp/rcall instructions:

Error : Relative address out of range (-2048 <= k <= 2047)

I think that is problem with avra assembler, that not support "wrap mode" (-w option) for 8KB devices like avrassembler from Atmel. But on 8KB devices entire flash memory can be reach by rjmp/rcall instructions by nature. But assembler must allow wrap relative addresss by 2K address space.

From manual AVRASM2: -w Wrap relative jumps. This option is obsoleted, because AVRASM2 automatically determines when to wrap relative jumps, based on program memory size. The option is recognized but ignored.

PeterWurmi commented 1 year ago

bug is in line 133 of avra-master/src/device.c

{"ATmega8515" , 8192,

corrected to 8K (4K words) should be: {"ATmega8515" , 4096,

words