Skip to content

Commit a42219d

Browse files
authored
Implement JTAG Debug for Arduino IDE 2.0 (#90)
* Enable FREERTOS_WATCHPOINT_END_OF_STACK only for Xtensa * Skip collecting optimization flag and esptool.py
1 parent ed55004 commit a42219d

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

Diff for: configs/defconfig.common

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ CONFIG_FATFS_API_ENCODING_UTF_8=y
3838
CONFIG_FMB_TIMER_PORT_ENABLED=y
3939
CONFIG_FREERTOS_HZ=1000
4040
# CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION is not set
41-
CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y
4241
CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1024
4342
CONFIG_HEAP_POISONING_LIGHT=y
4443
CONFIG_HTTPD_MAX_REQ_HDR_LEN=1024

Diff for: configs/defconfig.esp32

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ CONFIG_FREERTOS_FPU_IN_ISR=y
1919
CONFIG_TWAI_ERRATA_FIX_BUS_OFF_REC=y
2020
CONFIG_TWAI_ERRATA_FIX_TX_INTR_LOST=y
2121
CONFIG_TWAI_ERRATA_FIX_RX_FRAME_INVALID=y
22-
CONFIG_TWAI_ERRATA_FIX_RX_FIFO_CORRUPT=y
22+
CONFIG_TWAI_ERRATA_FIX_RX_FIFO_CORRUPT=y
23+
CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y

Diff for: configs/defconfig.esp32s2

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y
44
CONFIG_ESP32S2_KEEP_USB_ALIVE=y
55
# CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0 is not set
66
# CONFIG_USE_WAKENET is not set
7-
# CONFIG_USE_MULTINET is not set
7+
# CONFIG_USE_MULTINET is not set
8+
CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y

Diff for: configs/defconfig.esp32s3

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES_TWO=y
88
CONFIG_SR_WN_MODEL_WN8_QUANT=y
99
CONFIG_SR_WN_WN8_HIESP=y
1010
CONFIG_SR_MN_ENGLISH=y
11-
CONFIG_SR_MN_EN_MULTINET5_SINGLE_RECOGNITION_QUANT8=y
11+
CONFIG_SR_MN_EN_MULTINET5_SINGLE_RECOGNITION_QUANT8=y
12+
CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y

Diff for: tools/config.sh

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ AR_COMPS="$AR_ROOT/components"
4343
AR_OUT="$AR_ROOT/out"
4444
AR_TOOLS="$AR_OUT/tools"
4545
AR_PLATFORM_TXT="$AR_OUT/platform.txt"
46-
AR_ESPTOOL_PY="$AR_TOOLS/esptool.py"
4746
AR_GEN_PART_PY="$AR_TOOLS/gen_esp32part.py"
4847
AR_SDK="$AR_TOOLS/sdk/$IDF_TARGET"
4948

Diff for: tools/copy-libs.sh

+4-5
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ for item in "${@:2:${#@}-5}"; do
9292
if [[ "${item:2:7}" != "ARDUINO" ]] && [[ "$item" != "-DESP32" ]]; then #skip ARDUINO defines
9393
DEFINES+="$item "
9494
fi
95+
elif [ "$prefix" = "-O" ]; then
96+
PIO_CC_FLAGS+="$item "
9597
elif [[ "$item" != "-Wall" && "$item" != "-Werror=all" && "$item" != "-Wextra" ]]; then
9698
if [[ "${item:0:23}" != "-mfix-esp32-psram-cache" && "${item:0:18}" != "-fmacro-prefix-map" ]]; then
9799
C_FLAGS+="$item "
@@ -106,7 +108,7 @@ str=`printf '%b' "$str"` #unescape the string
106108
set -- $str
107109
for item in "${@:2:${#@}-5}"; do
108110
prefix="${item:0:2}"
109-
if [[ "$prefix" != "-I" && "$prefix" != "-D" && "$item" != "-Wall" && "$item" != "-Werror=all" && "$item" != "-Wextra" ]]; then
111+
if [[ "$prefix" != "-I" && "$prefix" != "-D" && "$item" != "-Wall" && "$item" != "-Werror=all" && "$item" != "-Wextra" && "$prefix" != "-O" ]]; then
110112
if [[ "${item:0:23}" != "-mfix-esp32-psram-cache" && "${item:0:18}" != "-fmacro-prefix-map" ]]; then
111113
AS_FLAGS+="$item "
112114
if [[ $C_FLAGS == *"$item"* ]]; then
@@ -125,7 +127,7 @@ str=`printf '%b' "$str"` #unescape the string
125127
set -- $str
126128
for item in "${@:2:${#@}-5}"; do
127129
prefix="${item:0:2}"
128-
if [[ "$prefix" != "-I" && "$prefix" != "-D" && "$item" != "-Wall" && "$item" != "-Werror=all" && "$item" != "-Wextra" ]]; then
130+
if [[ "$prefix" != "-I" && "$prefix" != "-D" && "$item" != "-Wall" && "$item" != "-Werror=all" && "$item" != "-Wextra" && "$prefix" != "-O" ]]; then
129131
if [[ "${item:0:23}" != "-mfix-esp32-psram-cache" && "${item:0:18}" != "-fmacro-prefix-map" ]]; then
130132
CPP_FLAGS+="$item "
131133
if [[ $PIO_CC_FLAGS != *"$item"* ]]; then
@@ -479,9 +481,6 @@ rm -rf platform_start.txt platform_mid.txt 1platform_mid.txt
479481
# sdkconfig
480482
cp -f "sdkconfig" "$AR_SDK/sdkconfig"
481483

482-
# esptool.py
483-
cp "$IDF_COMPS/esptool_py/esptool/esptool.py" "$AR_ESPTOOL_PY"
484-
485484
# gen_esp32part.py
486485
cp "$IDF_COMPS/partition_table/gen_esp32part.py" "$AR_GEN_PART_PY"
487486

0 commit comments

Comments
 (0)