Ferrite developer docs · RT-950 Pro

SPI flash map

The radio's 4 MB SPI flash under Ferrite, layout 3 (decision 333): factory calibration, Ferrite's settings and records, what is planned, and the space still free. The firmware's own ranges are in layout.rs; the installer saves the whole chip to your computer first, and a layout change is moved by Ferrite Console over the link.

Chip 4 MB, 1,024 sectors of 4 KBFree or held for later 1.1 MB Writable 0x000000–0x00EFFF and 0x010000–0x2FFFFF (3,068 KB, dotted)Layout version 3
Pick a sector

Each square is 4 KB; a row is 128 KB. Hover or tap one to see what holds it.

Key

  • Header, settings, trims, SSB patch
  • Channels, zones, presets, waypoints
  • APRS settings, contacts, heard, messages
  • Event log
  • Scratch ring
  • Planned, not written yet
  • Held for later
  • Never written
  • Free

A dot: inside layout::WRITABLE, the only range the flash driver lets Ferrite erase or program.

Regions

RangeSizeContentslayout.rsWritable
0x000000–0x000FFF4 KBLayout header (layout::LAYOUT_HEADER): magic, layout version (3), 10 installer bytes (the calibration sector's CRC among them, CAL-7), CRC-32; stamped last by an update (LINK-62)LAYOUT_HEADERyes
0x001000–0x002FFF8 KBSettings and slots: copies A and B, one sector each; the record up to 1 KB (decision 87)SETTINGSyes
0x003000–0x003FFF4 KBUser trims (crystal ppm, battery correction), two alternating copies (CAL-17)TRIMSyes
0x004000–0x004FFF4 KBRange presets: 224 B each, 16 (to 0x004DFF); DTMF memories: 16 B each, 16 (0x004E00–0x004EFF), and their names (0x004F00–0x004FBF)PRESETSyes
0x005000–0x005FFF4 KBHF state (planned): VFO per HF band and the recent list (10), manual ch 20aHF_STATEyes
0x006000–0x007FFF8 KBSatellites (SAT-2, decision 340): 16 records of 192 B a sector, then a log (sector 0 the info, 31 slots of 32 B; sector 1 the per-satellite choices by catalogue number, 62 slots of 16 B); ferrite-store sats.rsSATELLITESyes
0x008000–0x00BFFF16 KBSI4732 SSB patch (64 B header + 15,832 B patch), from the owner's stock firmwareSSB_PATCHyes
0x00C000–0x00DFFF8 KBFree: room for the settings and records above to growCONFIG_FREEyes
0x00E000–0x00EFFF4 KBMigration mark: a move Console began and hasn't stamped (decision 339)MIGRATE_MARKyes
0x00F000–0x00FFFF4 KBFactory calibration: never erased or written, at stock's address (hardware.md 12.2 maps its bytes)CALIBRATIONno
0x010000–0x04FFFF256 KBChannels: 64 B each, 63 per sector (64 sectors, 4,032 slots, 4,000 used)CHANNELSyes
0x050000–0x054FFF20 KBZones: 32 B each, 127 per sector (5 sectors, 635 slots, 512 used); each holds its channel count (CHAN-36)ZONESyes
0x055000–0x057FFF12 KBAPRS settings and quick messages: copies A and B (0x055000, 0x056000) and a spare sectorAPRSyes
0x058000–0x05FFFF32 KBAPRS contacts: 1,016 × 32 B in callsign order (127 per sector), manual APRS-37CONTACTSyes
0x060000–0x06FFFF64 KBAPRS heard list (layout::HEARD, APRS-4, decision 282): a ring of 496 station rows of 128 B, 31 a sectorHEARDyes
0x070000–0x07FFFF64 KBAPRS message ring: 496 × 128 B (layout::MESSAGES)MESSAGESyes
0x080000–0x08FFFF64 KBGPS waypoints: 2,032 × 32 B, packed (127 per sector)WAYPOINTSyes
0x090000–0x09FFFF64 KBText pack (English, planned): long text off the MCU flashTEXT_PACKyes
0x0A0000–0x0AFFFF64 KBHeld for the packet mailbox (chapter 38)MAILBOXyes
0x0B0000–0x0BFFFF64 KBPredictive text's words: an SPI part from the update file (decision 345)DICTIONARYyes
0x0C0000–0x1BFFFF1,024 KBFree, in one run (what goes here is for a later decision)FREEyes
0x1C0000–0x23FFFF512 KBLanguage packs (planned): English plus one other at a timeLANGUAGESyes
0x240000–0x27FFFF256 KBBoot animation and custom screens (planned)SCREENSyes
0x280000–0x2BFFFF256 KBFonts at the bigger sizes (planned)FONTSyes
0x2C0000–0x2DFFFF128 KBEvent log ring, 992 × 128 B (31 per sector)EVENT_LOGyes
0x2E0000–0x2FFFFF128 KBScratch ring: 32 sectors taking turns at a rewrite's new content (decision 227)SCRATCH_RINGyes
0x300000–0x3FFFFF1 MBBootloader update area: never written. A stray 0xA55A header at 0x300000 would make the bootloader reflash the MCU from itUPDATE_AREAno

Never written

  • 0x00F000–0x00FFFF: factory calibration. Back it up before anything else; Ferrite only reads it.
  • 0x300000–0x3FFFFF: the bootloader's update area. A valid header at 0x300000 (magic 0xA55A) makes the bootloader reflash the MCU from it at the next boot.
  • The flash driver refuses any erase or program outside WRITABLE, so no bug above it can reach these; the link's raw data messages are held to the same ranges (LINK-59, LINK-60).
  • The first 64 KB block holds calibration: it is only ever erased a 4 KB sector at a time (the driver has no block erase).

How records are kept

  • A fixed map: every record has one address from its number; an erased record is an empty one. No file system.
  • Settings and the APRS record: two copies, A and B, the newer valid one wins.
  • Changing a written record rewrites its sector through a scratch sector, whose footer says where it goes, so a power cut leaves the old or the new sector, never half. 32 scratch sectors take turns, so none wears out first; channel writes queued for one sector share a rewrite.
  • Rings (event log, APRS heard and messages) append into erased bytes; packed lists (waypoints, contacts) keep each sector's last 32 B free for that footer.
  • The layout header at 0x000000 names the layout; a firmware that finds another leaves the data alone until Console has moved it and stamped the header (UPD-16, LINK-62).

Sources

  • ferrite/crates/ferrite-core/src/layout.rs: the ranges the firmware uses.
  • docs/firmware-design.md, "SPI flash layout": this table's words.
  • docs/hardware.md 12: stock's layout and the calibration bytes.
  • Regenerate: python3 docs/tools/mkflashmap.py