From f92711de776cd38df0310b39a057e72ce1d358f2 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 2 May 2018 17:04:36 +0300 Subject: [PATCH] Compatibility with a new PIO Unified Debugger for VSCode --- platform.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/platform.py b/platform.py index df8b605..a167f9f 100644 --- a/platform.py +++ b/platform.py @@ -59,16 +59,23 @@ class Espressif32Platform(PlatformBase): "executable": "bin/openocd", "arguments": server_args }, + "init_break": "thb app_main", "init_cmds": [ + "define pio_reset_halt_target", + " mon reset halt", + " x $a1=0", + "end", + "define pio_reset_target", + " mon reset", + "end", "target extended-remote $DEBUG_PORT", - 'file "$PROG_PATH"', - "$LOAD_CMD", - "mon reset halt", "$INIT_BREAK", - "x $a1=0" + "mon reset halt", + "$LOAD_CMD", + "pio_reset_halt_target", + "continue" ], - "load_cmd": 'mon program_esp32 "$PROG_DIR/firmware.bin" 0x10000', - "init_break": "thb app_main" + "load_cmd": 'mon program_esp32 "$PROG_DIR/firmware.bin" 0x10000 verify' } board.manifest['debug'] = debug