4. CCS Setup for AM64x

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 (https://www.ti.com/tool/ccstudio) for more information.

4.1. CPU names used in PDK vs CCS

Below table shows the mapping of names in PDK and CCS

CPU name in PDK CPU name in CCS
mcu1_0 / mcu1_1 MAIN_Cortex_R5_0_0 / MAIN_Cortex_R5_0_1
mcu2_0 / mcu2_1 MAIN_Cortex_R5_1_0 / MAIN_Cortex_R5_1_1
mpu1 CortexA53_0
m4f_0 BLAZAR_Cortex_M4F_0

4.2. Step 1: Install CCS

  1. Install CCS v10.1.1 or later: CCS can be downloaded from https://software-dl.ti.com/ccs/esd/documents/ccs_downloads.html#code-composer-studio-version-10-downloads
  2. CCS installation details are available on https://software-dl.ti.com/ccs/esd/CCSv10/CCS_10_2_0/exports/CCS_10.2.0_ReleaseNotes.htm#_Toc60609961
  3. This release is tested on CCS version 10.1.1 and later.
  4. During installation, there is a .Setup. step where you can select components. Be sure to select Sitara AMx Processors.
  5. Here after we’ll be referring to the CCS installation directory as ${CCS_INSTALL_PATH}.

Warning

For Linux, After CCS installion run the install drivers script:

  • Go to the install scripts directory. (cd ${CCS_INSTALL_PATH}/install_scripts)
  • Run install script as sudo (sudo ./install_drivers.sh)
  • Restart your PC

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

The CCS Emulation package and Chip Suport Package for AM64x will appear as packages available for updates via the “Check for Updates” option in CCS.

Follow the instruction below on how to look for updates and install the packages.

  1. From CCS menu, select Help -> Check for Updates.

  2. For AM64x support you will see the following updates available

    • TI Emulators 9.3.0.00041 or later
    • Sitara Device Support 1.5.2 or later
    _images/ccs_emulation_pack_am64x.png

    Fig. 4.1 CCS: Install AM64x emulation pack and CSP

  3. Select these updates for installation and navigate through the wizard dialog via ‘Next’ until the doftware is downloaded. Code Composer Studio may restart during this process to install the patches.

4.4. Step 3: Setup CCS target configuration

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

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

  • Select Connection as Texas Instruments XDS110 USB Debug Probe, if you are using on board debugger

  • 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 AM64x_GP_EVM shown below and save the Target Configuration.

    _images/ccs_target_config_am64x.png

    Fig. 4.2 CCS: Target Configuration

4.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.
  • The launch.js file below is responsible to load and run the DMSC. It is also responsible to set the board configuration input for the DMSC. The board configuration is passed by the PDK example ${PDK_INSTALL_DIR}/pdk/packages/ti/drv/sciclient/examples/sciclient_ccs_init executing on the MCU R5F core. The default board configuration is available for reference at ${PDK_INSTALL_DIR}/pdk/packages/ti/drv/sciclient/soc/V3/sciclient_defaultBoardcfg.c
  • All PDK examples require the DMSC firmware to be executed.
  1. Run DMSC Launch Script

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

      ${PDK_INSTALL_DIR}/pdk/packages/ti/drv/sciclient/tools/ccsLoadDmsc/am64x/launch.js
      
    • ${PDK_INSTALL_DIR} is the path to your PDK installation.

    • Edit the variable “pdkPath” with the absolute path of the pdk package, i.e ${PDK_INSTALL_DIR}

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

      _images/ccs_launch_ccxml_am64x.png

      Fig. 4.3 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_am64x.png

      Fig. 4.4 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 MAIN_Cortex_R5_0_0 core.

      _images/ccs_launch_script_scripting_console_output_am64x.png

      Fig. 4.5 CCS: Scripting Console Output

      _images/ccs_launch_script_console_cio_output_am64x.png

      Fig. 4.6 CCS: Console CIO Output

  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_am64x.png

      Fig. 4.7 CCS: Connect Target

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

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

      _images/ccs_load_binary_am64x.png

      Fig. 4.8 CCS: Loading the demo application binary

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