Using CCS Debug
Table of Contents
Overview
This mode should be used when debugging with CCS is involved and/or developing an mmWave application where the .bin files keep changing constantly and frequent flashing of image onto the board is not desirable. This mode allows you to flash once and then use CCS to download a different image to the device’s RAM on every boot.
0. Requirements
- PC with:
- Recommended OS: Windows 7 or 10
- Code Composer Studio (version as specified in demo User’s Guide, for xWRLx432 CCS 12.2 or later is required)
- mmWave SDK installed (version as specified in demo User’s Guide)
- The EVM should already be setup for Flashing Mode according to the appropriate hardware setup guides for your EVM:
📝 NOTE: The SDK for the xWRLx432 is different from the SDK for the xWR14xx, xWR16xx, xWR18xx and xWR68xx. It is the MMWAVE-L-SDK which enables low power modes.
EVM | Guide |
---|---|
xWR6843ISK, xWR6843ODS, or xWR6843AOPEVM (All require MMWAVEICBOOST Carrier Board) | Hardware Setup for Flashing in MMWAVEICBOOST Mode |
xWR1443BOOST, xWR1642BOOST, or xWR1843BOOST | Hardware Setup of xWRxxxxBOOST for Flashing Mode |
xWRLx432BOOST | Hardware Setup of xWRLx432BOOST Low Power EVM’s for Functional Mode |
📝 NOTE: The xWR6843ISK, xWR6843ODS, xWR6843AOPEVM cannot be used in standalone mode for CCS debug mode. The MMWAVEICBOOST carrier board must be used to connect to the PC with the onboard XDS110.
1. Flash the CSS Debug Firmware using Uniflash
The debug binary is provided in the mmWave SDK. Flash the appropriate binary according to the instructions for using UniFlash
Device | BIN Name | Location |
---|---|---|
xWR14xx | xwr14xx_ccsdebug.bin | <MMWAVE_SDK3_INSTALL_DIR>\packages\ti\utils\ccsdebug |
xWR16xx | xwr16xx_ccsdebug.bin | <MMWAVE_SDK3_INSTALL_DIR>\packages\ti\utils\ccsdebug |
xWR18xx | xwr18xx_ccsdebug.bin | <MMWAVE_SDK3_INSTALL_DIR>\packages\ti\utils\ccsdebug |
xWR68xx or xWR68xx AOP | xwr68xx_ccsdebug.bin | <MMWAVE_SDK3_INSTALL_DIR>\packages\ti\utils\ccsdebug |
xWRL6432 | empty.release.appimage | <MMWAVE_SDK5_INSTALL_DIR>\examples\empty\xwrL64xx-evm\m4fss0-0_freertos\ti-arm-clang |
xWRL1432 | empty.release.appimage | <MMWAVE_SDK5_INSTALL_DIR>\examples\empty\xwrL14xx-evm\m4fss0-0_freertos\ti-arm-clang |
2. Setup the EVM for Functional Mode
Put the EVM in functional mode.
EVM | Guide |
---|---|
xWR6843ISK, xWR6843ODS, or xWR6843AOPEVM + MMWAVEICBOOST Carrier Board | Hardware Setup of MMWAVEICBOOST + Antenna Module for Functional Mode |
xWR1443BOOST, xWR1642BOOST, or xWR1843BOOST | Hardware Setup of IWRxxxxBOOST for Functional Mode |
xWRLx432BOOST | Hardware Setup of xWRLx432BOOST Low Power EVM’s for Functional Mode |
3. Connect the EVM to CCS using JTAG
3.1 Create Target Configuration File (CCXML)
Creation of the CCXML file is needed for each device type, but only the first time CCS debug mode is used. In subsequent sessions, this step can be skipped and the existing CCXML file can be used directly.
To create the CCXML file:
- Launch CCS
- If CCS does not already show “Target Configurations” window, go to View → Target Configurations.
- This will show the “Target Configurations” window, right click in the window and select “New Target Configuration”
- Specify an appropriate file name (ex: IWR68xx.ccxml) for the particular EVM being used and check “Use shared location”. Click Finish.
- The configuration editor window will open.
- In the window, select Texas Instruments XDS110 USB Debug Probe for Connection and select the appropriate mmWave device in the Board or Device text box.
- Press the “Save” button to create and save the target configuration.
- [Optional]: Press the “Test Connection” button to check the connection with the board.
3.2 Connect to EVM using Target Configuration File and Load Binaries
If needed, open the target configuration window by going to View → Target Configurations.
Under User Defined configurations the target configuration file previously created should appear.
Right click on the target configuration and select Launch Select Configuration. The target configuration will launch in the Debug Window and show all cores present on the device. The following images may vary slightly depending on device type.
The necessary core(s) to connect to will depend on what is utilized by the demo code. This can be determined by examining which debug binaries are provided by the demo. ] The table below maps the file to the appropriate core. The demo may use only one or both.
Debug binary file extension | Connect and load to: |
---|---|
*.xer4f | Cortex_R4_0 |
*.xe674 | C674X_0 |
*.out | Coretx_M4_0 |
📝 NOTE
xWRLx432 Cores
For xWRLx432 devices the Cortex_M3_0 will appear in the debug window. There is no need to connect to the Cortext_M3_0.
For each necessary core (Cortex_R4_0, C674X_0 and/or Coretx_M4_0), select and right click on the to select Connect Target. An example is shown below. When connected, the message “(Disconnected: Unknown)” changes to “(Suspended)”.
For each debug binary, click on the appropriate core so that it is highlighted then click the Load button in the toolbar. In the Load Program dialog, press the Browse Project button. Select the debug binary listed in the demo user’s guide, ensuring that the correct file is used for the core as listed in the table above. Press Ok until you are returned to the debug window. The program will now load.
📝 NOTE: If the demo has _*.xer4f_ and _*.xe674_ binaries, complete the connect to target and load program steps for each core/binary. If the demo only has a _*.out binary, code only needs to be loaded to the Cortex_M4_0.
3.3 Run
- For each core a binary was loaded to, select the core so that it is highlighted then press the Run/Resume button
- The program should start executing and generate console output.
The systems is now setup for CCS debugging.
4 Helpful CCS Debug Tips
4.1 Group the Debug Cores
By grouping the R4F and DSP cores in CCS debug mode, it allows the user to connect or disconnect, load, and run programs simultaneously.
- After launching the target configuration, ctrl click on each core to highlight both. Then right click and choose ‘Group Cores’.
- Now by selecting the ‘Group 1’ group (the name may change if there are multiple groups or can be manually renamed), the user can quickly connect, disconnect, run, and pause both cores simultaneously.
4.2 Reloading Previous Program Files for Faster Resets
When debugging, users commonly need to break, check some values, then restart the program to check again without needing to actually re-build the program files. Because the device uses external memory to load the program, this often requires a full device reset using the NRESET button on the EVM itself. This can add time and cause frustration when debugging if the debug session must be relaunched and reloaded with every reset. However there are faster ways to do this.
- Group the R4F and DSP cores as indicated in the section above. Load and run the cores normally when first starting a new debug session.
- When a code reset is required (either after a breakpoint or error condition), follow the below sequence
- Right click on the “Group 1” and select “Disconnect Target”. This will disconnect CCS from bothR4F and DSP cores at the same time.
- Press the NRESET button on the EVM to reset the device. (This assumes the CCS_debug image is loaded)
- Right click the “Group 1” and select “Connect Target”. This will connect the debug session to both cores.
- Reload the previously loaded program file either using the drop down menu from the load button, selecting Run>Load>Reload Program from the task bar, or the keyboard shortcut “Ctrl+Alt+R”. This will quickly reload the previously selected program files to both cores.
- With the “Group 1” selected, press the run file to run both cores together.
- Right click on the “Group 1” and select “Disconnect Target”. This will disconnect CCS from bothR4F and DSP cores at the same time.
- Repeat the above step anytime a reset is required.
- The ‘Reload Program’ option can also be used between debug sessions if the user needs to exit and rebuild the code. However caution is advised as it is important to be sure CCS is reloading the correct file.
📝 NOTE: If the target is disconnected or reset while the debug session is still connected, it will often require a full restart of CCS on the PC. It is advised to always disconnect the cores before resetting the EVM.
4.3 Debugging with MMWAVE_L_SDK
The code built for the xWRLx432 devices automatically runs with low power modes enabled. The low power modes do not allow for stepping through the code or setting breakpoints. To use the full debug capabilities of CCS with xWRLx432 code set gDebugTargetCode = 1 in motion_detect.c.
Need More Help?
- For further tips on real-time debugging, consult “Section 6.15. CCS Debugging of real time application” of the mmWave SDK
- For more information on the Code Composer Studio (CCS) debug environment consult “Section 7. Debug” of the CCS User’s Guide
- Search for your issue or post a new question on the mmWave E2E forum