Skip to content

Instantly share code, notes, and snippets.

@nfbot
Created June 5, 2018 10:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nfbot/30530db26a5e02f768f874582c6b2e0c to your computer and use it in GitHub Desktop.
Save nfbot/30530db26a5e02f768f874582c6b2e0c to your computer and use it in GitHub Desktop.
Template of launch.json for debugging ESP32 target using an Olimex ARM-USB-OCD-H
{
"version": "0.2.0",
"configurations": [
{
"name": "ESP32 nanoCLR - Olimex ARM-USB-OCD-H",
"type": "cppdbg",
"request": "launch",
"MIMode": "gdb",
"miDebuggerPath": "C:/Esp32_Tools/xtensa-esp32-elf/bin/xtensa-esp32-elf-gdb.exe",
"stopAtEntry":true,
"program": "<absolute-path-to-the-build-folder-mind-the-forward-slashes>/targets/FreeRTOS/ESP32_DevKitC/nanoCLR.elf",
"setupCommands": [
{"text": "set logging on"},
{"text": "target extended-remote localhost:3333"},
{"text": "file <absolute-path-to-the-build-folder-mind-the-forward-slashes>/targets/FreeRTOS/ESP32_DevKitC/nanoCLR.elf"},
{"text": "monitor reset halt"},
{"text": "thb app_main"},
{"text": "x $a1=0"}
],
"launchCompleteCommand": "exec-run",
"debugServerPath": "C:/Esp32_Tools/openocd-esp32/bin/openocd.exe",
"debugServerArgs": "-s \"C:/Esp32_Tools/openocd-esp32/share/openocd/scripts/\" -f interface/ftdi/olimex-arm-usb-ocd-h.cfg -f target/esp32.cfg -c \"adapter_khz 3000\" " ,
"serverStarted": "Info : .*Tensilica.*0x1.",
"filterStderr": true,
"externalConsole": true,
"cwd": "${cwd}",
"logging": {
"trace": true,
"traceResponse": true,
"engineLogging": true,
"programOutput": true,
"exceptions": true,
"moduleLoad": true
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment