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/TMS320F28069: Read a global variable value in MAP file

Part Number: TMS320F28069


Tool/software: Code Composer Studio

We have created one big project any our requirement is read an all global variable value in our project using its address available in MAP file any-way to this possible or some example code available.

Thanks & Regards 

Yash shah

  • Hi Yash,

    I am not clear on the requirement. All the global variables will be initialized by .cinit. If you need to read them in code then you could read that section. Right? I'll also have our compiler team to look into this.

    Regards,

    Vivek Singh

  • Hey,

    Our requirement is read a global variable at run time. using It's address avliable in MAP file any way to do this?

    Regards

    Yash Shah

  • Consider the case of defining a global variable in C, along with code that reads and writes that global variable.  How is what you want to do different from that?

    Thanks and regards,

    -George

  • Hey,

    Basically we can try to do the " inline assembly ".

    Ex

    In our main file create one global variable and this variable address we can see on the MAP file. So Now we can Access this global variable using its address by inline assembly code any example code available.?

    Regards

    Yash shah

  • Suppose you have this C code fragment in a header file that is included in all the other C files ...

    extern int global_variable;

    And the following C code fragments are in different C files in the program ...

    /* Define and initialize the variable */
    int global_variable = 32;
    ...
    if (global_variable)
    ...
    return global_variable;
    ...
    global_variable = 16;

    The will be an entry in the map file which shows the address of global_variable.  Even so, no special steps are taken in the C code to define, initialize, read, or write this variable.  

    What problem do you want to solve that this model of operation fails to address?  

    Thanks and regards,

    -George

  • Hey,

    Thank you for your support  I have solved that problem.as per our discussion.

    Regards

    Yash shah