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.

Access cmd file information in C-Code

Hello all,


I want to access information from a cmd file in my C-code.

To be a bit more precise:

In the cmd file there are the following lines (and some more which are not of interest I'd say):

MEMORY

{

       XRAMDATA    : origin = 0x200000, length = 0x080000

}

SECTIONS

{

        XRAM            : > XRAMDATA,                 PAGE = 1

}

I have to do a pattern check of the entire XRAM, means I start at the XRAM's origin (0x200000) and check as many elements as specified by length (0x080000). So I would need these values in the C-Code.

I've seen the functions START(xxx), END(xxx) and SIZE(xxx) which are what I need but I didn't manage to define a symbol that I can access in my C-Code.

It would be wonderful if you could a provide a short example about what to add the command file and what to add to my c-code.

Thanks in advance and kind regards

  • Hi Markus,

    For accessing assembly language variables from C/C++, please visit section 7.5.2 at http://www.ti.com/lit/ug/spru187u/spru187u.pdf

    Sample C programs are also provided there.

    Regards,

    Shankari

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------