Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makes esp_console_init() calling conditional #84532

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions drivers/clock_control/clock_control_esp32.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ static int esp32_cpu_clock_configure(const struct esp32_cpu_clock_config *cpu_cf
rtc_clk_cfg.xtal_freq = cpu_cfg->xtal_freq;
rtc_clk_cfg.cpu_freq_mhz = cpu_cfg->cpu_freq;

esp_rom_uart_tx_wait_idle(ESP_CONSOLE_UART_NUM);
esp_rom_uart_tx_wait_idle(CONFIG_ESP_CONSOLE_UART_NUM);

#if defined(CONFIG_SOC_SERIES_ESP32C6)
rtc_clk_modem_clock_domain_active_state_icg_map_preinit();
Expand Down Expand Up @@ -709,8 +709,8 @@ static int esp32_cpu_clock_configure(const struct esp32_cpu_clock_config *cpu_cf
#else
uint32_t uart_clock_src_hz = esp_clk_apb_freq();
#endif
esp_rom_uart_set_clock_baudrate(ESP_CONSOLE_UART_NUM, uart_clock_src_hz,
ESP_CONSOLE_UART_BAUDRATE);
esp_rom_uart_set_clock_baudrate(CONFIG_ESP_CONSOLE_UART_NUM, uart_clock_src_hz,
CONFIG_ESP_CONSOLE_UART_BAUDRATE);
#endif
#endif
return 0;
Expand Down
2 changes: 2 additions & 0 deletions soc/espressif/esp32/hw_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ int hardware_init(void)

bootloader_clock_configure();

#ifdef CONFIG_ESP_CONSOLE_UART
/* initialize console, from now on, we can log */
esp_console_init();
print_banner();
#endif /* CONFIG_ESP_CONSOLE_UART */

spi_flash_init_chip_state();
err = esp_flash_init_default_chip();
Expand Down
2 changes: 2 additions & 0 deletions soc/espressif/esp32c2/hw_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ int hardware_init(void)

bootloader_clock_configure();

#ifdef CONFIG_ESP_CONSOLE_UART
/* initialize console, from now on, we can log */
esp_console_init();
print_banner();
#endif /* CONFIG_ESP_CONSOLE_UART */

spi_flash_init_chip_state();
err = esp_flash_init_default_chip();
Expand Down
2 changes: 2 additions & 0 deletions soc/espressif/esp32c3/hw_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ int hardware_init(void)

bootloader_clock_configure();

#if defined(CONFIG_ESP_CONSOLE_UART) || defined(CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG)
/* initialize console, from now on, we can log */
esp_console_init();
print_banner();
#endif /* defined(CONFIG_ESP_CONSOLE_UART) || defined(CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG) */

spi_flash_init_chip_state();
err = esp_flash_init_default_chip();
Expand Down
2 changes: 2 additions & 0 deletions soc/espressif/esp32c6/hw_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@ int hardware_init(void)

bootloader_clock_configure();

#if defined(CONFIG_ESP_CONSOLE_UART) || defined(CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG)
/* initialize console, from now on, we can log */
esp_console_init();
print_banner();
#endif /* defined(CONFIG_ESP_CONSOLE_UART) || defined(CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG) */

spi_flash_init_chip_state();
err = esp_flash_init_default_chip();
Expand Down
2 changes: 2 additions & 0 deletions soc/espressif/esp32s2/hw_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ int hardware_init(void)

bootloader_clock_configure();

#ifdef CONFIG_ESP_CONSOLE_UART
/* initialize console, from now on, we can log */
esp_console_init();
print_banner();
#endif /* CONFIG_ESP_CONSOLE_UART */

spi_flash_init_chip_state();
err = esp_flash_init_default_chip();
Expand Down
2 changes: 2 additions & 0 deletions soc/espressif/esp32s3/hw_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ int hardware_init(void)

bootloader_clock_configure();

#if defined(CONFIG_ESP_CONSOLE_UART) || defined(CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG)
/* initialize console, from now on, we can log */
esp_console_init();
print_banner();
#endif /* defined(CONFIG_ESP_CONSOLE_UART) || defined(CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG) */

spi_flash_init_chip_state();
err = esp_flash_init_default_chip();
Expand Down
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ manifest:
groups:
- hal
- name: hal_espressif
revision: 51bf6d7bb2ee053e52f09709097e2444777c868c
revision: pull/400/head
path: modules/hal/espressif
west-commands: west/west-commands.yml
groups:
Expand Down
Loading