Skip to content

Commit

Permalink
Both: Rework firmware/filesystem sizes.
Browse files Browse the repository at this point in the history
The W build needs additional space for the wireless firmware.

This is painful since it makes these builds non-interchangable
as the filesystem will move/be overwritten.

As such, change *only* the W build and avoid changing the existing
build so updates don't delete user files.

Additionally rework the sizes so that it's clearer we're
reserving space for the firmware and not just making up numbers.
  • Loading branch information
Gadgetoid committed Sep 24, 2024
1 parent b168686 commit ec13ed4
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions boards/PIMORONI_TINYFX/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,24 @@
// Might be defined by mpconfigvariant.cmake
#define MICROPY_HW_BOARD_NAME "Pimoroni TinyFX"
#endif
#define MICROPY_HW_FLASH_STORAGE_BYTES (3 * 1024 * 1024)

#if defined(MICROPY_PY_NETWORK_CYW43)

// We need space for networking firmware on network builds
// 1536 * 1024 = 1.5MB
#define FIRMWARE_SIZE_BYTES (1536 * 1024)

// CYW43 driver configuration.
#define CYW43_USE_SPI (1)
#define CYW43_LWIP (1)
#define CYW43_GPIO (0)
#define CYW43_SPI_PIO (1)

#endif
#else

// 1MB for the firmware
#define FIRMWARE_SIZE_BYTES (1 * 1024 * 1024)

#endif

#define MICROPY_HW_FLASH_STORAGE_BYTES (PICO_FLASH_SIZE_BYTES - FIRMWARE_SIZE_BYTES)

0 comments on commit ec13ed4

Please sign in to comment.