Skip to content
Merged
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
1 change: 1 addition & 0 deletions cpu/esp32/ld/esp32.common.ld
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ SECTIONS
/* part of RIOT ports that should run in IRAM */
*cpu.a:*(.literal .text .literal.* .text.*)
*periph.a:*(.literal .text .literal.* .text.*)
*mtd.a:**(.literal .text .literal.* .text.*)

INCLUDE esp32.spiram.rom-functions-iram.ld
_iram_text_end = ABSOLUTE(.);
Expand Down
12 changes: 6 additions & 6 deletions cpu/esp32/startup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_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 */
board_init();

Expand All @@ -329,6 +323,12 @@ static NORETURN void IRAM system_init (void)
/* print the 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 */
intr_matrix_set(PRO_CPU_NUM, ETS_FROM_CPU_INTR0_SOURCE, CPU_INUM_SOFTWARE);
/* set thread yield handler and enable the software interrupt */
Expand Down