Commit e31260e0 authored by Stefan Hackenberg's avatar Stefan Hackenberg
Browse files

Fix stop at main on entering debugger

parent 735c6ebc
......@@ -29,11 +29,11 @@
"executable": "$PIOPLATFORMDIR/openocd/bin/openocd",
"arguments": [
"-f", "$PIOPLATFORMDIR/openocd/scripts/interface/kitprog3.cfg",
"-f", "$PIOPLATFORMDIR/openocd/scripts/target/psoc6_2m.cfg",
"-c", "source $PIOPLATFORMDIR/openocd/scripts/target/psoc6_2m.cfg",
"-c", "psoc6 sflash_restrictions 1",
"-c", "program $PROG_PATH",
"-c", "reset_config srst_only;reset run;psoc6.dap dpreg 0x04 0x00",
"-c", "init;reset init"
"-c", "set TARGET_AP cm4_ap;set ENABLE_CM0 0",
"-c", "${TARGET}.cm4 configure -rtos auto -rtos-wipe-on-reset-halt 1"
],
"ready_pattern": "Programming Finished"
}
......
......@@ -15,3 +15,29 @@ class Cypress_psoc6Platform(PlatformBase):
]
# Avoid piping if debug port is not given explicitly
debug_config.env_options['debug_port'] = debug_config.env_options.get('debug_port', debug_config.port)
debug_config.GDB_INIT_SCRIPT = '''
set mem inaccessible-by-default off
set remotetimeout 15
define pio_reset_halt_target
monitor reset init
monitor reset run
monitor sleep 200
monitor psoc6 reset_halt sysresetreq
monitor gdb_sync
monitor stepi
end
define pio_reset_run_target
monitor reset init
monitor reset run
monitor sleep 200
monitor psoc6 reset_halt sysresetreq
monitor gdb_sync
monitor stepi
continue
end
target extended-remote $DEBUG_PORT
pio_reset_halt_target
'''
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment