Skip to content

[MRAM/OTA] Change partitioning of MRAM on Filesys/Little-FS #286

@megargayu

Description

@megargayu

We need to make Little-FS only work on a third partition for OTA. Per the OTA docs:

// RP2350 Flash layout (assuming 4Mbit flash)
#define XIP_BASE                0x10000000

#define BOOTLOADER_OFFSET       0x00000000
#define BOOTLOADER_SIZE         0x00004000  // 16KB

#define PARTITION_A_OFFSET      0x00004000
#define PARTITION_A_SIZE        0x00026000  // ~156KB

#define PARTITION_B_OFFSET      0x0002A000
#define PARTITION_B_SIZE        0x00026000  // ~156KB

#define DATA_OFFSET             0x00050000
#define DATA_SIZE               0x00026000  // ~156KB

#define METADATA_OFFSET         0x00079000  // Fixed location
#define METADATA_SIZE           0x00001000  // 4KB (one sector)

// Actual flash addresses
#define METADATA_FLASH_ADDR     (XIP_BASE + METADATA_OFFSET)

We should make sure then that PARTITION_A and PARTITION_B are left alone by Filesys/LFS and instead they only work on the remaining memory. This also means we should figure out exactly how much to partition the MRAM for each and of course add docs.

Also, we need to then rewrite the reboot counter to use this instead.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions