This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

how to find the Global variable adress in the disassemble window?

I only have a .hex file.

 3F6209 761F002C    MOVW       DP,#0x002C
3F620B 56030301    MOV        ACC,@1 << 3     
3F620D 761F0223    MOVW       DP,#0x0223
3F620F 0EA9        MOVU       ACC,@AL
3F6210 1E14        MOVL       @20,ACC       
3F6211 0610        MOVL       ACC,@16
3F6212 56410012    SUBL       @18,ACC      
3F6214 0614        MOVL       ACC,@20       
3F6215 56010012    ADDL       @18,ACC
3F6217 8712        MOVL       XT,@18
3F6218 5605001A    IMPYL      P,XT,@26       
3F621A 5663001A    QMPYL      ACC,XT,@26
3F621C 568E        ASR64      ACC:P,15
3F621D A910        MOVL       @16,P
3F621E 0006        LRETR

in the disassemble window, I can see the codes. the Values of adress  (0x0223*64+@18) and (0x223*64+@16)

are not initialed in the .text section. so I regard them as global variables ,

I want to know  the values of @18 and @16,

I have not  the .cmd file,  I cannot find the .cinit .bss section.

who can tell me how to find a .cinit .bss section  in the disassemble window?

who can tell me  how to find a  Global variable value   in the disassemble window?

thanks a lot

  • Hi,

    While you're in debug menu, you can check out the "Memory Browser" window where all the addresses with their respective variables can be seen assigned.

    The Memory view is documented in the Help that comes with CCS

    Help -> Help Contents -> Code Composer Studio Help -> Views and Editors -> Memory View

    You  can also check: http://processors.wiki.ti.com/index.php/GSG:Debugging_projects_v5#Memory_viewer

    Regards,

    Gautam

  • Sonota,

    To begin with I'm puzzled why you don't have the source code, .cmd file etc.

    If you have access to .map file of the code programmed, it should tell the details of .cinit, .ebss etc. If you don't, you have to find everything manually.


    Regards,

    Manoj

  •  manoj

                    thanks for your ensusiastic support .   The reason why I do not have the .cmd file is that  I have not the  access right to read the source code in my company . I am  just  a junior engineer.

            

  • Gautam

              thanks for your reply,   the memory  data is random value before  the program running.

     In the bootloader .some part of the codes is  moved from Flash to the SARAM,

    3F68FA 2910        CLRC       INTM
    3F68FB 2920        CLRC       DBGM
    3F68FC FF69        SPM        0
    3F68FD 0006        LRETR      
    3F68FE FE02        ADDB       SP,#2
    3F68FF 767F6536    LCR        0x3F6536
    3F6901 8F008000    MOVL       XAR4,#0x008000   // SARAM  start adress
    3F6903 8F7F6264    MOVL       XAR5,#0x3F6264  
    3F6905 A842        MOVL       *-SP[2],XAR4
    3F6906 8F3F6000    MOVL       XAR4,#0x3F6000  // flash start  adress

    The codes are  both in the Flash ande RAM  Adress,

    should I set the EMU BOOT MODE  as FLASH or SARAM

    Regards

    sonato

     

     

     

     

     

  • sonota bmw said:
    should I set the EMU BOOT MODE  as FLASH or SARAM

    This depends on .cmd file and how it has been configured ie to run through flash or ram. Do you've any idea whether the code can run through flash or not?

    Regards,

    Gautam

  • Sonato,

    You have to execute flash related algorithm from RAM and not from flash.

    Flash algorithms and code which calls the flash algorithms have to be moved from flash to RAM and in run time will be executed from RAM.

    Since it looks like your flash contents are programmed and unlocked. I believe you should be okay to boot to flash.

    Regards,

    Manoj