.includepath "a"
.includepath "b"
.include "foo.asm"
.include "bar.asm"
The file listing is as follows:
./a/foo.asm
./b/bar.asm
./main.asm
./makefile
The output is as follows:
avra -o main.hex main.asm
AVRA: advanced AVR macro assembler (version 1.4.2)
Pass 1...
main.asm(4) : Error : Cannot find include file: bar.asm
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 !
make: *** [makefile:2: all] Error 1
The terminal process "/bin/bash '-c', 'make'" failed to launch (exit code: 2).
It looks like only the first .includepath directive has an effect. In the source, I can see that it takes a different route depending upon whether any include paths have been added yet (https://github.com/Ro5bert/avra/blob/7a6ca91bd0b585631d2d6276c840734ea7ac3a31/src/directiv.c#L459). I'm wondering if that add_arg's first argument might be incorrect (maybe it's a pointer to a copy on the stack?). Will have to see!
I've ruled out a problem with include paths in general by replacing .includepath with command line arguments to avra - that works.
Reproduction steps:
git clone https://github.com/jameswilddev/avra-repro
cd avra-repro
make
main.asm
is as follows:The file listing is as follows:
The output is as follows:
It looks like only the first
.includepath
directive has an effect. In the source, I can see that it takes a different route depending upon whether any include paths have been added yet (https://github.com/Ro5bert/avra/blob/7a6ca91bd0b585631d2d6276c840734ea7ac3a31/src/directiv.c#L459). I'm wondering if thatadd_arg
's first argument might be incorrect (maybe it's a pointer to a copy on the stack?). Will have to see!I've ruled out a problem with include paths in general by replacing
.includepath
with command line arguments toavra
- that works.