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.

CCS/TMS320F28034: Address of Variables/Functions....

Part Number: TMS320F28034

Tool/software: Code Composer Studio

Dear,

      Good after noon !

      How can I find the Address/Loction of Variables , funcions, SECTIONs after finish compile a project ?

      Do you have a maunal for this ? 

      

tks

have a nice day !

      

  • Hello,

    If in a debug session, you can try using the Modules view:

    https://dev.ti.com/tirex/explore/node?node=APVIzRhtpuf-7AMAb9iu3w__FUz-xrs__LATEST

    Also, after compilation, take a look at the generated *.map file in the project configuration subfolder.

    Thanks

    ki

  • Dear Ki,

         Good afternoon,

         I can not open the Link  :)

         My problem is :

    when I define a global Variables, I can find the address at .MAP file;

    But I can't not find the address of STATIC Variables in a .C file  and temporary Variables in Funcs ;

    How can I know these variables are allocated at the right address ?

        tks a lot !

        have a nice day !

  • Things like local variables would get allocated at run time so you would not know right after compilation.

  • What I mean is :

         when the program is running in the Chip , how does it allocate the local variables ? what is the mechanism ? 

         How can I know if it's running out of RAM space ?

         tks

  • Jacky Xiao1 said:
    But I can't not find the address of STATIC Variables in a .C file

    Please see this forum thread.

    Jacky Xiao1 said:
    and temporary Variables in Funcs

    Those addresses are relative to the stack pointer (SP).  So they are different every time the function runs.

    Thanks and regards,

    -George

  • Good morning George,

         for the temporary variables, it's relatived to Stack Pointer!

         if there is a multi task OS in the DSP , the SP will point to  different task's stack space when running different tasks,  so  the temprary variables will be at different task's stack space , is that right ?

         for the static variables, how do I add the link option at CCS so that I can see the address in the MAP file ?

    tks

    have a nice day !

    • Version of the host OS : win 10
    • Provide exact version number of CCS : 5.4.0

  • Jacky Xiao1 said:
     if there is a multi task OS in the DSP , the SP will point to  different task's stack space when running different tasks,  so  the temprary variables will be at different task's stack space , is that right ?

    That's probably right.  But it depends on the details of how the multi-tasking OS works.  

    Jacky Xiao1 said:
    for the static variables, how do I add the link option at CCS so that I can see the address in the MAP file ?

    Use the linker option --mapfile_contents=sym_defs.

    Thanks and regards,

    -George

  • Good afternoon George,

           For the uCOS situation (every task have it's own stack space).

           the temprary variables will be at it's related task's stack space , is that right ?

           

          tks 

    have a nice day !

  • You are probably right.  Because I am not familiar with uCOS, so I cannot say for sure.

    Thanks and regards,

    -George