Menu

#88 mcs51 internal memory layout incorrect

None
closed
None
2
2015-03-06
2015-01-31
No

Linking my application from a number of libraries on a 8051
leads to an incorrect internal memory layout.


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|b|b|b|b|b|b|
0x10:|b|b|b|b|b|b|b|c|c|c|c|c|c|h|S| |
0x20:|B|B|B|d|d|d|d|d|d|d|d|d|e|e|e|e|
0x30:|e|e|e|e|f|f|f|f|f|f|f|f|g|g|g|g|
0x40:|Q|Q|Q|Q| | | | | | | | | | | | |
0x50:| | | | | | | | | | | | | | | | |
0x60:| | | | | | | | | | | | | | | | |
0x70:| | | | | | | | | | | | | | | | |
0x80:| | | | | | | | | | | | | | | | |
0x90:| | | | | | | | | | | | | | | | |
0xa0:| | | | | | | | | | | | | | | | |
0xb0:| | | | | | | | | | | | | | | | |
0xc0:| | | | | | | | | | | | | | | | |
0xd0:| | | | | | | | | | | | | | | | |
0xe0:| | | | | | | | | | | | | | | | |
0xf0:| | | | | | | | | | | | | | | | |
0-3:Reg Banks, T:Bit regs, a-z:Data, B:Bits, Q:Overlay, I:iData, S:Stack,     A:Absolute

ERROR: Couldn't get 64 bytes allocated in internal RAM for area SSEG.
Stack starts at: 0x1e (sp set to 0x1d) with 2 bytes available.

Other memory:
   Name             Start    End      Size     Max     
   ---------------- -------- -------- -------- --------
   PAGED EXT. RAM   0x0001   0x0077     119      256   
   EXTERNAL RAM     0x0078   0x0211     410    32768   
   ROM/EPROM/FLASH  0x0000   0x5dd4   24021    32768

Stack segment is misplaced and too small. Internal memory size is 128 bytes.

SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8 3.4.0 #8981 (Apr 5 2014) (Linux)

SDCC was called with the parameters below:

sdcc    --verbose --out-fmt-ihx --xram-size 32768 --iram-size 128 \
--stack-size 64 --code-size 32768 --model-medium\
        -L../../EventLogger/bin \
        -L../../Frontplatte/bin \
        -L../../HW-Register/bin \
        -L../../HW-StromquelleMultikanal/bin \
        -L../../HW-UMessMultikanal/bin \
        -L../../Interface-Kanal/bin \
        -L../../Interface-System/bin \
        -L../../MesswertSpeicher/bin \
        -L../../StatusIO/bin \
        -L../../Timer/bin \
        -L../../TracerGUI/bin \
        -L../../TracerLib/bin \
        -L../../USB-Interface/bin \
        eventLogger.lib frontplatte.lib hwRegister.lib \
        stromQuelleMC.lib uMessMultikanal.lib messwertSpeicher.lib \
        kanalInterface.lib systemInterface.lib \
        statusIO.lib timer.lib tracerGUI.lib usbIF.lib \
        tracerMesscontroller.lib Main.rel

Linking the same libraries in other combinations with different Main.rel
leads to working code.

Any idea what could be wrong ?

Discussion

  • Maarten Brock

    Maarten Brock - 2015-01-31
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,3 @@
    -
     Linking my application from a number of libraries on a 8051
     leads to an incorrect internal memory layout. 
    
    • Group: -->
     
  • Maarten Brock

    Maarten Brock - 2015-01-31

    I thunk it might be that the linker first locates the stack (which is specified as only one byte) in the 2 bytes at 0x1E and then finds out it can't place the full 64 bytes there.

    Since I can't reclassify this as a bug report, would you please file it again as a bug? And close this one afterwards?

    Maarten

     
  • Matthias Krueger

    Re-submitted as bug report. Closed support request

     
  • Matthias Krueger

    Please close ticket.

     
  • Maarten Brock

    Maarten Brock - 2015-03-06

    Are you saying that you as Creator could not close this item? It should be under "Edit". Anyway, it's closed now.

     
  • Maarten Brock

    Maarten Brock - 2015-03-06
    • status: open --> closed
    • assigned_to: Maarten Brock
     

Log in to post a comment.

Auth0 Logo