From 3d7d211157c8fc624be8fd7436143173c596f200 Mon Sep 17 00:00:00 2001 From: Erik Ekman Date: Mon, 27 Sep 2021 22:53:18 +0200 Subject: [PATCH 1/9] cpu/esp: Always create app.elf.bin and partitions.bin Even if programmer is not esptool --- cpu/esp_common/Makefile.include | 42 +++++++++++++++++++++++++++++++++ makefiles/tools/esptool.inc.mk | 33 -------------------------- 2 files changed, 42 insertions(+), 33 deletions(-) diff --git a/cpu/esp_common/Makefile.include b/cpu/esp_common/Makefile.include index 6d34b99845..977738eacc 100644 --- a/cpu/esp_common/Makefile.include +++ b/cpu/esp_common/Makefile.include @@ -105,3 +105,45 @@ PROGRAMMER ?= esptool # Add esptool in the list supported programmers PROGRAMMERS_SUPPORTED += esptool + +# The ELFFILE is defined by default in $(RIOTBASE)/Makefile.include but only +# after this file is included, so we need ELFFILE defined earlier. +# This is used to create new make rules in this file (based on FLASHFILE) +# and can't be deferred. +ELFFILE ?= $(BINDIR)/$(APPLICATION).elf +FLASHFILE ?= $(ELFFILE).bin + +ESPTOOL ?= $(RIOTTOOLS)/esptool/esptool.py + +# This is the binary that ends up programmed in the flash. +$(ELFFILE).bin: $(ELFFILE) + $(Q)$(ESPTOOL) --chip $(FLASH_CHIP) elf2image --flash_mode $(FLASH_MODE) \ + --flash_size $(FLASH_SIZE)MB --flash_freq $(FLASH_FREQ) $(FLASH_OPTS) \ + -o $@ $< + + +# Convert .elf and .csv to .bin files at build time, but make them available for +# tests at flash time. These can't be added to FLASHDEPS because they depend on +# on ELFFILE and would trigger a rebuild with "flash-only". +BUILD_FILES += $(FLASHFILE) $(BINDIR)/partitions.bin +TEST_EXTRA_FILES += $(FLASHFILE) $(BINDIR)/partitions.bin + +# Default partition table with no OTA. Can be replaced with a custom partition +# table setting PARTITION_TABLE_CSV. +PARTITION_TABLE_CSV ?= $(BINDIR)/partitions.csv + +$(BINDIR)/partitions.csv: $(FLASHFILE) + $(Q)printf "\n" > $(BINDIR)/partitions.csv + $(Q)printf "nvs, data, nvs, 0x9000, 0x6000\n" >> $@ + $(Q)printf "phy_init, data, phy, 0xf000, 0x1000\n" >> $@ + $(Q)printf "factory, app, factory, 0x10000, " >> $@ + $(Q)ls -l $< | awk '{ print $$5 }' >> $@ + +$(BINDIR)/partitions.bin: $(PARTITION_TABLE_CSV) + $(Q)python3 $(RIOTTOOLS)/esptool/gen_esp32part.py --verify $< $@ + +# Convert .elf and .csv to .bin files at build time, but make them available for +# tests at flash time. These can't be added to FLASHDEPS because they depend on +# on ELFFILE and would trigger a rebuild with "flash-only". +BUILD_FILES += $(FLASHFILE) $(BINDIR)/partitions.bin +TEST_EXTRA_FILES += $(FLASHFILE) $(BINDIR)/partitions.bin diff --git a/makefiles/tools/esptool.inc.mk b/makefiles/tools/esptool.inc.mk index 566797fc4b..4188590a03 100644 --- a/makefiles/tools/esptool.inc.mk +++ b/makefiles/tools/esptool.inc.mk @@ -9,19 +9,6 @@ BOOTLOADER_BIN = bootloader$(BOOTLOADER_COLOR)$(BOOTLOADER_INFO).bin ESPTOOL ?= $(RIOTTOOLS)/esptool/esptool.py -# The ELFFILE is defined by default in $(RIOTBASE)/Makefile.include but only -# after the $(PROGRAMMER).inc.mk file is included, so we need ELFFILE defined -# earlier. This is used to create new make rules in this file (based on -# FLASHFILE) and can't be deferred. -ELFFILE ?= $(BINDIR)/$(APPLICATION).elf -FLASHFILE ?= $(ELFFILE).bin - -# Convert .elf and .csv to .bin files at build time, but make them available for -# tests at flash time. These can't be added to FLASHDEPS because they depend on -# on ELFFILE and would trigger a rebuild with "flash-only". -BUILD_FILES += $(FLASHFILE) $(BINDIR)/partitions.bin -TEST_EXTRA_FILES += $(FLASHFILE) $(BINDIR)/partitions.bin - # flasher configuration ifneq (,$(filter esp_qemu,$(USEMODULE))) FLASHER = @@ -38,26 +25,6 @@ else FFLAGS += 0x10000 $(FLASHFILE) endif -# This is the binary that ends up programmed in the flash. -$(ELFFILE).bin: $(ELFFILE) - $(Q)$(ESPTOOL) --chip $(FLASH_CHIP) elf2image --flash_mode $(FLASH_MODE) \ - --flash_size $(FLASH_SIZE)MB --flash_freq $(FLASH_FREQ) $(FLASH_OPTS) \ - -o $@ $< - -# Default partition table with no OTA. Can be replaced with a custom partition -# table setting PARTITION_TABLE_CSV. -PARTITION_TABLE_CSV ?= $(BINDIR)/partitions.csv - -$(BINDIR)/partitions.csv: $(FLASHFILE) - $(Q)printf "\n" > $(BINDIR)/partitions.csv - $(Q)printf "nvs, data, nvs, 0x9000, 0x6000\n" >> $@ - $(Q)printf "phy_init, data, phy, 0xf000, 0x1000\n" >> $@ - $(Q)printf "factory, app, factory, 0x10000, " >> $@ - $(Q)ls -l $< | awk '{ print $$5 }' >> $@ - -$(BINDIR)/partitions.bin: $(PARTITION_TABLE_CSV) - $(Q)python3 $(RIOTTOOLS)/esptool/gen_esp32part.py --verify $< $@ - .PHONY: esp-qemu esp-qemu: From d47aa2d550ea6b1d16c6cd3f541da7e12d4cddb4 Mon Sep 17 00:00:00 2001 From: Erik Ekman Date: Tue, 28 Sep 2021 00:00:22 +0200 Subject: [PATCH 2/9] cpu/esp32: Flash bootloader, partition and app via openocd https://github.com/espressif/openocd-esp32 is needed. Example config (when compiled from source): export OPENOCD="~/esp/openocd-esp32/src/openocd -s ~/esp/openocd-esp32/tcl" --- cpu/esp32/Makefile.include | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cpu/esp32/Makefile.include b/cpu/esp32/Makefile.include index d269d72fff..524747e091 100644 --- a/cpu/esp32/Makefile.include +++ b/cpu/esp32/Makefile.include @@ -79,3 +79,13 @@ endif ifneq (,$(filter cpp,$(FEATURES_USED))) ARCHIVES += -lstdc++ endif + +ifneq (,$(filter esp_jtag,$(USEMODULE))) + PROGRAMMERS_SUPPORTED += openocd + PARTITION_POS = 0x8000 + OPENOCD_PRE_FLASH_CMDS = -c 'echo "Installing Bootloader at $(BOOTLOADER_POS)"' \ + -c 'flash write_image erase "$(RIOTCPU)/$(CPU)/bin/bootloader.bin" $(BOOTLOADER_POS) bin' \ + -c 'echo "Installing partition table at $(PARTITION_POS)"' \ + -c 'flash write_image erase "$(BINDIR)/partitions.bin" $(PARTITION_POS) bin' +export IMAGE_OFFSET = 0x10000 +endif From 739ec44739191bffda6a34eb40eaba548e1e3402 Mon Sep 17 00:00:00 2001 From: Erik Ekman Date: Mon, 27 Sep 2021 22:28:07 +0200 Subject: [PATCH 3/9] board/esp32-ethernet-kit: Set openocd board file --- boards/esp32-ethernet-kit-v1_0/Makefile.include | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/boards/esp32-ethernet-kit-v1_0/Makefile.include b/boards/esp32-ethernet-kit-v1_0/Makefile.include index 616000ecbb..1e3b2497a0 100644 --- a/boards/esp32-ethernet-kit-v1_0/Makefile.include +++ b/boards/esp32-ethernet-kit-v1_0/Makefile.include @@ -2,4 +2,8 @@ # configure the serial interface PORT_LINUX ?= /dev/ttyUSB1 +ifneq (,$(filter esp_jtag,$(USEMODULE))) + OPENOCD_CONFIG ?= board/esp32-ethernet-kit-3.3v.cfg +endif + include $(RIOTBOARD)/common/esp32/Makefile.include From 2df7d499c8420705b7752a3db6a3388d39a49351 Mon Sep 17 00:00:00 2001 From: Erik Ekman Date: Tue, 28 Sep 2021 01:13:45 +0200 Subject: [PATCH 4/9] tools/openocd: Export IMAGE_OFFSET only when flashing --- cpu/esp32/Makefile.include | 2 +- makefiles/tools/openocd.inc.mk | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cpu/esp32/Makefile.include b/cpu/esp32/Makefile.include index 524747e091..4ed2013888 100644 --- a/cpu/esp32/Makefile.include +++ b/cpu/esp32/Makefile.include @@ -87,5 +87,5 @@ ifneq (,$(filter esp_jtag,$(USEMODULE))) -c 'flash write_image erase "$(RIOTCPU)/$(CPU)/bin/bootloader.bin" $(BOOTLOADER_POS) bin' \ -c 'echo "Installing partition table at $(PARTITION_POS)"' \ -c 'flash write_image erase "$(BINDIR)/partitions.bin" $(PARTITION_POS) bin' -export IMAGE_OFFSET = 0x10000 + IMAGE_OFFSET = 0x10000 endif diff --git a/makefiles/tools/openocd.inc.mk b/makefiles/tools/openocd.inc.mk index c2f1a2558b..f58af2fe23 100644 --- a/makefiles/tools/openocd.inc.mk +++ b/makefiles/tools/openocd.inc.mk @@ -51,6 +51,11 @@ endif OPENOCD_FLASH_TARGETS = flash flash-only +ifneq (,$(IMAGE_OFFSET)) + # Export IMAGE_OFFSET only to the flash/flash-only target + $(call target-export-variables,$(OPENOCD_FLASH_TARGETS),IMAGE_OFFSET) +endif + ifneq (,$(OPENOCD_PRE_VERIFY_CMDS)) # Export OPENOCD_PRE_VERIFY_CMDS only to the flash/flash-only target $(call target-export-variables,$(OPENOCD_FLASH_TARGETS),OPENOCD_PRE_VERIFY_CMDS) From 1c6d7dcdaf0ed648e2ab0cdf39cc7ca31c30c2a8 Mon Sep 17 00:00:00 2001 From: Erik Ekman Date: Tue, 28 Sep 2021 01:26:07 +0200 Subject: [PATCH 5/9] tools/openocd: Make verifying flashed image optional Checksumming flash is not supported on xtensa platform: Warn : not implemented yet make: *** [.../RIOT/examples/saul/../../Makefile.include:796: flash] Error 1 --- cpu/esp32/Makefile.include | 2 ++ dist/tools/openocd/openocd.sh | 7 ++++++- makefiles/tools/openocd.inc.mk | 5 +++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/cpu/esp32/Makefile.include b/cpu/esp32/Makefile.include index 4ed2013888..f8dd0b2fcb 100644 --- a/cpu/esp32/Makefile.include +++ b/cpu/esp32/Makefile.include @@ -88,4 +88,6 @@ ifneq (,$(filter esp_jtag,$(USEMODULE))) -c 'echo "Installing partition table at $(PARTITION_POS)"' \ -c 'flash write_image erase "$(BINDIR)/partitions.bin" $(PARTITION_POS) bin' IMAGE_OFFSET = 0x10000 + # Flash checksumming not supported on xtensa + OPENOCD_SKIP_VERIFY = yes endif diff --git a/dist/tools/openocd/openocd.sh b/dist/tools/openocd/openocd.sh index ee7141465c..d70d4638db 100755 --- a/dist/tools/openocd/openocd.sh +++ b/dist/tools/openocd/openocd.sh @@ -113,6 +113,8 @@ : ${OPENOCD_CMD_RESET_RUN:="-c 'reset run'"} # Select core on multi-core processors. : ${OPENOCD_CORE:=} +# Set to any value to skip verifying after flashing. +: ${OPENOCD_SKIP_VERIFY:=} # This is an optional offset to the base address that can be used to flash an # image in a different location than it is linked at. This feature can be useful # when flashing images for firmware swapping/remapping boot loaders. @@ -328,6 +330,9 @@ do_flash() { exit $RETVAL fi fi + if [ -z "${OPENOCD_SKIP_VERIFY}" ]; then + OPENOCD_VERIFY="-c 'verify_image \"${IMAGE_FILE}\" ${IMAGE_OFFSET}'" + fi # In case of binary file, IMAGE_OFFSET should include the flash base address # This allows flashing normal binary files without env configuration @@ -358,7 +363,7 @@ do_flash() { ${OPENOCD_PRE_FLASH_CMDS} \ -c 'flash write_image erase \"${IMAGE_FILE}\" ${IMAGE_OFFSET} ${IMAGE_TYPE}' \ ${OPENOCD_PRE_VERIFY_CMDS} \ - -c 'verify_image \"${IMAGE_FILE}\" ${IMAGE_OFFSET}' \ + ${OPENOCD_VERIFY} \ -c 'reset run' \ -c 'shutdown'" && echo 'Done flashing' diff --git a/makefiles/tools/openocd.inc.mk b/makefiles/tools/openocd.inc.mk index f58af2fe23..2f23225e03 100644 --- a/makefiles/tools/openocd.inc.mk +++ b/makefiles/tools/openocd.inc.mk @@ -61,6 +61,11 @@ ifneq (,$(OPENOCD_PRE_VERIFY_CMDS)) $(call target-export-variables,$(OPENOCD_FLASH_TARGETS),OPENOCD_PRE_VERIFY_CMDS) endif +ifneq (,$(OPENOCD_SKIP_VERIFY)) + # Export OPENOCD_SKIP_VERIFY only to the flash/flash-only target + $(call target-export-variables,$(OPENOCD_FLASH_TARGETS),OPENOCD_SKIP_VERIFY) +endif + ifneq (,$(OPENOCD_PRE_FLASH_CMDS)) # Export OPENOCD_PRE_FLASH_CMDS only to the flash/flash-only targets $(call target-export-variables,$(OPENOCD_FLASH_TARGETS),OPENOCD_PRE_FLASH_CMDS) From 4911066fb05c1583eaafefd1e24a26e4fcb1d376 Mon Sep 17 00:00:00 2001 From: Erik Ekman Date: Tue, 28 Sep 2021 01:52:06 +0200 Subject: [PATCH 6/9] board/esp32-ethernet-kit: Document openocd flash/debug --- boards/esp32-ethernet-kit-v1_0/doc_common.txt | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/boards/esp32-ethernet-kit-v1_0/doc_common.txt b/boards/esp32-ethernet-kit-v1_0/doc_common.txt index 585996df17..64f8374058 100644 --- a/boards/esp32-ethernet-kit-v1_0/doc_common.txt +++ b/boards/esp32-ethernet-kit-v1_0/doc_common.txt @@ -102,9 +102,22 @@ Since the USB bridge based on FDI FT2232HL provides a JTAG interface for debuggi To use the JTAG interface, the `esp_jtag` module must be used to disable the `SPI_DEV(0)` which normally uses the GPIOs for the JTAG signals. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -USEMODULE=esp_jtag make flash BOARD=esp32-ethernet-kit-v1_X ... +USEMODULE+=esp_jtag make flash BOARD=esp32-ethernet-kit-v1_X ... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Furthermore the function switches (DIP switches) for the JTAG signals must be set to ON. +To flash using OpenOCD, install the [openocd-esp32](https://github.com/espressif/openocd-esp32) fork. +Export where openocd is located and then flash with PROGRAMMER set: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +export OPENOCD="~/openocd-esp32/src/openocd -s ~/openocd-esp32/tcl" +PROGRAMMER=openocd USEMODULE+=esp_jtag make flash BOARD=esp32-ethernet-kit-v1_X +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To start a debugging session (board will be reset, but not flashed): +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +export OPENOCD="~/openocd-esp32/src/openocd -s ~/openocd-esp32/tcl" +PROGRAMMER=openocd USEMODULE+=esp_jtag make debug BOARD=esp32-ethernet-kit-v1_X +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + [Back to table of contents](#esp32_ethernet_kit_toc) */ From cbfe502cc64e1fb9cd66666d5ebc4a8e96c80917 Mon Sep 17 00:00:00 2001 From: Erik Ekman Date: Tue, 28 Sep 2021 22:32:18 +0200 Subject: [PATCH 7/9] cpu/esp32: Reset when starting debugging To avoid 'Target not examined yet' error --- cpu/esp32/Makefile.include | 2 ++ makefiles/tools/openocd.inc.mk | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/cpu/esp32/Makefile.include b/cpu/esp32/Makefile.include index f8dd0b2fcb..229687157f 100644 --- a/cpu/esp32/Makefile.include +++ b/cpu/esp32/Makefile.include @@ -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 diff --git a/makefiles/tools/openocd.inc.mk b/makefiles/tools/openocd.inc.mk index 2f23225e03..14c7cc1c60 100644 --- a/makefiles/tools/openocd.inc.mk +++ b/makefiles/tools/openocd.inc.mk @@ -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 From 8b467534fe187e248edbfe082d3d65214e20af7a Mon Sep 17 00:00:00 2001 From: Erik Ekman Date: Fri, 15 Oct 2021 09:51:24 +0200 Subject: [PATCH 8/9] boards/esp32-wrover-kit: Add openocd config and docs --- boards/esp32-wrover-kit/Makefile.include | 4 ++++ boards/esp32-wrover-kit/doc.txt | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/boards/esp32-wrover-kit/Makefile.include b/boards/esp32-wrover-kit/Makefile.include index 9adf2f209b..4a4f25c479 100644 --- a/boards/esp32-wrover-kit/Makefile.include +++ b/boards/esp32-wrover-kit/Makefile.include @@ -3,4 +3,8 @@ PSEUDOMODULES += esp32_wrover_kit_camera # configure the serial interface PORT_LINUX ?= /dev/ttyUSB1 +ifneq (,$(filter esp_jtag,$(USEMODULE))) + OPENOCD_CONFIG ?= board/esp32-wrover-kit-3.3v.cfg +endif + include $(RIOTBOARD)/common/esp32/Makefile.include diff --git a/boards/esp32-wrover-kit/doc.txt b/boards/esp32-wrover-kit/doc.txt index 26c9e68f24..e9f503e764 100644 --- a/boards/esp32-wrover-kit/doc.txt +++ b/boards/esp32-wrover-kit/doc.txt @@ -289,6 +289,25 @@ convenient way for On-Chip debugging. Please refer the [ESP-IDF Programming Guide](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/jtag-debugging/index.html) for details on how to setup and how to use ESP-WROVER-KIT and OpenOCD. +To use the JTAG interface, the `esp_jtag` module must be enabled. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +USEMODULE+=esp_jtag make flash BOARD=esp32-wrover-kit ... +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To flash using OpenOCD, install the [openocd-esp32](https://github.com/espressif/openocd-esp32) fork. +The OpenOCD configuration selected by default is for using JTAG via the FTDI chip. +Export where openocd is located and then flash with PROGRAMMER set: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +export OPENOCD="~/openocd-esp32/src/openocd -s ~/openocd-esp32/tcl" +PROGRAMMER=openocd USEMODULE+=esp_jtag make flash BOARD=esp32-wrover-kit +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To start a debugging session (board will be reset, but not flashed): +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +export OPENOCD="~/openocd-esp32/src/openocd -s ~/openocd-esp32/tcl" +PROGRAMMER=openocd USEMODULE+=esp_jtag make debug BOARD=esp32-wrover-kit +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + [Back to table of contents](#esp32_wrover_kit_toc) ## Other Documentation Resources {#esp32_wrover_kit_other-resources} From cbecb4d249d16789e4ae21a4aa0d91ef8ee5254c Mon Sep 17 00:00:00 2001 From: Erik Ekman Date: Mon, 25 Oct 2021 15:53:45 +0200 Subject: [PATCH 9/9] boards/esp32-wrover-kit: Enable esp_jtag module Allows use of openocd by just setting PROGRAMMER. --- boards/esp32-wrover-kit/Kconfig | 2 +- boards/esp32-wrover-kit/Makefile.dep | 3 +++ boards/esp32-wrover-kit/Makefile.features | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/boards/esp32-wrover-kit/Kconfig b/boards/esp32-wrover-kit/Kconfig index 0dea5f2fc3..2bde4ba541 100644 --- a/boards/esp32-wrover-kit/Kconfig +++ b/boards/esp32-wrover-kit/Kconfig @@ -15,11 +15,11 @@ config BOARD_ESP32_WROVER_KIT select HAS_ARDUINO select HAS_ESP_RTC_TIMER_32K select HAS_ESP_SPI_RAM - select HAS_ESP_JTAG select HAS_PERIPH_ADC select HAS_PERIPH_I2C select HAS_PERIPH_PWM select HAS_PERIPH_SPI select HAS_SDCARD_SPI + select MODULE_ESP_JTAG source "$(RIOTBOARD)/common/esp32/Kconfig" diff --git a/boards/esp32-wrover-kit/Makefile.dep b/boards/esp32-wrover-kit/Makefile.dep index f6b6ba1bd4..c79cb6fdc2 100644 --- a/boards/esp32-wrover-kit/Makefile.dep +++ b/boards/esp32-wrover-kit/Makefile.dep @@ -2,4 +2,7 @@ ifneq (,$(filter disp_dev,$(USEMODULE))) USEMODULE += ili9341 endif +# Sets up configuration for openocd +USEMODULE += esp_jtag + include $(RIOTBOARD)/common/esp32/Makefile.dep diff --git a/boards/esp32-wrover-kit/Makefile.features b/boards/esp32-wrover-kit/Makefile.features index a4e5f97d1c..0ff032ef03 100644 --- a/boards/esp32-wrover-kit/Makefile.features +++ b/boards/esp32-wrover-kit/Makefile.features @@ -11,7 +11,6 @@ FEATURES_PROVIDED += periph_spi # unique features provided by the board FEATURES_PROVIDED += sdcard_spi -FEATURES_PROVIDED += esp_jtag FEATURES_PROVIDED += esp_spi_ram FEATURES_PROVIDED += esp_rtc_timer_32k