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

xdata xref

I have looked, and looked for a means of having the linker list the ADDRESSES of my data, idata and xdata variables, but not found one. How do I get it

Erik

  • It's all in the Symbol Table (it is in mine, anyway - locals and all)

    I'm using BL51 v4.14.

    You'd have to do some post-processing if you wanted it sorted into a map of XDATA, a map of PDATA, etc; I'm sure I had an Excel macro to do that, but can't find it just now :-(

  • Globals would do just fine. Yes, they are listed as per use but not as per address.

    Erik

  • The getline funciton in the Measure example has two parameters, line and n, and two locals, cnt and c:

    void getline (unsigned char idata *line, unsigned char n)  {
      unsigned char cnt = 0;
      unsigned char c;
    

    The symbol table shows their addresses:
    SYMBOL TABLE OF MODULE:  Measure (MEASURE)
    
      VALUE           TYPE          NAME
      ----------------------------------
    
      -------         MODULE        GETLINE
      C:0000H         SYMBOL        _ICE_DUMMY_
      C:19A4H         PUBLIC        _getline
      -------         PROC          _GETLINE
      D:0025H         SYMBOL        line
      D:0026H         SYMBOL        n
      -------         DO            n
      D:0027H         SYMBOL        cnt
      D:0028H         SYMBOL        c
      -------         ENDDO         c
      -------         ENDPROC       _GETLINE
      -------         ENDMOD        GETLINE
    (the "value" of a symbol, as far as the Linker is concerned, is its address).

  • The only mention of an IDATA variable in the M51 is: AUX_CURRENT_PRESENTATION . . . . . IDATA; USCUSIGN USAUXSGN USINIT

    How did you get what you show ?

    Erik

  • I'm using uVision v2.14 with BL51 v4.14.

    In uVision 'Listing' options, I checked everything except 'Line Numbers'; ie,
    Memory Map;
    Public symbols;
    Local sybols;
    Comment Records;
    Cross Reference;
    Generated Symbols;
    Library symbols

    I'm afraid I'm not sure exactly which one turns on that particular part of the listing!

    The only listing-control option shown in the "INVOKED BY" section of the M51 is the PRINT(filename).

  • Andy, sorry, incomplete information in my question. I am not using uVision I am using batchfiles to have 7 projects under a simple command structure.

    Erik

  • Hmmm...
    I thought you might say that, which was why I mentioned the bit about only seeing PRINT(filename) in the "INVOKED BY" section of the M51.
    Not terribly helpful :-(

    Most of the mapfile listing-control options seem to be to do with excluding bits of the mapfile; do you have any of the NOxxx listing options on your command line?

    I don't know if any of these options require that you enable debug info?

    My example was from a 'C' source; I don't know if you get different (less?) info from an Assembler source?

  • Thanks Andy. It's 98% "C" and 2% assembler. The only "NO" I have is "NOIP". I really would like to see the address of my - at least xdata - globals. Is it that Keil is so amazed with their uVision which requires clicks and clicks to switch from one job to another that they have forgotten the simple, easy and excellent functionality of a batchfile?. I know that the batchfile may be a lost art but those of us who used them for years on end DO know their advantages and do not get blinded by the glare of windows. I am not an "enemy" of windows, I use it with great delight for things where things change for every use, but for repetitive functions without parameter change mr Gates has not yet come up with a solution.

    This got to be more than I intended, but now it is off my chest.

    Thanks, have fun

    Erik

  • NOIP is just a Compiler option (No Integer Promotion).

    The tools are all still command-line tools (see my rant elsewhere!); uVision just builds the command line & calls them "invisibly"

    So it should be possible to set it up on uVision, then copy the options into your batchfiles.
    uVision creates a .lnp file with the Linker options in.

    I've just noticed that mine has an IXREF option in it.

    Alternatively, you can do a uVision "batch" build from the command line

  • Andy,
    I have the IXREF and no NO.. . Could you possibly e-mail me the control file uVision produce for you, or I must fumble my way through uVision to make one.

    Thanks,

    Erik

  • Erik,

    Why don't you post your MAP file to the forum and we can show you where the symbols are listed.

    Jon

  • MAP file ?? do you mean M51 ?

    Erik