Merge pull request #7586 from gneverov/issue_7333

Move serial init to earlier in boot process
This commit is contained in:
Dan Halbert 2023-02-15 16:55:38 -05:00 committed by GitHub
commit ca24cff0d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);
#endif
// Start the debug serial
serial_early_init();
// Wait briefly to give a reset window where we'll enter safe mode after the reset.
if (safe_mode == NO_SAFE_MODE) {
safe_mode = wait_for_safe_mode_reset();
@ -941,9 +944,6 @@ int __attribute__((used)) main(void) {
supervisor_bluetooth_init();
#endif
// Start the debug serial
serial_early_init();
#if !INTERNAL_FLASH_FILESYSTEM
// 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