Generating extra launch configurations
When you create a new ModusToolbox™ project, it contains set of common launch configurations. When customizing output hex files, you may need to generate additional Eclipse or VS Code Debug launch configurations for the specific hex files. To do this, insert a special "extra_config" section into the json file. Then, regenerate the launch configurations. For Eclipse, click the "Generate Launches for ..." link in the Quick Panel, or run "make eclipse" in a bash terminal (modus-shell for Windows). For VS Code, run "make vscode".
Extra_config properties
Name | Type | Optional / Required | Description |
|---|---|---|---|
project | string | required | Project name that requires debugging. (This is used to determine the main elf file. The debug session will start from the beginning of main() defined in this elf). The launch config will be bound to this project. |
debug_config_name | string | required | Specifies the output launch config name in the form <debug_config_name> Debug <probe>. |
build_dependency | string | optional | Specifies whether the generated launch config should build a particular project or the entire application. Default is "project". Valid values are "project" or "application". |
default | boolean | optional | If set to true, this hex file will be used for make program and the Program Application config. Default is "false". |
extra_elf_path | string | optional | Allows you to set additional elf file(s) to be used for debugging. It requires the path to the extra elf file relative to the Application-level directory. Supported for TrustZone-enabled devices. |
Extra_config example
{
"schema-version": 1.0,
"content": [
{
"name": "Shift command example",
"description": "Shifts a hex segment to a secondary address",
"enabled": true,
"commands": [
{
"command": "shift",
"inputs": [
{
"description": "CM33 Secure + CM33 Non-Secure application",
"file": "rram_3.hex",
"address" : "0x32030000"
}
],
"outputs": [
{
"description": "CM33 Secure + CM33 Non-Secure application shifted to secure region",
"address": "0x3202A000",
"file": "shifted_rram_3.hex"
}
],
"extra_config": [
{
"project": "proj_cm0p",
"debug_config_name": "Debug_proj_cm0p",
"build_dependency": "application",
"default": true,
"extra_elf_path": ["proj_cm33_ns/build/$(TARGET) /Debug/proj_cm33_ns.elf"]
}
]
}
]
}
]
}