Skip to content

Commit 63e4d8f

Browse files
authored
Merge pull request #12803 from gschorcht/cpu/esp32/fix_little_fs
cpu/esp32: fix to be able to use SPI flash drive with pkg_littlefs
2 parents 7f40b13 + 4fe35ef commit 63e4d8f

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

cpu/esp32/ld/esp32.common.ld

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ SECTIONS
107107
/* part of RIOT ports that should run in IRAM */
108108
*cpu.a:*(.literal .text .literal.* .text.*)
109109
*periph.a:*(.literal .text .literal.* .text.*)
110+
*mtd.a:**(.literal .text .literal.* .text.*)
110111

111112
INCLUDE esp32.spiram.rom-functions-iram.ld
112113
_iram_text_end = ABSOLUTE(.);

cpu/esp32/startup.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -311,12 +311,6 @@ static NORETURN void IRAM system_init (void)
311311
_sys_time.tm_year + 1900, _sys_time.tm_mon + 1, _sys_time.tm_mday,
312312
_sys_time.tm_hour, _sys_time.tm_min, _sys_time.tm_sec);
313313

314-
#if MODULE_MTD
315-
/* init flash drive */
316-
extern void spi_flash_drive_init (void);
317-
spi_flash_drive_init();
318-
#endif
319-
320314
/* initialize the board */
321315
board_init();
322316

@@ -329,6 +323,12 @@ static NORETURN void IRAM system_init (void)
329323
/* print the board config */
330324
print_board_config();
331325

326+
#if MODULE_MTD
327+
/* init flash drive */
328+
extern void spi_flash_drive_init (void);
329+
spi_flash_drive_init();
330+
#endif
331+
332332
/* route a software interrupt source to CPU as trigger for thread yields */
333333
intr_matrix_set(PRO_CPU_NUM, ETS_FROM_CPU_INTR0_SOURCE, CPU_INUM_SOFTWARE);
334334
/* set thread yield handler and enable the software interrupt */

0 commit comments

Comments
 (0)