Skip to content

Commit

Permalink
ports/stm32/boards: Update boards config for romfs.
Browse files Browse the repository at this point in the history
Signed-off-by: iabdalkader <[email protected]>
  • Loading branch information
iabdalkader committed Jan 3, 2025
1 parent ada3c24 commit 46417ac
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 8 deletions.
5 changes: 3 additions & 2 deletions ports/stm32/boards/ARDUINO_GIGA/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#define MICROPY_HW_BOARD_NAME "Arduino GIGA R1 WiFi"
#define MICROPY_HW_MCU_NAME "STM32H747"
#define MICROPY_HW_FLASH_FS_LABEL "GIGA R1 WiFi"
#define MICROPY_VFS_ROM (1)

// Network config
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "mpy-giga-r1-wifi"
Expand Down Expand Up @@ -125,8 +126,8 @@ void GIGA_board_low_power(int mode);
// QSPI flash #1 for storage
#define MICROPY_HW_QSPI_PRESCALER (2) // 100MHz
#define MICROPY_HW_QSPIFLASH_SIZE_BITS_LOG2 (27)
// Reserve 1MiB at the end for compatibility with alternate firmware that places WiFi blob here.
#define MICROPY_HW_SPIFLASH_SIZE_BITS (120 * 1024 * 1024)
// Reserve 4MiB for romfs and 1MiB at for WiFi/BT firmware.
#define MICROPY_HW_SPIFLASH_SIZE_BITS (88 * 1024 * 1024)
#define MICROPY_HW_QSPIFLASH_CS (pyb_pin_QSPI2_CS)
#define MICROPY_HW_QSPIFLASH_SCK (pyb_pin_QSPI2_CLK)
#define MICROPY_HW_QSPIFLASH_IO0 (pyb_pin_QSPI2_D0)
Expand Down
5 changes: 3 additions & 2 deletions ports/stm32/boards/ARDUINO_NICLA_VISION/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#define MICROPY_HW_BOARD_NAME "Arduino Nicla Vision"
#define MICROPY_HW_MCU_NAME "STM32H747"
#define MICROPY_HW_FLASH_FS_LABEL "Nicla Vision"
#define MICROPY_VFS_ROM (1)

// Network config
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "mpy-nicla-vision"
Expand Down Expand Up @@ -130,8 +131,8 @@ void NICLAV_board_osc_enable(int enable);
// QSPI flash for storage
#define MICROPY_HW_QSPI_PRESCALER (2) // 100MHz
#define MICROPY_HW_QSPIFLASH_SIZE_BITS_LOG2 (27)
// Reserve 1MiB at the end for compatibility with alternate firmware that places WiFi blob here.
#define MICROPY_HW_SPIFLASH_SIZE_BITS (120 * 1024 * 1024)
// Reserve 4MiB for romfs and 1MiB at for WiFi/BT firmware.
#define MICROPY_HW_SPIFLASH_SIZE_BITS (88 * 1024 * 1024)
#define MICROPY_HW_QSPIFLASH_CS (pyb_pin_QSPI2_CS)
#define MICROPY_HW_QSPIFLASH_SCK (pyb_pin_QSPI2_CLK)
#define MICROPY_HW_QSPIFLASH_IO0 (pyb_pin_QSPI2_D0)
Expand Down
5 changes: 3 additions & 2 deletions ports/stm32/boards/ARDUINO_PORTENTA_H7/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#define MICROPY_HW_BOARD_NAME "Arduino Portenta H7"
#define MICROPY_HW_MCU_NAME "STM32H747"
#define MICROPY_HW_FLASH_FS_LABEL "Portenta H7"
#define MICROPY_VFS_ROM (1)

// Network config
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "mpy-portenta-h7"
Expand Down Expand Up @@ -129,8 +130,8 @@ void PORTENTA_board_osc_enable(int enable);
// QSPI flash #1 for storage
#define MICROPY_HW_QSPI_PRESCALER (2) // 100MHz
#define MICROPY_HW_QSPIFLASH_SIZE_BITS_LOG2 (27)
// Reserve 1MiB at the end for compatibility with alternate firmware that places WiFi blob here.
#define MICROPY_HW_SPIFLASH_SIZE_BITS (120 * 1024 * 1024)
// Reserve 4MiB for romfs and 1MiB at for WiFi/BT firmware.
#define MICROPY_HW_SPIFLASH_SIZE_BITS (88 * 1024 * 1024)
#define MICROPY_HW_QSPIFLASH_CS (pyb_pin_QSPI2_CS)
#define MICROPY_HW_QSPIFLASH_SCK (pyb_pin_QSPI2_CLK)
#define MICROPY_HW_QSPIFLASH_IO0 (pyb_pin_QSPI2_D0)
Expand Down
1 change: 1 addition & 0 deletions ports/stm32/boards/OPENMV2/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define MICROPY_HW_MCU_NAME "STM32F427"
#define MICROPY_PY_SYS_PLATFORM "OpenMV2"
#define MICROPY_HW_FLASH_FS_LABEL "OPENMV"
#define MICROPY_VFS_ROM (1)

#define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_C)
#define UINT_FMT "%u"
Expand Down
1 change: 1 addition & 0 deletions ports/stm32/boards/OPENMV3/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define MICROPY_HW_MCU_NAME "STM32F765"
#define MICROPY_PY_SYS_PLATFORM "OpenMV3-M7"
#define MICROPY_HW_FLASH_FS_LABEL "OPENMV"
#define MICROPY_VFS_ROM (1)

#define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_C)
#define UINT_FMT "%u"
Expand Down
1 change: 1 addition & 0 deletions ports/stm32/boards/OPENMV4/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define MICROPY_HW_MCU_NAME "STM32H743"
#define MICROPY_PY_SYS_PLATFORM "OpenMV4-H7"
#define MICROPY_HW_FLASH_FS_LABEL "OPENMV"
#define MICROPY_VFS_ROM (1)

#define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_C)
#define UINT_FMT "%u"
Expand Down
3 changes: 2 additions & 1 deletion ports/stm32/boards/OPENMV4P/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define MICROPY_HW_MCU_NAME "STM32H743"
#define MICROPY_PY_SYS_PLATFORM "OpenMV4P-H7"
#define MICROPY_HW_FLASH_FS_LABEL "OPENMV"
#define MICROPY_VFS_ROM (1)

#define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_C)
#define UINT_FMT "%u"
Expand Down Expand Up @@ -133,7 +134,7 @@ extern const struct _mp_obj_type_t mod_network_nic_type_winc;

// QSPI Flash 256MBits
#define MICROPY_HW_QSPI_PRESCALER (2) // F_CLK = F_AHB/2 (100MHz)
#define MICROPY_HW_SPIFLASH_SIZE_BITS (256 * 1024 * 1024)
#define MICROPY_HW_SPIFLASH_SIZE_BITS (192 * 1024 * 1024)
#define MICROPY_HW_QSPIFLASH_SIZE_BITS_LOG2 (28)
#define MICROPY_HW_QSPIFLASH_CS (pyb_pin_QSPIFLASH_CS)
#define MICROPY_HW_QSPIFLASH_SCK (pyb_pin_QSPIFLASH_SCK)
Expand Down
3 changes: 2 additions & 1 deletion ports/stm32/boards/OPENMVPT/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define MICROPY_HW_MCU_NAME "STM32H743"
#define MICROPY_PY_SYS_PLATFORM "OpenMVPureThermal"
#define MICROPY_HW_FLASH_FS_LABEL "OPENMV"
#define MICROPY_VFS_ROM (1)

#define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_C)
#define UINT_FMT "%u"
Expand Down Expand Up @@ -145,7 +146,7 @@ extern const struct _mp_obj_type_t mod_network_nic_type_winc;

// QSPI Flash 256MBits
#define MICROPY_HW_QSPI_PRESCALER (2) // F_CLK = F_AHB/2 (100MHz)
#define MICROPY_HW_SPIFLASH_SIZE_BITS (256 * 1024 * 1024)
#define MICROPY_HW_SPIFLASH_SIZE_BITS (192 * 1024 * 1024)
#define MICROPY_HW_QSPIFLASH_SIZE_BITS_LOG2 (28)
#define MICROPY_HW_QSPIFLASH_CS (pin_G6)
#define MICROPY_HW_QSPIFLASH_SCK (pin_F10)
Expand Down

0 comments on commit 46417ac

Please sign in to comment.