To expert
While debugging, I am unable to read the variable as shown below. (as shown below)
How can I read a variable in real time while the MCU is running?

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.
To expert
While debugging, I am unable to read the variable as shown below. (as shown below)
How can I read a variable in real time while the MCU is running?

Hi Choi,
You use the following two methods:
1. Real time debugging using DAP
Launch the ccxml in CCS
Right click on the ccxml, select "Show all cores"
In "Non Debuggable Devices", select "CS_DAP_0"
View --> Mmeory Browser
In "Memory Browser" select "Pin to Debug Context"
Connect to R5_0_0
Load your application binary to R5_0_0
Tools --> "ARM Advanced Features", In "ARM Advanced Features (Cortex_R5)", uncheck "Data Cache Enabled"
Run the application (F8)
In "Memory Browser", type in the memory address of the variable, and click on "Continous Refresh"
The content of the memory location will be updated continously
2. Real time debugging using unused core
Launch the ccxml in CCS
Connect to R5_0_0
Load your application binary to R5_0_0
Tools --> "ARM Advanced Features", In "ARM Advanced Features (Cortex_R5)", uncheck "Data Cache Enabled"
Run the application (F8)
Connect to R5_0_1
Load Symbols of the same application binary to R5_0_1
In "Expressions", add the variables of interest (loopCounter) and click on "Continous Refresh"
Best regards,
Ming
Hi Ming,
I used the method using DAP number 1, but it didn't work.
Could you please confirm that my settings are correct?
1. Click Debug
2. Right-click on the project and click "Show All Cores"

3. Click on CS_DAP_0 and click "Pin to debug context" in Memory Broswer

4. Uncheck "Data Cache Enabled" in R5_0_0

5. Operate R5_0_0 and click "Continous Refresh"

Best Regards
Jiung Choi
Hi Ming
Thank you for your reply.
Unfortunately we are using all cores so we have to use method 1.
I think the problem is that even when paused, the DAP cannot see the OCRAM area.
1. If I check the corresponding memory in R5_0, I can see the value as shown below.

2. However, if you change to DAP, all OCRAM areas are not visible as shown below.

Is there a debug connection setup to use DAP?
Regards
Jiung Choi
HI Jiung,
I do not see that problem. My guess is that your AM263x CC is not initialized properly.
I flashed the SBL_NULL into the QSPI flash, then set the boot mode to boot from QSPI flash, so that the SBL_NULL did the proper board and core initialization. Here is the screen capture I have:

Please refer to the following URL for how to initialize the board and cores:
AM263x MCU+ SDK: CCS Launch, Load and Run (ti.com)
Best regards,
Ming
Hi Ming
Regardless of SBL initialization, we confirmed that variables can be monitored at runtime when accessed by address in the Expressions tab as shown below.
However, it cannot be accessed by variable name, and the value is not read in the memory browser.
Can you confirm the cause?


Best Regards
Jiung Choi
Hi Jiung,
As I remember, the DAP only works with the memory address (not the variable name).
The variable name only works with the method two.
Why it only works for the Expression Windows, not Memory Browser, I will need to discuss with the JTAG expert. At least you have a way (not ideal) to monitor the variables in run time.
Best regards,
Ming