8000 stm32/boards/ARDUINO_NICLA_VISION: Enable 4MiB ROMFS part in ext flash. · sparkfun/micropython@edc927a · GitHub
[go: up one dir, main page]

Skip to content

Commit edc927a

Browse files
iabdalkaderdpgeorge
authored andcommitted
stm32/boards/ARDUINO_NICLA_VISION: Enable 4MiB ROMFS part in ext flash.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
1 parent 043dc79 commit edc927a

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

ports/stm32/boards/ARDUINO_NICLA_VISION/mpconfigboard.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ typedef unsigned int mp_uint_t; // must be pointer size
3232
#define MICROPY_HW_ENTER_BOOTLOADER_VIA_RESET (0)
3333
#define MICROPY_HW_TIM_IS_RESERVED(id) (id == 3)
3434

35+
// ROMFS config
36+
#define MICROPY_HW_ROMFS_ENABLE_EXTERNAL_QSPI (1)
37+
#define MICROPY_HW_ROMFS_QSPI_SPIFLASH_OBJ (&spi_bdev.spiflash)
38+
#define MICROPY_HW_ROMFS_ENABLE_PART0 (1)
39+
3540
// Flash storage config
3641
#define MICROPY_HW_SPIFLASH_ENABLE_CACHE (1)
3742
#define MICROPY_HW_SPIFLASH_SOFT_RESET (1)
@@ -130,8 +135,8 @@ void NICLAV_board_osc_enable(int enable);
130135
// QSPI flash for storage
131136
#define MICROPY_HW_QSPI_PRESCALER (2) // 100MHz
132137
#define MICROPY_HW_QSPIFLASH_SIZE_BITS_LOG2 (27)
133-
// Reserve 1MiB at the end for compatibility with alternate firmware that places WiFi blob here.
134-
#define MICROPY_HW_SPIFLASH_SIZE_BITS (120 * 1024 * 1024)
138+
// Reserve 4MiB for romfs and 1MiB for WiFi/BT firmware.
139+
#define MICROPY_HW_SPIFLASH_SIZE_BITS (88 * 1024 * 1024)
135140
#define MICROPY_HW_QSPIFLASH_CS (pyb_pin_QSPI2_CS)
136141
#define MICROPY_HW_QSPIFLASH_SCK (pyb_pin_QSPI2_CLK)
137142
#define MICROPY_HW_QSPIFLASH_IO0 (pyb_pin_QSPI2_D0)

ports/stm32/boards/ARDUINO_NICLA_VISION/stm32h747.ld

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ MEMORY
1313
SRAM3 (xrw) : ORIGIN = 0x30040000, LENGTH = 32K /* SRAM3 D2 */
1414
SRAM4 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K /* SRAM4 D3 */
1515
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K /* Total available flash */
16-
FLASH_EXT (rx) : ORIGIN = 0x90000000, LENGTH = 16384K /* 16MBs external QSPI flash */
1716
FLASH_BL (rx) : ORIGIN = 0x08000000, LENGTH = 128K /* Arduino bootloader */
1817
FLASH_FS (r) : ORIGIN = 0x08020000, LENGTH = 128K /* filesystem */
1918
FLASH_TEXT (rx) : ORIGIN = 0x08040000, LENGTH = 1280K /* CM7 firmware */
2019
FLASH_CM4 (rx) : ORIGIN = 0x08180000, LENGTH = 512K /* CM4 firmware */
20+
FLASH_ROMFS (rx) : ORIGIN = 0x90B00000, LENGTH = 4096K /* romfs partition in QSPI flash */
2121
}
2222

2323
_cm4_ram_start = ORIGIN(SRAM4);
@@ -46,6 +46,10 @@ _micropy_hw_internal_flash_storage_ram_cache_end = ORIGIN(DTCM) + LENGTH(DTCM);
4646
_micropy_hw_internal_flash_storage_start = ORIGIN(FLASH_FS);
4747
_micropy_hw_internal_flash_storage_end = ORIGIN(FLASH_FS) + LENGTH(FLASH_FS);
4848

49+
/* Location of romfs filesystem */
50+
_micropy_hw_romfs_part0_start = ORIGIN(FLASH_ROMFS);
51+
_micropy_hw_romfs_part0_size = LENGTH(FLASH_ROMFS);
52+
4953
/* OpenAMP shared memory region */
5054
_openamp_shm_region_start = ORIGIN(SRAM4);
5155
_openamp_shm_region_end = ORIGIN(SRAM4) + LENGTH(SRAM4);

0 commit comments

Comments
 (0)
0