Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.arch.embedded > #28982

Problems annotating a symbols' size using gpasms .DEF

From Johann Klammer <klammerj@NOSPAM.a1.net>
Newsgroups comp.arch.embedded
Subject Problems annotating a symbols' size using gpasms .DEF
Date 2019-12-30 09:51 +0100
Organization Aioe.org NNTP Server
Message-ID <qucdr1$123o$1@gioia.aioe.org> (permalink)

Show all headers | View raw


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)

Back to comp.arch.embedded | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

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

csiph-web