Skip to content

Commit

Permalink
Don't include esp_gdbstub component unless ENABLE_GDB=1
Browse files Browse the repository at this point in the history
  • Loading branch information
mikee47 committed Feb 7, 2023
1 parent ac9236a commit 69a24fa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 8 additions & 2 deletions Sming/Arch/Esp32/Components/esp32/component.mk
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ SDK_COMPONENTS := \
efuse \
esp_common \
esp_event \
esp_gdbstub \
esp_hw_support \
esp_pm \
esp_rom \
Expand All @@ -193,6 +192,10 @@ SDK_COMPONENTS := \
soc \
spi_flash

ifeq ($(ENABLE_GDB),1)
SDK_COMPONENTS += esp_gdbstub
endif

ifneq (,$(filter v4.3%,$(IDF_VERSION)))
SDK_COMPONENTS += $(ESP_VARIANT)
else
Expand Down Expand Up @@ -408,10 +411,13 @@ $(SDK_CONFIG_DEFAULTS): $(SDK_CUSTOM_CONFIG_PATH)
$(Q) $(foreach f,$(SDK_CONFIG_FILES),\
$(if $(wildcard $f),cat $f >> $@;) \
)
$(Q) printf "\n# ESPTOOL (bootloader) settings\n" >> $@
$(Q) printf "\n# Auto-generated settings\n" >> $@
$(Q) echo "CONFIG_ESPTOOLPY_FLASHMODE_$(SPI_MODE)=y" >> $@
$(Q) echo "CONFIG_ESPTOOLPY_FLASHFREQ_$(SPI_SPEED)M=y" >> $@
$(Q) echo "CONFIG_ESPTOOLPY_FLASHSIZE_$(SPI_SIZE)B=y" >> $@
ifeq ($(ENABLE_GDB), 1)
$(Q) echo "CONFIG_ESP_SYSTEM_PANIC_GDBSTUB=$(if $(ENABLE_GDB),y,n)" >> $@
endif

##@Configuration

Expand Down
3 changes: 0 additions & 3 deletions Sming/Arch/Esp32/Components/esp32/sdk/config/debug
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,3 @@ CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y
CONFIG_FREERTOS_USE_TRACE_FACILITY=y
CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y
CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID=y

# Debugging
CONFIG_ESP_SYSTEM_PANIC_GDBSTUB=y

0 comments on commit 69a24fa

Please sign in to comment.