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

Variable information

Hi,
In Keil project, after compilation where I can get the Varibles information?. I would like to see the each variable where it was located in the RAM.

Thanks in advance
Ramesh

Parents Reply Children
  • I do not use the IDE because it can not do what I want, but in commanline operation including 'IX' in the linker commandline gives what you want.

    possibly there is a means of doing so in the IDE, hunt for it or drop the IDE.

    Erik

  • "Map files gives only information on memory size occupied for each file or module. There is no list of variables used in the project."

    Oh yes there is - look at the Symbol Table:

    SYMBOL TABLE OF MODULE:  Squarer (MAIN)
    
      VALUE           TYPE          NAME
      ----------------------------------
    
      -------         MODULE        MAIN
      C:0000H         SYMBOL        _ICE_DUMMY_
      C:00C2H         PUBLIC        main
      D:00C6H         PUBLIC        squared_out_0
      D:00C5H         PUBLIC        squared_out_1
      D:00C4H         PUBLIC        squared_out_2
      D:00C3H         PUBLIC        squarer_in_0
      D:00C2H         PUBLIC        squarer_in_1
      -------         PROC          MAIN
      -------         DO
      D:0008H         SYMBOL        x
      D:000AH         SYMBOL        x_squared
      -------         ENDDO
      C:00C2H         LINE#         32
      C:00C2H         LINE#         33
      C:00C2H         LINE#         37
      C:00C5H         LINE#         38
      C:00C8H         LINE#         40
      C:00CBH         LINE#         41
      C:00CEH         LINE#         42
      C:00D1H         LINE#         44
      -------         ENDPROC       MAIN
      -------         ENDMOD        MAIN
    
      -------         MODULE        SQUARER
      C:0000H         SYMBOL        _ICE_DUMMY_
      D:00A8H         PUBLIC        IE
      D:00C7H         PUBLIC        TA
      D:00B8H         PUBLIC        IP
      D:00CBH         PUBLIC        RCAP2H
      C:00D2H         PUBLIC        Power_INIT
      D:00CAH         PUBLIC        RCAP2L
      C:008AH         PUBLIC        Timer_0_INIT
      B:00E8H.4       PUBLIC        EWDI
      C:009DH         PUBLIC        Timer_1_INIT
      C:0060H         PUBLIC        Timer_2_INIT
      D:0087H         PUBLIC        PCON
      D:0098H         PUBLIC        SCON
      B:00F8H.4       PUBLIC        PWDI
      D:0089H         PUBLIC        TMOD
      D:0088H         PUBLIC        TCON
      B:00A8H.1       PUBLIC        ET0
      B:00A8H.3       PUBLIC        ET1
      B:00A8H.5       PUBLIC        ET2
      C:0076H         PUBLIC        Watchdog_INIT
      D:008CH         PUBLIC        TH0
      D:008DH         PUBLIC        TH1
      D:00CDH         PUBLIC        TH2
      D:008AH         PUBLIC        TL0
      D:008BH         PUBLIC        TL1
      D:00CCH         PUBLIC        TL2
      C:00ECH         PUBLIC        UART_INIT
      B:0088H.4       PUBLIC        TR0
      B:0088H.6       PUBLIC        TR1
      B:00C8H.2       PUBLIC        TR2
      D:00C9H         PUBLIC        T2MOD
      D:00C8H         PUBLIC        T2CON
      D:008EH         PUBLIC        CKCON
      C:00B0H         PUBLIC        ICU_INIT
      C:0003H         PUBLIC        DMA_0_INIT
      C:0024H         PUBLIC        DMA_1_INIT
      D:00D8H         PUBLIC        WDCON
      C:0045H         PUBLIC        Squarer_INIT
      B:00D8H.0       PUBLIC        RWT
      -------         PROC          DMA_0_INIT
      C:0003H         LINE#         60
      C:0003H         LINE#         106
      C:0009H         LINE#         107
      C:000CH         LINE#         108
      C:0010H         LINE#         114
      C:0014H         LINE#         115
      C:0016H         LINE#         116
      C:0018H         LINE#         121
      C:001EH         LINE#         122
      C:0023H         LINE#         135
      -------         ENDPROC       DMA_0_INIT
    
    So there you have it - variables, functions, and even line numbers!

    What more could you want...?!