diff --git a/.gitignore b/.gitignore index 4763b87e5de0bb..9d591e9e9e4dd7 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ !.vscode/tasks.json !.vscode/launch.json !.vscode/settings.json +!.vscode/extensions.json # Platforms .DS_Store diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000000000..d92e0983873689 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,9 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. + // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp + + // List of extensions which should be recommended for users of this workspace. + "recommendations": ["marus25.cortex-debug"], + // List of extensions recommended by VS Code that should not be recommended for users of this workspace. + "unwantedRecommendations": [] +} diff --git a/.vscode/launch.json b/.vscode/launch.json index 833bc6c15d8bea..3965083ba2a8ce 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -83,6 +83,126 @@ "ignoreFailures": true } ] + }, + + { + "name": "Debug Mbed CY8CPROTO_062_4343W", + "type": "cortex-debug", + "request": "launch", + "cwd": "${workspaceRoot}/examples/${input:mbedApp}/mbed", + "executable": "./build-CY8CPROTO_062_4343W/${input:mbedDebugProfile}/chip-mbed-${input:mbedApp}-example", + "servertype": "openocd", + "searchDir": [ + "${workspaceRoot}/config/mbed/scripts", + "${env:OPENOCD_PATH/scripts}" + ], + "configFiles": ["CY8CPROTO_062_4343W.tcl"], + "overrideLaunchCommands": [ + "-enable-pretty-printing", + "monitor program {./build-CY8CPROTO_062_4343W/${input:mbedDebugProfile}/chip-mbed-${input:mbedApp}-example.hex}", + "monitor reset run", + "monitor sleep 200", + "monitor psoc6 reset_halt sysresetreq" + ], + "numberOfProcessors": 2, + "targetProcessor": 1, // Set to 0 for the CM0+, set to 1 for the CM4 + "overrideRestartCommands": [ + "monitor reset init", + "monitor reset run", + "monitor sleep 200", + "monitor psoc6 reset_halt sysresetreq" + ], + "runToMain": true, // if true, program will halt at main. Not used for a restart + "showDevDebugOutput": false // When set to true, displays output of GDB. + }, + + { + "name": "Debug Mbed CY8CPROTO_062_4343W [remote]", + "type": "cortex-debug", + "request": "launch", + "cwd": "${workspaceRoot}/examples/${input:mbedApp}/mbed", + "executable": "./build-CY8CPROTO_062_4343W/${input:mbedDebugProfile}/chip-mbed-${input:mbedApp}-example", + "servertype": "external", + "gdbTarget": "host.docker.internal:3334", //port 3333 for the CM0+, 3334 for the CM4 + "overrideLaunchCommands": [ + "-enable-pretty-printing", + "monitor reset halt", + "load ./build-CY8CPROTO_062_4343W/${input:mbedDebugProfile}/chip-mbed-${input:mbedApp}-example.hex", + "monitor reset run", + "monitor sleep 200", + "monitor psoc6 reset_halt sysresetreq" + ], + "overrideRestartCommands": [ + "monitor reset init", + "monitor reset run", + "monitor sleep 200", + "monitor psoc6 reset_halt sysresetreq" + ], + "runToMain": true, // if true, program will halt at main. Not used for a restart + "showDevDebugOutput": false // When set to true, displays output of GDB. + }, + + { + "name": "Flash Mbed CY8CPROTO_062_4343W", + "type": "cortex-debug", + "request": "launch", + "cwd": "${workspaceRoot}/examples/${input:mbedApp}/mbed", + "executable": "./build-CY8CPROTO_062_4343W/${input:mbedFlashProfile}/chip-mbed-${input:mbedApp}-example", + "servertype": "openocd", + "searchDir": [ + "${workspaceRoot}/config/mbed/scripts", + "${env:OPENOCD_PATH/scripts}" + ], + "configFiles": ["CY8CPROTO_062_4343W.tcl"], + "overrideLaunchCommands": [ + "monitor reset halt", + "monitor program {./build-CY8CPROTO_062_4343W/${input:mbedFlashProfile}/chip-mbed-${input:mbedApp}-example.hex}", + "monitor reset run", + "quit" + ], + "numberOfProcessors": 2, + "targetProcessor": 1, // Set to 0 for the CM0+, set to 1 for the CM4 + "showDevDebugOutput": false // When set to true, displays output of GDB. + }, + + { + "name": "Flash Mbed CY8CPROTO_062_4343W [remote]", + "type": "cortex-debug", + "request": "launch", + "cwd": "${workspaceRoot}/examples/${input:mbedApp}/mbed", + "executable": "./build-CY8CPROTO_062_4343W/${input:mbedFlashProfile}/chip-mbed-${input:mbedApp}-example.hex", + "servertype": "external", + "gdbTarget": "host.docker.internal:3334", //port 3333 for the CM0+, 3334 for the CM4 + "overrideLaunchCommands": [ + "monitor reset halt", + "load ./build-CY8CPROTO_062_4343W/${input:mbedFlashProfile}/chip-mbed-${input:mbedApp}-example.hex", + "monitor reset run", + "quit" + ], + "showDevDebugOutput": false // When set to true, displays output of GDB. + } + ], + "inputs": [ + { + "type": "pickString", + "id": "mbedDebugProfile", + "description": "What mbed profile do you want to debug?", + "options": ["debug", "develop"], + "default": "debug" + }, + { + "type": "pickString", + "id": "mbedFlashProfile", + "description": "What mbed profile do you want to flash?", + "options": ["release", "debug", "develop"], + "default": "release" + }, + { + "type": "pickString", + "id": "mbedApp", + "description": "What mbed application do you want to use?", + "options": ["lock-app"], + "default": "shell" } ] }