6. CCS Setup for J721e

Code Composer Studio is an integrated development environment (IDE) that supports TI’s Micro controller and Embedded Processors portfolio. It provides useful tools to develop and debug embedded applications.

Please visit Code Composer Studio product [page](https://www.ti.com/tool/ccstudio) for more information.

Important

  • Below screen shots and examples show paths and instructions for windows. The same applies for Linux except use linux file/folder paths instead.
  • In Linux+RTOS mode, SPL/uboot bootloader loads the R5F, C6x, C7x, A72 binaries
    • CCS is needed to debug the software on R5F, C6x, C7x (and A72 when in RTOS mode).
  • In RTOS only mode, CCS is needed to load and run the binaries on different CPU cores in the SoC.
  • The CCS emulation pack and CSP (Chip Support Package) needs to be downloaded separately.

6.1. CPU names used in PSDKRA vs CCS

Below table shows the mapping of names in PSDKRA and CCS

CPU name in PSDKRA CPU name in CCS
mcu1_0 / mcu1_1 MCU_Cortex_R5_0 / MCU_Cortex_R5_1
mcu2_0 / mcu2_1 MAIN_Cortex_R5_0_0 / MAIN_Cortex_R5_0_1
mcu3_0 / mcu3_1 MAIN_Cortex_R5_1_0 / MAIN_Cortex_R5_1_1
mpu1 CortexA72_0_0
c6x_1 C66xx_0
c6x_2 C66xx_1
c7x_1 C71x_0

6.2. Step 1: Install CCS

  1. Install CCS v9.x : CCS can be downloaded from https://software-dl.ti.com/ccs/esd/documents/ccs_downloads.html#code-composer-studio-version-9-downloads

  2. CCS installation details are available on https://software-dl.ti.com/ccs/esd/CCSv9/CCS_9_1_0/exports/CCS_9.1.0_ReleaseNotes.htm#General_Information

  3. This release is tested on below CCS version

    _images/ccs_version.png

    Fig. 6.1 CCS: IDE version

  4. Here after we’ll be referring to the CCS installation directory as ${CCS_INSTALL_PATH}. In linux, this is:

    ${HOME}/ti/ccsv9xx/ccs
    

6.3. Step 2: Install CCS emulation packs and Chip Support Package (CSP)

Warning

If you are using CCS Version 9.3 or higher you can skip this step and proceed to Step 3, as this is part of the default ccs package.

6.3.1. Step 2.1: Install CCS emulation pack

  • Install files in the order shown below in the CCS installation folder.

    • For Windows,
      1. ti_emupack_setup_8.3.1.00007_win_64.exe
      2. ti_emupack_patch_j7es_8.3.1.00007_win_64.exe
    • For Linux,
      1. ti_emupack_setup_8.3.1.00007_linux_x86_64.bin
      2. ti_emupack_patch_j7es_8.3.1.00007_linux_x86_64.bin
  • Make sure CCS version 9.0 or above is installed. When prompted for installation folder, you should give the installation folder as ${CCS_INSTALL_PATH}

  • After installation the following versions should be listed

    _images/ccs_emulation_packs.png

    Fig. 6.2 CCS: Emulation Packs

6.3.2. Step 2.2: Install CSP (chip support package) for J721e SoC

  • Extract the CSP package file auto_rvp_rsp_device_support_1.1.4_J7ES.zip to a local folder.

  • Copy the contents of the folder to the ccs_base folder of your CCS installation.

    Note

    For Windows ccs_base folder path is C:\ti\ccs_version\ccs\ccs_base

    cd ${CCS_INSTALL_PATH}/ccs_base
    unzip auto_rvp_rsp_device_support_1.1.4.zip
    

    Warning

    Make sure that you replace the files when prompted.

6.4. Step 3: Setup CCS target configuration and GELs files

  1. Create a CCS target config, you can name it J721E_EVM.ccxml.

    • In Code Composer Studio, go to the File menu and select New -> Target Configuration File

    • Name the Target Configuration file as J721E_EVM.ccxml and click Finish

    • Select Connection as Texas Instruments XDS110 USB Debug Probe, if you are using on board debugger (J3 usb connector)

    • Select Connection as Spectrum Digital XDS560V2 STM USB Emulator, if you are using Spectrum digital XDS560 USB debugger connected to JTAG Mipi connector (J16)

    • Select the Board as EVM_J721E shown below

      _images/ccs_target_config.png

      Fig. 6.3 CCS: Target Configuration

  2. Load the initialization script of the DMSC_Cortex_M3_0 core with the J7 Gels as shown below.

    • Open the Advanced tab of the target configuration file J721E_EVM.ccxml

    • Gel files can be found at below path

      ${CCS_INSTALL_PATH}/ccs_base/emulation/gel/J721E_DRA829_TDA4VM/gel/J721E.gel
      
      _images/ccs_target_config_init_script.png

      Fig. 6.4 CCS: Target Configuration Initialization Script

Important

  • The next step is applicable only if you are loading an RTOS only application. To debug using CCS when Linux runs A72, refer the next section Using CCS Debug with Linux on A72.

6.5. Step 4: Load RTOS/baremetal application binaries thru CCS

Note

  • When using CCS boot flow, please configure EVM in NOBOOT mode for connecting and loading binaries via CCS.
  1. GEL initialization

    • Open the launch.js script in an editor. Script is present in below path:

      ${PSDKRA_PATH}/pdk/packages/ti/drv/sciclient/tools/ccsLoadDmsc/j721e/launch.js
      
    • ${PSDKRA_PATH} is the path to your PSDKRA installation, for example:

      /ti/j7/psdk_rtos_auto_xx_xx_xx_xx
      
    • Edit the variable “pdkPath” with the absolute path of the pdk package, i.e ${PSDKRA_PATH}/pdk/packages

    • Open Code Composer Studio and launch the Target Configuration previously setup

      _images/ccs_launch_ccxml.png

      Fig. 6.5 CCS: Launch CCS Target Configuration

    • Go to the View Target configurations and launch a target configuration is done by right clicking on it.

    • Open the scripting console in CCS - Go to the View menu and then select Scripting Console

    • Load the launch.js script as shown below.

      _images/ccs_launch_script.png

      Fig. 6.6 CCS: Launch script

    • Wait till the script finishes. This step can take considerable time as it configures PLL etc. in the SOC via GEL files and configures DDR. This will connect to the MCU_Cortex_R5_0 core.

      _images/ccs_launch_script1.png

      Fig. 6.7 CCS: Launch script

    • After script completes execution you should see below in Debug window

      _images/launch_dss_script_complete.png

      Fig. 6.8 CCS: Launch script Complete

  2. Load and run the binaries in CCS. Debug as usual using CCS.
    • Now you can connect to any core and load the corresponding application binaries.

      _images/ccs_connect_target.png

      Fig. 6.9 CCS: Loading the demo application binary

    • Go to the Run menu and then select Load -> Select Program to Load

    • In the Load Program window, browse to application binary you want to load.

      _images/ccs_load_binary.png

      Fig. 6.10 CCS: Loading the demo application binary

    • Go to the Run menu and then select Resume to start executing demo binary.

6.6. Using CCS Debug with Linux on A72

  1. Install CCS, CCS emulation packs and the CSP as per the steps mentioned above.

  2. Create a CCS target config, you can name it “J721E_EVM_NO_GEL.ccxml”.

    • Select Connection as Texas Instruments XDS110 USB Debug Probe, if you are using on board debugger (J3 usb connector)

    • Select Connection as Spectrum Digital XDS560V2 STM USB Emulator, if you are using Spectrum digital XDS560 USB debugger connected to JTAG Mipi connector (J16)

    • Select the Board as J721E_DRA829_TDA4VM shown below

      _images/ccs_target_config.png

      Fig. 6.11 CCS: Target Configuration

  3. Launch the target config file created

    _images/ccs_target_config_launched.png

    Fig. 6.12 CCS: Target Configuration launched

  4. Now you can connect to the required non-A72 core (i.e R5, C66xx_0 etc) and load the symbols of the application binary.

    _images/ccs_target_config_load_symbols.png

    Fig. 6.13 CCS: Load symbols in the connected non-A72 core

  5. Now you can put breakpoints wherever required and debug as usual.