ASLink Error for area OSEG

John E. A.
2008-09-08
2013-03-12
  • John E. A.
    John E. A.
    2008-09-08

    Hi Everyone,

    I've been using the sdcc compiler for an 8051 project for about 9 months.

    I've been using 2.7.0 which has been working well.

    I recently migrated to a new workstation and in the process upgraded to 2.8.0.

    After the upgrade I receive 2 or 3 of the following error:

    ASlink-Error-Could not get 11 consecutive bytes in internal RAM for area OSEG

    If I downgrade to 2.7.0 everything builds successfully as before.

    As this is a memory allocation error I'm not sure it falls into the category of a bug, however it does represent an inability to build code that was successfully built with a previous version.

    I'm using small memory model and explicitely specifiying the memory sizes and locations on the link line, from Makefile:

    LS=sdcc
    LDFLAGS= --code-loc 0x0000 --code-size 0xF7FF --xram-loc 0x0000 --xram-size 0x07FF  --iram-size 0x100 -oobj/

    This is for an Analog Devices ADuC834 mc51 variant.

    The Main.map for the 2.7.0 (successful) build contains:
    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|1|1|1|1|1|1|1|1|
    0x10:|2|2|2|2|2|2|2|2|b|c|c|c|c|c|e|e|
    0x20:|B|B|B|B|B|B|B|B|B|a|a|a|a|a|a|a|
    0x30:|a|a|a|a|a|a|d|d|d|d|f|f|f|f|g|h|
    0x40:|h|h|h|h|i|i|j|j|j|j|j|j|j|j|j|j|
    0x50:|j|j|j|j|k|k|l|l|l|l|l|l|l|m|n|n|
    0x60:|n|n|n|n|n|n|n|n|n|n|n|n|n|n|n|n|
    0x70:|n|n|n|Q|Q|Q|Q|Q|Q|Q|Q|Q|Q|Q|I|I|
    0x80:|I|I|I|I|S|S|S|S|S|S|S|S|S|S|S|S|
    0x90:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
    0xa0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
    0xb0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
    0xc0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
    0xd0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
    0xe0:|S|S|S|S|S|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

    Stack starts at: 0x84 (sp set to 0x83) with 124 bytes available.

    Other memory:
       Name             Start    End      Size     Max    
       ---------------- -------- -------- -------- --------
       PAGED EXT. RAM                         0      256  
       EXTERNAL RAM     0x0000   0x03f7    1016     2047  
       ROM/EPROM/FLASH  0x0000   0xf24b   62028    63487  

    Whereas the  Main.map for the 2.8.0 (FAILED) build contains:
    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|1|1|1|1|1|1|1|1|
    0x10:|2|2|2|2|2|2|2|2|b|c|c|c|c|c|e|e|
    0x20:|B|B|B|B|B|B|B|B|B|a|a|a|a|a|a|a|
    0x30:|a|a|a|a|a|a|d|d|d|d|f|f|f|f|g|h|
    0x40:|h|h|h|h|i|i|j|j|j|j|j|j|j|j|j|j|
    0x50:|j|j|j|j|k|k|k|l|l|l|l|l|l|l|m|n|
    0x60:|n|n|n|n|n|n|n|n|n|n|n|n|n|n|n|n|
    0x70:|n|n|n|n|n|n|n|n|Q|Q|Q|Q|I|I|I|I|
    0x80:|I|I|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
    0x90:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
    0xa0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
    0xb0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
    0xc0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
    0xd0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
    0xe0:|S|S|S|S|S|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

    ERROR: Couldn't get 12 bytes allocated in internal RAM for area OSEG.
    Stack starts at: 0x82 (sp set to 0x81) with 126 bytes available.

    Other memory:
       Name             Start    End      Size     Max    
       ---------------- -------- -------- -------- --------
       PAGED EXT. RAM                         0      256  
       EXTERNAL RAM     0x0000   0x03f7    1016     2047  
       ROM/EPROM/FLASH  0x0000   0xf23d   62014    63487  

    Is there some way to get ASLink to tell me from which obj file the various a-z components of the DATA segment originate?

    As this is the client's code, I can't submit full source, but I wanted to pass along this feedback on the 2.8.0 version. (I've downgraded to the 2.7.0 to allow building)

    Thanks for all the great work!

    ciao...

    johnea

     
    • Maarten Brock
      Maarten Brock
      2008-09-09

      ASlink tells where YOUR variables are in the .map file. The variables from the library (except parameters) are not yet traceable.

       
    • John E. A.
      John E. A.
      2008-09-10

      Thanks for your reply Maarten

      Do you have any idea what the lower case alphabetic characters (a-z) indicate?

      Thanks Again!

      johnea

       
    • Maarten Brock
      Maarten Brock
      2008-09-10

      Yes, every letter indicates a group of variables in one segment from one source file. Compare it with the data in the .map file and you'll get the idea.