mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
esp_rom/esp_system: Add flag for ROM multiple UART output, esp32c3 console
From internal commit 6d894813
This commit is contained in:
parent
544c5e57ce
commit
4ff8c7ae98
@ -24,10 +24,13 @@
|
||||
#if CONFIG_IDF_TARGET_ESP32S2
|
||||
#include "esp32s2/rom/usb/cdc_acm.h"
|
||||
#include "esp32s2/rom/usb/usb_common.h"
|
||||
#elif CONFIG_IDF_TARGET_ESP32C3
|
||||
#include "esp32c3/rom/ets_sys.h"
|
||||
#endif
|
||||
#include "esp_rom_gpio.h"
|
||||
#include "esp_rom_uart.h"
|
||||
#include "esp_rom_sys.h"
|
||||
#include "esp_rom_caps.h"
|
||||
|
||||
#ifdef CONFIG_ESP_CONSOLE_UART_NONE
|
||||
void bootloader_console_init(void)
|
||||
@ -42,7 +45,12 @@ void bootloader_console_init(void)
|
||||
{
|
||||
const int uart_num = CONFIG_ESP_CONSOLE_UART_NUM;
|
||||
|
||||
#if !ESP_ROM_SUPPORT_MULTIPLE_UART
|
||||
/* esp_rom_install_channel_put is not available unless multiple UARTs are supported */
|
||||
esp_rom_install_uart_printf();
|
||||
#else
|
||||
esp_rom_install_channel_putc(1, esp_rom_uart_putc);
|
||||
#endif
|
||||
|
||||
// Wait for UART FIFO to be empty.
|
||||
esp_rom_uart_tx_wait_idle(0);
|
||||
|
@ -94,9 +94,13 @@ menu "Common ESP-related"
|
||||
bool
|
||||
default y if ESP_CONSOLE_UART_DEFAULT || ESP_CONSOLE_UART_CUSTOM
|
||||
|
||||
config ESP_CONSOLE_MULTIPLE_UART
|
||||
bool
|
||||
default y if !IDF_TARGET_ESP32C3
|
||||
|
||||
choice ESP_CONSOLE_UART_NUM
|
||||
prompt "UART peripheral to use for console output (0-1)"
|
||||
depends on ESP_CONSOLE_UART_CUSTOM
|
||||
depends on ESP_CONSOLE_UART_CUSTOM && ESP_CONSOLE_MULTIPLE_UART
|
||||
default ESP_CONSOLE_UART_CUSTOM_NUM_0
|
||||
help
|
||||
This UART peripheral is used for console output from the ESP-IDF Bootloader and the app.
|
||||
@ -116,6 +120,7 @@ menu "Common ESP-related"
|
||||
config ESP_CONSOLE_UART_NUM
|
||||
int
|
||||
default 0 if ESP_CONSOLE_UART_DEFAULT
|
||||
default 0 if !ESP_CONSOLE_MULTIPLE_UART
|
||||
default 0 if ESP_CONSOLE_UART_CUSTOM_NUM_0
|
||||
default 1 if ESP_CONSOLE_UART_CUSTOM_NUM_1
|
||||
default -1 if !ESP_CONSOLE_UART
|
||||
@ -125,6 +130,7 @@ menu "Common ESP-related"
|
||||
depends on ESP_CONSOLE_UART_CUSTOM
|
||||
range 0 46
|
||||
default 1 if IDF_TARGET_ESP32
|
||||
default 21 if IDF_TARGET_ESP32C3
|
||||
default 43
|
||||
help
|
||||
This GPIO is used for console UART TX output in the ESP-IDF Bootloader and the app (including
|
||||
@ -138,6 +144,7 @@ menu "Common ESP-related"
|
||||
depends on ESP_CONSOLE_UART_CUSTOM
|
||||
range 0 46
|
||||
default 3 if IDF_TARGET_ESP32
|
||||
default 20 if IDF_TARGET_ESP32C3
|
||||
default 44
|
||||
help
|
||||
This GPIO is used for UART RX input in the ESP-IDF Bootloader and the app (including
|
||||
|
@ -24,6 +24,8 @@ PROVIDE ( esp_rom_uart_tx_one_char = uart_tx_one_char );
|
||||
PROVIDE ( esp_rom_uart_tx_wait_idle = uart_tx_wait_idle );
|
||||
PROVIDE ( esp_rom_uart_rx_one_char = uart_rx_one_char );
|
||||
PROVIDE ( esp_rom_uart_rx_string = UartRxString );
|
||||
PROVIDE ( esp_rom_uart_putc = ets_write_char_uart );
|
||||
|
||||
|
||||
PROVIDE ( esp_rom_md5_init = MD5Init );
|
||||
PROVIDE ( esp_rom_md5_update = MD5Update );
|
||||
|
Loading…
x
Reference in New Issue
Block a user