Menu

#1428 Missing DSEG information in MAP file

open
nobody
linker (61)
sdld
5
2020-08-18
2008-02-11
A Hoyle
No

While trying to optimize my application to enable it to fit within the size limits of DSEG/OSEG, I noticed that I seem to be missing some DSEG space.

When I comparing the generates MEM and MAP files, some bytes were assigned in the MEM file but were not listed in the DSEG section of the MAP file.

I have now managed to modify an example project to produce the same problems. The MEM file shows.

Internal RAM layout:
0 1 2 3 4 5 6 7 8 9 A B C D E F
0x00:|0|0|0|0|0|0|0|0|a|a|a|a|a|a|a|a|
0x10:|a|a|a|a|a|a|a|d|d|d|d|d|d|f|f|g|
0x20:|B|B|B|T|b|b|b|b|b|b|b|b|b|b|b|b|
0x30:|b|b|b|c|c|c|c|c|c|c|c|c|c|c|c|c|
0x40:|c|c|c|c|c|c|c|c|e|e|e|e|e|e|e|e|
0x50:|e|e|e|e|e|e|h|h|h|h|Q|Q|Q|Q|Q|Q|
0x60:|Q|Q|Q|Q|Q|I|I|I|I|I|I|I|I|I|I|I|
0x70:|I|I|I|I|I|I|I|I|I|I|I|I|I|I|I|I|
0x80:|I|I|I|I|I|I|I|I|I|I|I|I|I|I|I|I|
0x90:|I|I|I|I|I|I|I|I|I|I|I|I|I|I|I|I|
0xa0:|I|I|I|I|I|I|I|I|I|I|I|I|I|I|I|I|
0xb0:|I|I|I|I|I|I|I|I|I|I|I|I|I|I|I|I|
0xc0:|I|I|I|I|I|I|I|I|I|I|I|I|I|I|I|I|
0xd0:|I|I|I|I|I|I|I|I|I|I|I|I|I|I|I|I|
0xe0:|I|I|I|I|I|S|S|S|S|S|S|S|S|S|S|S|
0xf0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0-3:Reg Banks, T:Bit regs, a-z:Data, B:Bits, Q:Overlay, I:iData, S:Stack, A:Absolute

However I can't find any reference to the data stored in blocks d,f,e and h. After some trial and error, I found that some standard library functions are using this space, but are not listed in the DSEG section of the MAP file, while their OSEG usage is listed. It would be really useful if the DSEG usage could be added to the MAP file, so I would know which functions to avoid / optimise.

The example project is attached and my MEM and MAP files are in a subdirectory. The project is slightly modified version of the well used example project written by Tsuneo and published on www.cygnal.org/ubb/Forum9/HTML/000938.html
I have added some code to the "main" in USBMain.c to call some library functions just to recreate my problems.

My SDCC version is :

sdcc -v
SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.7.0 #4
818 (May 31 2007) (MINGW32)

I compile my code using the SiLabs IDE version 3.00 with the following options

Assembler -plosgff
Compiler -c --debug --use-stdout -V
Linker --debug --use-stdout -V

If you need any other information or can offer any help please email my at ahoyle AT users DOT sourceforge DOT net.

Thanks

Discussion

  • A Hoyle

    A Hoyle - 2008-02-11

    Example project

     
  • Maarten Brock

    Maarten Brock - 2010-08-05
    • labels: --> linker
     
  • Philipp Klaus Krause

    • Category: --> sdld
     
  • Sergey Belyashov

    • status: open --> closed-out-of-date
     
  • Maarten Brock

    Maarten Brock - 2020-08-18
    • status: closed-out-of-date --> open
     
  • Maarten Brock

    Maarten Brock - 2020-08-18

    Just because it is an old issue does not mean it is out of date. It is by no means fixed and still relevant.

     

Log in to post a comment.

Monday.com Logo