This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

L251 map file symbol table

Above are found under the "SYMBOL TABLE OF MODULE" section of my generated map file. 



Question 1

From the L251 user guide it is said that "the first 32 bytes of DATA memory (0x00-0x1F) is grouped into 4 banks of 8 registers each"

Is it safe to assume then that REGSYM symbols above are in the DATA memory area?

If yes, then how come it isnt explicitly written in the mapfile
If no, should I consider it a "linker symbol" then?


Question 2
What are LINE symbols? why some of it are in the ECODE memory class, why some are not indicated in the mapfile?


Question 3
How about BLOCK and BLOCKEND symbol? Could you explain what are these symbols? 





Parents
  • Here are the answers to your questions:

    Q1:

    From the L251 user guide it is said that "the first 32 bytes of DATA memory (0x00-0x1F) is grouped into 4 banks of 8 registers each"

    This is correct. Only the first 8 registers R9-R7 are banked and are mapped into the data address area between 0x00 and 0x1F (all 4 banks). Please see pages 3.11 - 3.13 of the Intel user manual: www.keil.com/.../8xc251sx_um.pdf

    If yes, then how come it isnt explicitly written in the mapfile

    Yes and no. Registers R0-R7 are memory mapped and banked as explained above. R8-R15 are NOT memory mapped and R10/R11 have special meaning (ACC,B)

    If yes, then how come it isnt explicitly written in the mapfile

    R5 does not have a memory address. It is the Register R5 of the selected register bank during execution.  R15 is anyway not memory mapped. Register banks are allocated as soon as they are used. See your map file:

    MEMORY MAP OF MODULE:  Measure (MEASURE)
    
    START     STOP      LENGTH    ALIGN  RELOC    MEMORY CLASS   SEGMENT NAME
    =========================================================================
    000000H   000007H   000008H   ---    AT..     DATA           "REG BANK 0"
    000008H   00000FH   000008H   ---    AT..     DATA           "REG BANK 1"
    

    Q2:

    What are LINE symbols? why some of it are in the ECODE memory class, why some are not indicated in the mapfile?

    The LINE symbols are always in the ECODE or CODE memory class because they represent the address of a C high-level line. Not all C lines generate code. If they do, a corresponding symbol is generated.

    Q3:

    How about BLOCK and BLOCKEND symbol? Could you explain what are these symbols?

    Such a block defines a range for the scope for variables. This might be a function or additional loops in a function. You can see the nesting level in the map file:

          00FF12FAH   BLOCK     CODE     NEAR LAB  LVL=1

Reply
  • Here are the answers to your questions:

    Q1:

    From the L251 user guide it is said that "the first 32 bytes of DATA memory (0x00-0x1F) is grouped into 4 banks of 8 registers each"

    This is correct. Only the first 8 registers R9-R7 are banked and are mapped into the data address area between 0x00 and 0x1F (all 4 banks). Please see pages 3.11 - 3.13 of the Intel user manual: www.keil.com/.../8xc251sx_um.pdf

    If yes, then how come it isnt explicitly written in the mapfile

    Yes and no. Registers R0-R7 are memory mapped and banked as explained above. R8-R15 are NOT memory mapped and R10/R11 have special meaning (ACC,B)

    If yes, then how come it isnt explicitly written in the mapfile

    R5 does not have a memory address. It is the Register R5 of the selected register bank during execution.  R15 is anyway not memory mapped. Register banks are allocated as soon as they are used. See your map file:

    MEMORY MAP OF MODULE:  Measure (MEASURE)
    
    START     STOP      LENGTH    ALIGN  RELOC    MEMORY CLASS   SEGMENT NAME
    =========================================================================
    000000H   000007H   000008H   ---    AT..     DATA           "REG BANK 0"
    000008H   00000FH   000008H   ---    AT..     DATA           "REG BANK 1"
    

    Q2:

    What are LINE symbols? why some of it are in the ECODE memory class, why some are not indicated in the mapfile?

    The LINE symbols are always in the ECODE or CODE memory class because they represent the address of a C high-level line. Not all C lines generate code. If they do, a corresponding symbol is generated.

    Q3:

    How about BLOCK and BLOCKEND symbol? Could you explain what are these symbols?

    Such a block defines a range for the scope for variables. This might be a function or additional loops in a function. You can see the nesting level in the map file:

          00FF12FAH   BLOCK     CODE     NEAR LAB  LVL=1

Children