Move serial init to earlier in boot process

This commit is contained in:
Gregory Neverov 2023-02-15 11:08:09 -08:00
parent 98b61279e4
commit ffbb7550b4
1 changed files with 3 additions and 3 deletions

6
main.c
View File

@ -925,6 +925,9 @@ int __attribute__((used)) main(void) {
common_hal_nvm_bytearray_set_bytes(&common_hal_mcu_nvm_obj,0,&value_out,1); common_hal_nvm_bytearray_set_bytes(&common_hal_mcu_nvm_obj,0,&value_out,1);
#endif #endif
// Start the debug serial
serial_early_init();
// Wait briefly to give a reset window where we'll enter safe mode after the reset. // Wait briefly to give a reset window where we'll enter safe mode after the reset.
if (safe_mode == NO_SAFE_MODE) { if (safe_mode == NO_SAFE_MODE) {
safe_mode = wait_for_safe_mode_reset(); safe_mode = wait_for_safe_mode_reset();
@ -941,9 +944,6 @@ int __attribute__((used)) main(void) {
supervisor_bluetooth_init(); supervisor_bluetooth_init();
#endif #endif
// Start the debug serial
serial_early_init();
#if !INTERNAL_FLASH_FILESYSTEM #if !INTERNAL_FLASH_FILESYSTEM
// Set up anything that might need to get done before we try to use SPI flash // Set up anything that might need to get done before we try to use SPI flash
// This is needed for some boards where flash relies on GPIO setup to work // This is needed for some boards where flash relies on GPIO setup to work