soc: esp32: add west debug support
This adds west debug support for ESP32 and ESP32S2 boards using custom openocd tool. Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
This commit is contained in:
parent
49bcc08033
commit
06a624f2a3
3 changed files with 38 additions and 0 deletions
|
@ -1,6 +1,16 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
board_set_flasher_ifnset(esp32)
|
||||
board_set_debugger_ifnset(openocd)
|
||||
|
||||
board_runner_args(openocd --no-init --no-halt --no-targets --no-load)
|
||||
board_runner_args(openocd --gdb-init "set remote hardware-watchpoint-limit 2")
|
||||
board_runner_args(openocd --gdb-init "set disassemble-next-line on")
|
||||
board_runner_args(openocd --gdb-init "set print pretty on")
|
||||
|
||||
board_runner_args(openocd --gdb-init "flushregs")
|
||||
board_runner_args(openocd --gdb-init "mon reset halt")
|
||||
board_runner_args(openocd --gdb-init "thb main")
|
||||
|
||||
set(ESP_IDF_PATH ${ZEPHYR_ESPRESSIF_MODULE_DIR})
|
||||
assert(ESP_IDF_PATH "ESP_IDF_PATH is not set")
|
||||
|
|
|
@ -1,3 +1,17 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
board_runner_args(openocd --cmd-pre-init "set ESP_RTOS none")
|
||||
board_runner_args(openocd --cmd-pre-init "set ESP32_ONLYCPU 1")
|
||||
|
||||
# select FT2232 as default interface (as in ESP-WROVER-KIT or ESP-Prog)
|
||||
board_runner_args(openocd --config "interface/ftdi/esp32_devkitj_v1.cfg")
|
||||
board_runner_args(openocd --config "target/esp32.cfg")
|
||||
|
||||
set (ESPRESSIF_OPENOCD_TOOL ${ESPRESSIF_TOOLCHAIN_PATH}/openocd-esp32/bin/openocd)
|
||||
set (ESPRESSIF_OPENOCD_SCRIPTS ${ESPRESSIF_TOOLCHAIN_PATH}/openocd-esp32/share/openocd/scripts)
|
||||
|
||||
set(OPENOCD ${ESPRESSIF_OPENOCD_TOOL})
|
||||
set(OPENOCD_DEFAULT_PATH ${ESPRESSIF_OPENOCD_SCRIPTS})
|
||||
|
||||
include(${ZEPHYR_BASE}/boards/common/esp32.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -1,3 +1,17 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
board_runner_args(openocd --cmd-pre-init "set ESP_RTOS none")
|
||||
board_runner_args(openocd --cmd-pre-init "set ESP32_ONLYCPU 1")
|
||||
|
||||
# select FT2232 as default interface (as in ESP-WROVER-KIT or ESP-Prog)
|
||||
board_runner_args(openocd --config "interface/ftdi/esp32s2_kaluga_v1.cfg")
|
||||
board_runner_args(openocd --config "target/esp32s2.cfg")
|
||||
|
||||
set (ESPRESSIF_OPENOCD_TOOL ${ESPRESSIF_TOOLCHAIN_PATH}/openocd-esp32/bin/openocd)
|
||||
set (ESPRESSIF_OPENOCD_SCRIPTS ${ESPRESSIF_TOOLCHAIN_PATH}/openocd-esp32/share/openocd/scripts)
|
||||
|
||||
set(OPENOCD ${ESPRESSIF_OPENOCD_TOOL})
|
||||
set(OPENOCD_DEFAULT_PATH ${ESPRESSIF_OPENOCD_SCRIPTS})
|
||||
|
||||
include(${ZEPHYR_BASE}/boards/common/esp32.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue