1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

cpu/esp32: use same UART device in stdio_uart and bootloader

This commit is contained in:
Gunar Schorcht 2023-01-06 14:40:01 +01:00
parent 623660b399
commit 7230299575
3 changed files with 13 additions and 8 deletions

View File

@ -32,6 +32,11 @@
extern "C" {
#endif
/**
* @brief UART device used for STDIO
*/
#define STDIO_UART_DEV CONFIG_ESP_CONSOLE_UART_NUM
/**
* @name Power management configuration
* @{

View File

@ -55,15 +55,15 @@
/**
* Default console configuration
*
* STDIO_UART_BAUDRATE is used as CONFIG_CONSOLE_UART_BAUDRATE and
* STDIO_UART_BAUDRATE is used as CONFIG_ESP_CONSOLE_UART_BAUDRATE and
* can be overridden by an application specific configuration.
*/
#define CONFIG_CONSOLE_UART_NUM 0
#define CONFIG_ESP_CONSOLE_UART_NUM CONFIG_CONSOLE_UART_NUM
#ifndef CONFIG_CONSOLE_UART_BAUDRATE
#define CONFIG_CONSOLE_UART_BAUDRATE STDIO_UART_BAUDRATE
#ifdef CONFIG_CONSOLE_UART_NUM
#define CONFIG_ESP_CONSOLE_UART_NUM CONFIG_CONSOLE_UART_NUM
#else
#define CONFIG_ESP_CONSOLE_UART_NUM 0
#endif
#define CONFIG_ESP_CONSOLE_UART_BAUDRATE STDIO_UART_BAUDRATE
/**
* Log output configuration (DO NOT CHANGE)

View File

@ -148,7 +148,7 @@ static NORETURN void IRAM system_startup_cpu0(void)
#endif
/* initialize stdio */
esp_rom_uart_tx_wait_idle(CONFIG_CONSOLE_UART_NUM);
esp_rom_uart_tx_wait_idle(CONFIG_ESP_CONSOLE_UART_NUM);
stdio_init();
RESET_REASON reset_reason = rtc_get_reset_reason(PRO_CPU_NUM);
@ -315,7 +315,7 @@ static NORETURN void IRAM system_init (void)
/* starting RIOT */
#if IS_USED(MODULE_ESP_LOG_STARTUP)
LOG_STARTUP("Starting RIOT kernel on PRO cpu\n");
esp_rom_uart_tx_wait_idle(CONFIG_CONSOLE_UART_NUM);
esp_rom_uart_tx_wait_idle(CONFIG_ESP_CONSOLE_UART_NUM);
#else
puts("");
#endif