zephyr/boards/xtensa/esp32s2_saola/board.cmake
Sylvio Alves 06a624f2a3 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>
2021-10-08 12:59:55 +02:00

17 lines
764 B
CMake

# 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)