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.

CODECOMPOSER: Code Composer Studio forum - Graph tools selection of CPU source.

Part Number: CODECOMPOSER
Other Parts Discussed in Thread: AM2634

Hi,

I am currently developing on the Sitara AM2xxx family and these MCUs have the specificity to have the ARM Debug Access Port (DAP) that allow to access memory. This port allows to access memory without stopping the Cortex-R5F CPUs.

Recently, I started to use the Graph Tools from Code Composer Studio to scope some arrays or variables. The tool is really great for debugging but I have some issues with the source used to read memory. I would like the Graph Tools to use the DAP. I thought configuring the Graph Tools while the DAP is selected would make the trick but unfortunately not. If I start the tool, it always accesses the memory through a CPU and therefore stops that CPU. I checked the configuration of my scopes but I couldn't find a setup to select the source.

Therefore my question is whether there is a way to select the "CPU" source of the Graph Tools?

Br, Nicolas

  • Hello Nicolas,

    Real-time mode is disabled by default with AM2xx for various reasons. There is a workaround that involves using the DAP like you surmised. But you will need to do some address translation to put the correct address for the graph. I will dig up the details and post them when I find it.

    Thanks

    ki

  • Hello Ki,

    Thank you for the information. I totally understand why real-time is disabled. I would be glad if you could explain me how to get the address translation. That would be a good enough workaround.

    Br, Nicolas

  • I totally understand why real-time is disabled

    This should be somewhat supported in CCS 12.6.0 (1Q 2024). In the meantime, there is a crude workaround. I am digging up the details and will post them here.

  • Thank you Ki. I looking forward to that workaround.

    Br

  • Is the memory addresses that you wish to graph in TCM?

  • No, it is in L2 OCRAM, address range 0x7000 0000 to 0x701F FFFF.

  • Thank you. There may be extra required steps for non-TCM memory. I hope to have a proper solution for you tomorrow. Thank you for your patience.

  • thank you. I'm looking forward for the workaround!

  • Hello,

    Thank you for your patience. Since you are using SRAM, it makes some things easier (no address translation needed) but adds some complexity (caching issues).

    Please provide your target configuration (*.ccxml) file that you are using. I will need to look at it so that I can instruct the proper files to modify in CCS.

    Thanks

    ki

  • Hi,

    Indeed, I have already used the "CacheP_inv()" function from the SDK+MCU to invalidate the cache to make data available to DAP. 

    Here is my target configuration:

    AM2634_xds110.zip

  • Thanks. 

    To enable real-time mode for AM2634:

    1. Make sure you are using CCS 12.5.0. If you are not, please install it.

    2. Open the AM2634.xml file in "<CCS 12.5.0 INSTALL DIR>\ccs\ccs_base\common\targetdb\devices" in a text editor.

    3. Modify line 20 so that "Block Memory Access on Run" is set to "0"

    Note that this will enable real-time access for R5_0. If you want to enable it for the other R5 cores, search for the string "Block Memory Access on Run" and modify the value for the other cores (ex: line 253, 688, 1023).

    4. (Assuming you are on Windows) Open a DOS command terminal and browse to: "<CCS 12.5.0 INSTALL DIR>\ccs\ccs_base\common\bin" and run "fsclean.bat"

    5. Launch CCS 12.5.0

    6. Launch a debug session for your ccxml file and load the program as normal

    7.  Open the "ARM Advanced Features" in the Debugger Options and disable "Data Cache Enabled". Note that this must be done every time a program is loaded:

    Note that if you are already invalidating the cache via "CacheP_inv()" then you may not need step #7.

    8. Now you should be able to view memory and graphs while the target is running with continuous refresh enabled:

    Thanks

    ki

  • I forgot to add a step. Please extract the below files to: <CCS 12.5.0 INSTALL DIR>\ccs\ccs_base\common\targetdb\drivers

    rtm_cortexr_xml.zip

    Do this step first sometime after step 1.

  • Hi Ki,

    Thank you very much! This workaround looks very great!

    Have a nice day. Br, Nicolas