Minor C3 debug tweaks
This commit is contained in:
parent
ca01200b4f
commit
bd2c1198d9
@ -120,19 +120,25 @@ CFLAGS += -DSTACK_CANARY_VALUE=0xa5a5a5a5
|
||||
|
||||
#Debugging/Optimization
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -DDEBUG -ggdb
|
||||
OPTIMIZATION_FLAGS ?= -Og
|
||||
# You may want to enable these flags to make setting breakpoints easier.
|
||||
# CFLAGS += -fno-inline -fno-ipa-sra
|
||||
CFLAGS += -ggdb
|
||||
ifeq ($(IDF_TARGET_ARCH),riscv)
|
||||
OPTIMIZATION_FLAGS ?= -Os
|
||||
CFLAGS += -DNDEBUG
|
||||
else
|
||||
OPTIMIZATION_FLAGS ?= -Og
|
||||
CFLAGS += -DDEBUG
|
||||
endif
|
||||
# You may want to enable these flags to make setting breakpoints easier.
|
||||
# CFLAGS += -fno-inline -fno-ipa-sra
|
||||
else
|
||||
CFLAGS += -DNDEBUG -ggdb3
|
||||
# RISC-V is larger than xtensa
|
||||
# Use -Os for RISC-V when it overflows
|
||||
ifeq ($(IDF_TARGET_ARCH),riscv)
|
||||
OPTIMIZATION_FLAGS ?= -Os
|
||||
else
|
||||
OPTIMIZATION_FLAGS ?= -O2
|
||||
endif
|
||||
CFLAGS += -DNDEBUG -ggdb3
|
||||
# RISC-V is larger than xtensa
|
||||
# Use -Os for RISC-V when it overflows
|
||||
ifeq ($(IDF_TARGET_ARCH),riscv)
|
||||
OPTIMIZATION_FLAGS ?= -Os
|
||||
else
|
||||
OPTIMIZATION_FLAGS ?= -O2
|
||||
endif
|
||||
endif
|
||||
|
||||
# option to override compiler optimization level, set in boards/$(BOARD)/mpconfigboard.mk
|
||||
|
@ -62,6 +62,11 @@ static const uint64_t pin_mask_reset_forbidden =
|
||||
GPIO_SEL_18 | // USB D-
|
||||
GPIO_SEL_19 | // USB D+
|
||||
#endif
|
||||
#if CONFIG_ESP_CONSOLE_UART_DEFAULT && CONFIG_ESP_CONSOLE_UART_NUM == 0
|
||||
// Never reset debug UART/console pins.
|
||||
GPIO_SEL_20 |
|
||||
GPIO_SEL_21 |
|
||||
#endif
|
||||
#endif // ESP32C3
|
||||
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3)
|
||||
|
Loading…
Reference in New Issue
Block a user