Skip to content

Commit 4ccbf41

Browse files
committed
espressif: fix UART init for Serial Recovery and unify adapter code
Fix UART initialization for Espressif chips and unify their serial adapter code. Signed-off-by: Almir Okato <[email protected]>
1 parent d14ba22 commit 4ccbf41

File tree

15 files changed

+119
-1283
lines changed

15 files changed

+119
-1283
lines changed

boot/espressif/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ if(CONFIG_ESP_MCUBOOT_SERIAL)
349349
${ZCBOR_DIR}/include
350350
)
351351
list(APPEND port_srcs
352-
${CMAKE_CURRENT_LIST_DIR}/port/${MCUBOOT_TARGET}/serial_adapter.c
352+
${CMAKE_CURRENT_LIST_DIR}/port/serial_adapter.c
353353
${MBEDTLS_DIR}/library/base64.c
354354
)
355355
list(APPEND CRYPTO_INC

boot/espressif/port/esp32/bootloader.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ CONFIG_ESP_SCRATCH_SIZE=0x40000
4242
# CONFIG_ESP_SERIAL_BOOT_GPIO_RX=25
4343
# GPIO for Serial TX signal
4444
# CONFIG_ESP_SERIAL_BOOT_GPIO_TX=26
45+
# Baudrate for Serial Recovery communication
46+
# CONFIG_ESP_SERIAL_BOOT_BAUDRATE=115200
4547

4648
CONFIG_ESP_CONSOLE_UART=y
4749
CONFIG_ESP_CONSOLE_UART_NUM=0

boot/espressif/port/esp32/serial_adapter.c

Lines changed: 0 additions & 185 deletions
This file was deleted.

boot/espressif/port/esp32c2/bootloader.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ CONFIG_ESP_SCRATCH_SIZE=0x40000
4343
# CONFIG_ESP_SERIAL_BOOT_GPIO_RX=2
4444
# GPIO for Serial TX signal
4545
# CONFIG_ESP_SERIAL_BOOT_GPIO_TX=3
46+
# Baudrate for Serial Recovery communication
47+
# CONFIG_ESP_SERIAL_BOOT_BAUDRATE=115200
4648

4749
# Use UART0 for console printing (use either UART or USB alone)
4850
CONFIG_ESP_CONSOLE_UART=y

0 commit comments

Comments
 (0)