Skip to content

Commit 6351de6

Browse files
committed
espressif: Allow -DENABLE_JTAG=0 to force JTAG off
With the Kaluga devkit, the camera interferes with the JTAG function. However, having DEBUG turned on e.g., to get extended debug information on the UART debug connection remains useful. Now, by arranging to add to CFLAGS += -DDEBUG -DENABLE_JTAG=0, this configuration is easy to achieve.
1 parent b453d18 commit 6351de6

File tree

1 file changed

+10
-2
lines changed
  • ports/espressif/supervisor

1 file changed

+10
-2
lines changed

ports/espressif/supervisor/port.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,11 @@ safe_mode_t port_init(void) {
127127
heap = NULL;
128128
never_reset_module_internal_pins();
129129

130-
#if defined(DEBUG)
130+
#ifndef DEBUG
131+
#define DEBUG (0)
132+
#endif
133+
134+
#if DEBUG
131135
// debug UART
132136
#ifdef CONFIG_IDF_TARGET_ESP32C3
133137
common_hal_never_reset_pin(&pin_GPIO20);
@@ -138,7 +142,11 @@ safe_mode_t port_init(void) {
138142
#endif
139143
#endif
140144

141-
#if defined(DEBUG) || defined(ENABLE_JTAG)
145+
#ifndef ENABLE_JTAG
146+
#define ENABLE_JTAG (defined(DEBUG) && DEBUG)
147+
#endif
148+
149+
#if ENABLE_JTAG
142150
// JTAG
143151
#ifdef CONFIG_IDF_TARGET_ESP32C3
144152
common_hal_never_reset_pin(&pin_GPIO4);

0 commit comments

Comments
 (0)