Ro5bert / avra

Assembler for the Atmel AVR microcontroller family

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Avra 1.4.0 does not generate error for RAM overlap

Nevada317 opened this issue · comments

While compiling test case code, no error arise in 1.4.0, while segment overlap occur in .DSEG.

Test case
$ cat main.asm

.include "m162def.inc"
.dseg
.org 0x0100
.BYTE 1000
.org 0x0300
.BYTE 10

.cseg
.org 0
nop
rjmp (PC-1)

.BYTE 1000 here overlaps with next segment, as it ends at 0x04E7, while another segment starts at 0x0300.

avra 1.3.0
Everything OK, error detected:

Pass 1...
Error: Overlapping Data-segments :
Start = 0x0100, End = 0x04E7, Length = 0x03E8
Start = 0x0300, End = 0x0309, Length = 0x000A
Please check your .ORG directives !

avra 1.4.0
Error not detected:

Pass 1...
Pass 2...
done

Assembly complete with no errors.
Segment usage:
Code : 2 words (4 bytes)
Data : 1010 bytes
EEPROM : 0 bytes

I've tried also to use -O e and .nooverlap with no luck for RAM. Looks like RAM is ignored here.
I use .ORG directives pretty frequently to align buffers to 256-byte boundaries, so this overlap test is important for me.

Is there any way anybody can fix this? I'll try to bisect, but currently my workload is high enough, so it will take a long time.

Looks like bug introduced in:
3e0d391

Commit 97297fe - everything is fine

Pull request created: #15