Skip to content

Commit 96ce08e

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

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

ports/stm32/boards/ARDUINO_PORTENTA_H7/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 == 1)
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)
@@ -129,8 +134,8 @@ void PORTENTA_board_osc_enable(int enable);
129134
// QSPI flash #1 for storage
130135
#define MICROPY_HW_QSPI_PRESCALER (2) // 100MHz
131136
#define MICROPY_HW_QSPIFLASH_SIZE_BITS_LOG2 (27)
132-
// Reserve 1MiB at the end for compatibility with alternate firmware that places WiFi blob here.
133-
#define MICROPY_HW_SPIFLASH_SIZE_BITS (120 * 1024 * 1024)
137+
// Reserve 4MiB for romfs and 1MiB for WiFi/BT firmware.
138+
#define MICROPY_HW_SPIFLASH_SIZE_BITS (88 * 1024 * 1024)
134139
#define MICROPY_HW_QSPIFLASH_CS (pyb_pin_QSPI2_CS)
135140
#define MICROPY_HW_QSPIFLASH_SCK (pyb_pin_QSPI2_CLK)
136141
#define MICROPY_HW_QSPIFLASH_IO0 (pyb_pin_QSPI2_D0)

ports/stm32/boards/ARDUINO_PORTENTA_H7/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
/* produce a link error if there is not this amount of RAM for these sections */
@@ -44,6 +44,10 @@ _micropy_hw_internal_flash_storage_ram_cache_end = ORIGIN(DTCM) + LENGTH(DTCM);
4444
_micropy_hw_internal_flash_storage_start = ORIGIN(FLASH_FS);
4545
_micropy_hw_internal_flash_storage_end = ORIGIN(FLASH_FS) + LENGTH(FLASH_FS);
4646

47+
/* Location of romfs filesystem */
48+
_micropy_hw_romfs_part0_start = ORIGIN(FLASH_ROMFS);
49+
_micropy_hw_romfs_part0_size = LENGTH(FLASH_ROMFS);
50+
4751
/* OpenAMP shared memory region */
4852
_openamp_shm_region_start = ORIGIN(SRAM4);
4953
_openamp_shm_region_end = ORIGIN(SRAM4) + LENGTH(SRAM4);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy