I had been trying to output some sort of address<->name mapping
for debugging. Using the Map file seemed promising initially.
But when trying to dump memory locations, it became obvious
that I needed the sizes, too.
The pure MPASM syntax does not seem to allow annotating that information.
gpasm looked superior in that respect. Their .DEF extension specifically.
BUT it seems to be moving the labels around the memmap
when it shouldn't.
This is what I tried:
;l_buf RES 256
; .DEF l_offs,global,type=T_CHAR,size=0
; RES 1
l_offs RES 1
gpasm -c -p p16f1705 ./uart.asm -o uart.o
gplink -m -s ./16f1705_g.lkr ./uart.o -o ./main.hex
look at main.map to see the l_buf is moved 256 bytes ahead
(0x2100) into LINEAR0 which starts at 0x2000.
changing the size field changes that offset.
Am I using DEF wrong, or is there a Bug?
(It's supposed to be a char array. the <<5 was found experimentally
and can be verified with 'gpvo -t ./uart.o')
The gpasm version I used is:
gpasm-1.5.2 #1316 (Oct 20 2018)
Reply by Johann Klammer●January 8, 20202020-01-08
On 12/30/2019 09:51 AM, Johann Klammer wrote:
> The gpasm version I used is:
> gpasm-1.5.2 #1316 (Oct 20 2018)
It seems the GP_ARR auxiliary symbol is not implemented
A text search for GP_ARR shows it's only in the libgputils/gpcoff.h header.