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¶
- 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
- 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
- This release is tested on CCS version 10.1.1 and later.
- During installation, there is a .Setup. step where you can select components. Be sure to select Sitara AMx Processors.
- 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.
From CCS menu, select Help -> Check for Updates.
For AM64x support you will see the following updates available
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.
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.
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
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.
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.
Load and run the binaries in CCS. Debug as usual using CCS.