10.1. Device¶
This section lists known issues for specific device families when debugging with CCStudio for VS Code.
10.1.1. CC23xx / CC27xx¶
10.1.1.1. Blank Devices¶
For a blank device, the serverArgs argument is required in launch.json to pass the executable binary file path.
"serverArgs": [
"-c", "set EXECUTABLE ${workspaceRoot}/my_executable.out"
]
10.1.1.2. Device may get into a state where loading a program fails¶
Device can get into a bad state that is not recoverable with CCStudio for VS Code. This can happen when trying to flash a non-signed program. To recover:
Perform a chip erase to clear a potentially invalid CCFG. In a terminal:
cd <app-path>/Texas Instruments/CCSVSC/resources/debug_1_0_0/openocd bin/openocd.exe -s share/openocd/scripts -f board/<board-config-file> -c init -c "perform_chip_erase $_CHIPNAME.dap" -c shutdown
<app-path>:Windows:
C:/Users/<user-id>/AppData/LocalLinux:
~/.configMac:
~/Library/Application Support
<board-config-file>:Substitute with the board config file for your target device. Example for LP-EM-CC2340R53 is
ti_lp_em_cc2340r53.cfg. The names of board config files can be found in: <app-path>/Texas Instruments/CCSVSC/resources/debug_1_0_0/openocd/scripts/board.Follow the instructions under "Blank Devices" above for the next debug launch.
10.1.1.3. VS Code Debug of Firmware Built Using TI Toolchains¶
To debug in VS Code with files generated by ti-arm-llvm toolchains (examples included in SimpleLink SDK), use TI ARM Clang Compiler version 4.0.4 or newer.
10.1.1.4. External Resume Detected Warning¶
If Device Standby (power policy settings) is enabled, the debug terminal may show:
Warn: [cc23xx.cpu] external resume detected
or
Warn: [cc27xx.cpu] external resume detected
This does not affect debugging.
10.1.2. CC35x1E¶
10.1.2.1. Project Debug Requires Manual Pre-Launch Setup¶
Project debug will not work out of the box due to several pre-launch steps not being executed before debug launch. This is because executable actions are not currently supported in this release. This currently requires a manual workaround to the generated launch configuration.
Prerequisites:
SimpleLink WiFi Toolbox
SimpleLink WiFi SDK
XDS Adapter serial number
The launch.json, tasks.json, and settings.json files referenced below all belong in your workspace's .vscode folder.
launch.json file for Windows:
{
"cwd": "${workspaceFolder}/Debug",
"executable": "uart2echo_LP_EM_CC35X1_freertos_ticlang.out",
"name": "Open OCD Cortex Debug",
"request": "attach",
"type": "cortex-debug",
"servertype": "openocd",
"deviceName": "CC3551ENT",
"configFiles": [
"board/ti_cc35x1e_launchpad.cfg"
],
"searchDir": [
"scripts"
],
"runToEntryPoint": "main",
"showDevDebugOutput": "raw",
"preLaunchTask": "Enable CC35x1E Debug Mode",
"openOCDLaunchCommands": [
"gdb_memory_map enable",
"init",
"reset halt"
]
}
There are a few parameters which are mandatory:
deviceNameshould be the full device name CC35[05]1E[NST] — otherwise the SVD file will not load.preLaunchTask:"Enable CC35x1E Debug Mode"calls the task which programsdebug_action_requestvia the ToolBox.
tasks.json file:
{
"label": "Enable CC35x1E Debug Mode",
"type": "shell",
"command": "${config:cc35x1e.toolboxPath}/simplelink-wifi-toolbox",
"args": [
"programmer", "-i", "XDS110", "-param1", "${config:cc35x1e.adapterSerial}",
"debug",
"--debug_action_req_path",
"${config:cc35x1e.debugActionRequestPath}",
"--verbose"
],
"problemMatcher": []
}
settings.json file to set relevant ToolBox and XDS adapter parameters:
{
"cc35x1e.toolboxPath": "C:/ti/simplelink_wifi_toolbox_win_4_3_10_dev",
"cc35x1e.adapterSerial": "E10000I9",
"cc35x1e.debugActionRequestPath": "${workspaceFolder}/Debug/toolbox/debug_action_request.sign.bin"
}
cc35x1e.toolboxPath: full path to the SimpleLink WiFi ToolBox folder.cc35x1e.adapterSerial: serial number of the XDS110 adapter. To find this, runxdsdfu -efrom thexdsdfuutility included in the XDS110 driver package (see Install the XDS110 Debug Probe Driver).cc35x1e.debugActionRequestPath: path to the signeddebug_action_requestbin file.
To create and sign debug_action_request, use the SimpleLink WiFi ToolBox.
Example action_params.json file, referenced below as <PATH TO ACTION PARAMS FILE>. Click to expand:
action_params.json
{
"programming": {
"header_version": 1,
"udid": "",
"pub_key": "",
"payload_param": {
"type_version": 0,
"payload": {
"prog_req_content": {
"fuse_programming_instruction_update": false,
"flash_factory_reset": false,
"boot_sector": true,
"primary_tbl": true,
"secondary_tbl": false,
"primary_vendor_image": true,
"primary_vendor_sbl": false,
"secondary_vendor_image": false,
"secondary_vendor_sbl": false,
"primary_ti_wsoc": true,
"secondary_ti_wsoc": false,
"primary_ti_wsoc_bl2": false,
"secondary_ti_wsoc_bl2": false,
"protected_storage": false
},
"prog_validation": {
"fuse_programming_instruction_update": false,
"flash_factory_reset": false,
"boot_sector": false,
"primary_tbl": false,
"secondary_tbl": false,
"primary_vendor_image": false,
"primary_vendor_sbl": false,
"secondary_vendor_image": false,
"secondary_vendor_sbl": false,
"primary_ti_wsoc": false,
"secondary_ti_wsoc": false,
"primary_ti_wsoc_bl2": false,
"secondary_ti_wsoc_bl2": false,
"protected_storage": false
}
}
}
},
"query": {
"header_version": 1,
"udid": "",
"pub_key": "",
"payload_param": {
"type_version": 0,
"payload": {
"query_req_content": {
"boot_sector_query": false,
"primary_ti_bootloader_query": false,
"secondary_ti_bootloader_query": false,
"primary_vendor_image_query": false,
"primary_vendor_sbl_query": false,
"secondary_vendor_image_query": false,
"secondary_vendor_sbl_query": false,
"primary_ti_wsoc_query": false,
"secondary_ti_wsoc_query": false,
"primary_ti_wsoc_bl2_query": false,
"secondary_ti_wsoc_bl2_query": false,
"protected_storage_query": false
}
}
}
},
"debug": {
"header_version": 1,
"udid": "",
"pub_key": "",
"payload_param": {
"type_version": 0,
"payload": {
"vendor_debug_bypass": {
"efuse_crc_validation_bypass": false,
"otfde_protection_bypass": false,
"second_container_validation_bypass": false,
"rollback_validation_bypass": false,
"security_policy_bypass": false,
"security_Failure_Behavioral_bypass": false,
"primary_rot_switching_to_secondary_bypass": false,
"crc_efuse_validation_bypass": false,
"non_crc_efuse_validation_otp_bypass": false,
"non_crc_efuse_mismatch_bypass": false,
"soc_boot_configurations_bypass": false,
"host_boot_configurations_bypass": false,
"soc_security_configuration_bypass": false,
"host_security_configuration_bypass": false,
"host_services_irq_configurations_bypass": false,
"full_open_all_vendors_debug": false,
"full_open_vendors_all_ns_debug": false,
"full_open_vendors_all_s_debug": false,
"partial_open_all_vendors_debug": false,
"partial_open_vendors_all_ns_debug": false,
"partial_open_vendors_all_s_debug": false
},
"vendor_efuse_crc_validation_bypass": {
"m33_halt_or_run": "halt",
"clear_errors_scratchpad": false
},
"vendors_hide_and_lock_policy_instructions": {
"host_boot_done_set_bypass": false,
"host_peripherals_lock_set_bypass": false,
"icache_configurations_lock_set_bypass": false,
"m33_memory_partitioning_lock_set_bypass": false,
"memss_mode_and_firewall_lock_set_bypass": false,
"dma_channel_owner_lock_set_bypass": false,
"core_events_lock_set_bypass": false,
"otfde_region_lock_bypass": false
}
}
}
},
"rma": {
"header_version": 1,
"udid": "",
"pub_key": "",
"payload_param": {
"type_version": 0,
"payload": {
"enter_rma_option": {
"invalidate_vendor_rot_fuses": false,
"invalidate_other_vendor_fuses": false,
"invalidate_all_vendor_components": false,
"invalidate_internal_memory": false
},
"enter_rma_validation": {
"invalidate_vendor_rot_fuses_validate": false,
"invalidate_other_vendor_fuses_validate": false,
"invalidate_all_vendor_components_validate": false,
"invalidate_internal_memory_validate": false
}
}
}
}
}
Building the debug action request for Windows:
<TOOLBOX_PATH>/simplelink-wifi-toolbox.exe flash-images-builder build action_request --type debug --params_json "<PATH TO ACTION PARAMS FILE>/action_params.json" --dir_out_path "<PATH TO OUTPUT FOLDER>/Debug/toolbox"
Signing the debug action request for Windows:
<TOOLBOX_PATH>/simplelink-wifi-toolbox.exe flash-images-builder sign action_request --unsign_request "<PATH TO OUTPUT FOLDER>/Debug/toolbox/debug_action_request.unsign.bin" --activation_type sdk_example_key --signing_module "<TOOLBOX_PATH>/flash-images-builder/signing_module/sign.py" --dir_out_path "PATH TO OUTPUT FOLDER/Debug/toolbox"
10.1.3. MSPM0¶
10.1.3.1. Device may get into a state where loading a program fails¶
Perform a factory reset to restore the device. In a terminal:
cd <app-path>/Texas Instruments/CCSVSC/resources/debug_1_0_0/openocd
bin/openocd.exe -s "share/openocd/scripts" -f board/ti_mspm0_launchpad.cfg -c init -c mspm0_factory_reset -c shutdown
<app-path>:
Windows:
C:/Users/<user-id>/AppData/LocalLinux:
~/.configMac:
~/Library/Application Support
10.1.4. MSPM33¶
10.2. Projects¶
10.2.1. "ccs-project-services-cli" not recognized as a command¶
The Project CLI's own --help output refers to itself as ccs-project-services-cli, which is the name of the underlying library the CLI is built from, not the command to actually type. Running ccs-project-services-cli will fail with a "command not recognized" error.
Use cli (cli.bat on Windows) instead — see Project Command Line Interface for the available commands.
10.3. Debug¶
10.3.1. CIO is not working¶
Standard CIO (semihosting) is currently not supported.