{
    // My custom launch.json file - uses JLink for programming 
    // ------------------------------------------------------------------------

    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
          "name": "Debug - JLink",
          "showDevDebugOutput": "parsed",
          "cwd": "${workspaceFolder}",
          "executable": "${command:cmake.launchTargetPath}",
          "request": "launch",
          "type": "cortex-debug",
          "servertype": "jlink",
          "interface": "swd",
          // Customise for the device
          "svdFile": "${config:STM32VSCodeExtension.cubeCLT.path}/STMicroelectronics_CMSIS_SVD/STM32F301.svd",
          "preLaunchTask": "Build project",
          "device": "STM32G030K6Tx", //MCU used - change if necessary 
          // Can add external flash loader stuff here and below too as per the example:
          // "device": "STM32F469NIHx?BankAddr=0x90000000&Loader=CLK@PF10_nCS@PB6_D0@PF8_D1@PF9_D2@PF7_D3@PF6",
          "runToEntryPoint": "main",
          "postRestartCommands": [
            "break main",
            "continue",
          ]
        },
        {
          "name": "Flash - JLink",
          "showDevDebugOutput": "parsed",
          "cwd": "${workspaceFolder}",
          "executable": "${command:cmake.launchTargetPath}",
          "request": "launch",
          "type": "cortex-debug",
          "servertype": "jlink",
          "interface": "swd",
          "preLaunchTask": "Build project",
          "device": "STM32G030K6Tx",  //MCU used - change if necessary         
          "runToEntryPoint": "",
          "postLaunchCommands": [
            "disconnect"
          ],
        },
        {
          "name": "Clean & Flash - JLink",
          "showDevDebugOutput": "parsed",
          "cwd": "${workspaceFolder}",
          "executable": "${command:cmake.launchTargetPath}",
          "request": "launch",
          "type": "cortex-debug",
          "servertype": "jlink",
          "interface": "swd",
          "preLaunchTask": "Re-build project",
          "device": "STM32G030K6Tx",  //MCU used - change if necessary 
          "runToEntryPoint": "",
          "postLaunchCommands": [
            "disconnect"
          ],
        },
    ]
}