Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.arch.embedded > #28982 > unrolled thread
| Started by | Johann Klammer <klammerj@NOSPAM.a1.net> |
|---|---|
| First post | 2019-12-30 09:51 +0100 |
| Last post | 2020-01-08 10:14 +0100 |
| Articles | 2 — 1 participant |
Back to article view | Back to comp.arch.embedded
Problems annotating a symbols' size using gpasms .DEF Johann Klammer <klammerj@NOSPAM.a1.net> - 2019-12-30 09:51 +0100
Re: Problems annotating a symbols' size using gpasms .DEF Johann Klammer <klammerj@NOSPAM.a1.net> - 2020-01-08 10:14 +0100
| From | Johann Klammer <klammerj@NOSPAM.a1.net> |
|---|---|
| Date | 2019-12-30 09:51 +0100 |
| Subject | Problems annotating a symbols' size using gpasms .DEF |
| Message-ID | <qucdr1$123o$1@gioia.aioe.org> |
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:
-----uart.asm---------
radix dec
include p16f1705.inc
include coff.inc
GLOBAL l_buf
GLOBAL l_offs
LINEAR0 UDATA
;l_buf RES 256
.DEF l_buf,global,type=(DT_ARY<<5)|T_CHAR,size=256
UDATA
; .DEF l_offs,global,type=T_CHAR,size=0
; RES 1
l_offs RES 1
END
Then run:
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)
[toc] | [next] | [standalone]
| From | Johann Klammer <klammerj@NOSPAM.a1.net> |
|---|---|
| Date | 2020-01-08 10:14 +0100 |
| Message-ID | <qv46hk$o6u$1@gioia.aioe.org> |
| In reply to | #28982 |
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.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.arch.embedded
csiph-web