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 identify which memory location will be accessed based on variable name through API



I am using Code Composer v6.0.1. DSP C6713.

I am using Code composer API in javascript to do interaction.

Can anyone help me out how to identify which memory location will be accessed based on variable name through API ?

Let's say if i  pass variable name (IER, CSR etc) which is accessing register memory then output should be variable is register.

Ex.-To determine if the current target is connected or disconnected, then Code composer API isConnected() will be used

Is there any Similar way or API [something like isRegister()] to identify the memory location which has been accessed through variable?

Thanks for helping me out in advance.

  • Hello,
    You can use the symbol.getAddress API to get the memory address of the variable. The variable will have to be in scope at the time of the call for this to work (global variables will always been in scope).

    Thanks
    ki
  • Hi Ki,
    Thanks for Response. symbol.getAddress API provides memory address. However from address It is diffcult to know whether this address belongs to register or software memory. I am looking for API or method which can tell me that the particular variable is register or software variable.
    Thanks,Hitesh Jaju

  • There is no such API. If you use symbol.getAddress on a register name, you will get an error. The reverse is true for memory.readRegister (you get an error if you call it on a variable/symbol).

    ki