Ro5bert / avra

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

'max_errors' flag does not set #57

Open waxters-osu opened 1 year ago

waxters-osu commented 1 year ago

The following log illustrates the issue.

[src]$ ../../avra/src/avra LCDDriver.asm --max_errors 100
AVRA: advanced AVR macro assembler (version 1.4.2)
Pass 1...
Pass 2...
m32U4def.inc(44) : PRAGMA PARTINC directive currently ignored
m32U4def.inc(48) : PRAGMA AVRPART directive currently ignored
m32U4def.inc(53) : PRAGMA AVRPART directive currently ignored
m32U4def.inc(1301) : PRAGMA AVRPART directive currently ignored
m32U4def.inc(1302) : PRAGMA AVRPART directive currently ignored
m32U4def.inc(1303) : PRAGMA AVRPART directive currently ignored
m32U4def.inc(1304) : PRAGMA AVRPART directive currently ignored
LCDDriver.asm(72) : Error   : Garbage in operand (mpr)
LCDDriver.asm(72) : Error   : No register associated with mpr
LCDDriver.asm(91) : Error   : Garbage in operand (mpr)
LCDDriver.asm(91) : Error   : No register associated with mpr
LCDDriver.asm(91) : Error   : ldi can only use a high register (r16 - r31)
LCDDriver.asm(92) : Error   : Garbage in operand (mpr)
LCDDriver.asm(92) : Error   : No register associated with mpr
LCDDriver.asm(93) : Error   : Garbage in operand (mpr)
LCDDriver.asm(93) : Error   : No register associated with mpr
LCDDriver.asm(93) : Error   : ldi can only use a high register (r16 - r31)
LCDDriver.asm(93) : Maximum error count reached. Exiting...
done

Assembly aborted with 10 errors and 0 warnings.
[src]$ ../../avra/src/avra LCDDriver.asm --max_errors 44
AVRA: advanced AVR macro assembler (version 1.4.2)
Pass 1...
Pass 2...
m32U4def.inc(44) : PRAGMA PARTINC directive currently ignored
m32U4def.inc(48) : PRAGMA AVRPART directive currently ignored
m32U4def.inc(53) : PRAGMA AVRPART directive currently ignored
m32U4def.inc(1301) : PRAGMA AVRPART directive currently ignored
m32U4def.inc(1302) : PRAGMA AVRPART directive currently ignored
m32U4def.inc(1303) : PRAGMA AVRPART directive currently ignored
m32U4def.inc(1304) : PRAGMA AVRPART directive currently ignored
LCDDriver.asm(72) : Error   : Garbage in operand (mpr)
LCDDriver.asm(72) : Error   : No register associated with mpr
LCDDriver.asm(91) : Error   : Garbage in operand (mpr)
LCDDriver.asm(91) : Error   : No register associated with mpr
LCDDriver.asm(91) : Error   : ldi can only use a high register (r16 - r31)
LCDDriver.asm(92) : Error   : Garbage in operand (mpr)
LCDDriver.asm(92) : Error   : No register associated with mpr
LCDDriver.asm(93) : Error   : Garbage in operand (mpr)
LCDDriver.asm(93) : Error   : No register associated with mpr
LCDDriver.asm(93) : Error   : ldi can only use a high register (r16 - r31)
LCDDriver.asm(93) : Maximum error count reached. Exiting...
done

Assembly aborted with 10 errors and 0 warnings.
[src]$ ../../avra/src/avra LCDDriver.asm --max_errors 0
AVRA: advanced AVR macro assembler (version 1.4.2)
Pass 1...
LCDDriver.asm(1) : Maximum error count reached. Exiting...
Warning : No .DEVICE definition found. Cannot make useful address range check !
Warning : No .DEVICE definition found. Cannot make useful address range check !
Warning : No .DEVICE definition found. Cannot make useful address range check !
Pass 2...
LCDDriver.asm(1) : Maximum error count reached. Exiting...
done

Assembly complete with no errors (3 warnings).
Segment usage:
   Code      :         0 words (0 bytes)
   Data      :         0 bytes
   EEPROM    :         0 bytes

I've found that max_errors is not set unless it is set to 0.