cpu/esp32: change order for spi_flash_drive_init
To see debug or error messages during SPI flash drive initialization, spi_flash_drive_init has to be called after stdio_init.
This commit is contained in:
parent
d244b0fe59
commit
5f9e3b1a4b
@ -311,12 +311,6 @@ static NORETURN void IRAM system_init (void)
|
|||||||
_sys_time.tm_year + 1900, _sys_time.tm_mon + 1, _sys_time.tm_mday,
|
_sys_time.tm_year + 1900, _sys_time.tm_mon + 1, _sys_time.tm_mday,
|
||||||
_sys_time.tm_hour, _sys_time.tm_min, _sys_time.tm_sec);
|
_sys_time.tm_hour, _sys_time.tm_min, _sys_time.tm_sec);
|
||||||
|
|
||||||
#if MODULE_MTD
|
|
||||||
/* init flash drive */
|
|
||||||
extern void spi_flash_drive_init (void);
|
|
||||||
spi_flash_drive_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* initialize the board */
|
/* initialize the board */
|
||||||
board_init();
|
board_init();
|
||||||
|
|
||||||
@ -329,6 +323,12 @@ static NORETURN void IRAM system_init (void)
|
|||||||
/* print the board config */
|
/* print the board config */
|
||||||
print_board_config();
|
print_board_config();
|
||||||
|
|
||||||
|
#if MODULE_MTD
|
||||||
|
/* init flash drive */
|
||||||
|
extern void spi_flash_drive_init (void);
|
||||||
|
spi_flash_drive_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
/* route a software interrupt source to CPU as trigger for thread yields */
|
/* route a software interrupt source to CPU as trigger for thread yields */
|
||||||
intr_matrix_set(PRO_CPU_NUM, ETS_FROM_CPU_INTR0_SOURCE, CPU_INUM_SOFTWARE);
|
intr_matrix_set(PRO_CPU_NUM, ETS_FROM_CPU_INTR0_SOURCE, CPU_INUM_SOFTWARE);
|
||||||
/* set thread yield handler and enable the software interrupt */
|
/* set thread yield handler and enable the software interrupt */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user