1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

cpu/esp32: Reset when starting debugging

To avoid 'Target not examined yet' error
This commit is contained in:
Erik Ekman 2021-09-28 22:32:18 +02:00
parent 4911066fb0
commit cbfe502cc6
2 changed files with 10 additions and 1 deletions

View File

@ -90,4 +90,6 @@ ifneq (,$(filter esp_jtag,$(USEMODULE)))
IMAGE_OFFSET = 0x10000
# Flash checksumming not supported on xtensa
OPENOCD_SKIP_VERIFY = yes
# Without resets debug target fails with 'Target not examined yet'
OPENOCD_DBG_EXTRA_CMD += -c 'reset halt'
endif

View File

@ -49,7 +49,14 @@ ifneq (,$(OPENOCD_CMD_RESET_RUN))
$(call target-export-variables,reset,OPENOCD_CMD_RESET_RUN)
endif
OPENOCD_FLASH_TARGETS = flash flash-only
OPENOCD_DEBUG_TARGETS = debug debugr debug-server
ifneq (,$(OPENOCD_DBG_EXTRA_CMD))
# Export OPENOCD_DBG_EXTRA_CMD only to the flash/flash-only target
$(call target-export-variables,$(OPENOCD_DEBUG_TARGETS),OPENOCD_DBG_EXTRA_CMD)
endif
OPENOCD_FLASH_TARGETS = flash flash-only flashr
ifneq (,$(IMAGE_OFFSET))
# Export IMAGE_OFFSET only to the flash/flash-only target