esp32s2: Move some code after the stdout initialization

This commit is contained in:
KonstantinKondrashov
2020-06-01 20:39:49 +08:00
parent 0a1919abff
commit e0e391dce3

View File

@@ -276,9 +276,6 @@ void start_cpu0_default(void)
#if CONFIG_ESP32S2_BROWNOUT_DET #if CONFIG_ESP32S2_BROWNOUT_DET
esp_brownout_init(); esp_brownout_init();
#endif
#if CONFIG_ESP32S2_DISABLE_BASIC_ROM_CONSOLE
esp_efuse_disable_basic_rom_console();
#endif #endif
rtc_gpio_force_hold_dis_all(); rtc_gpio_force_hold_dis_all();
esp_vfs_dev_uart_register(); esp_vfs_dev_uart_register();
@@ -292,6 +289,11 @@ void start_cpu0_default(void)
_GLOBAL_REENT->_stdin = (FILE*) &__sf_fake_stdin; _GLOBAL_REENT->_stdin = (FILE*) &__sf_fake_stdin;
_GLOBAL_REENT->_stdout = (FILE*) &__sf_fake_stdout; _GLOBAL_REENT->_stdout = (FILE*) &__sf_fake_stdout;
_GLOBAL_REENT->_stderr = (FILE*) &__sf_fake_stderr; _GLOBAL_REENT->_stderr = (FILE*) &__sf_fake_stderr;
#endif
// After setting _GLOBAL_REENT, ESP_LOGIx can be used instead of ESP_EARLY_LOGx.
#if CONFIG_ESP32S2_DISABLE_BASIC_ROM_CONSOLE
esp_efuse_disable_basic_rom_console();
#endif #endif
esp_timer_init(); esp_timer_init();
esp_set_time_from_rtc(); esp_set_time_from_rtc();