Memory Map

Addresses as the CPU sees them. See Flash Storage for the flash’s own layout.

CPU address space

Range What Tag
0x00010000… Low-speed peripherals (clock, power, timers, UART, SPI, ADC, P33 bridge…) [SDK] [CODE]
0x00028000–0x00028054 BLE baseband registers. The per-link registers are a block in SRAM that the engine reaches by DMA. [RE] [CODE]
0x00030000–0x00031FFF WiFi MAC and BBP window: JieLi’s wl30 core, with the register layout of Ralink’s RT3070 [RE] [CODE]
0x00040000… High-speed peripherals, including the SFC (flash controller) at 0x40200 and XIP decryption at 0x40300 [SDK] [CODE]
0x00050000… GPIO (0x50000 + 0x40 × port, A=0 … H=7) and pin mux (0x51000…) [SDK] [CODE]
0x01C00000–0x01C7FFFF Internal SRAM used by firmware (512 KB). Code can run from it. [CODE] [HW]
0x01C02000 Where the mask ROM loads and starts the bootloader [RE]
0x01C0A800 Where the staged update loader is decompressed and started [RE] [CODE]
0x01C30000… Where m-bootloader’s RAM apps are linked and run (up to below 0x01C7FD80) [CODE]
0x01C7FD50–0x01C7FFFF Reserved: boot info from the bootloader, the boot/update mailbox, the interrupt vector table at 0x01C7FE00 [CODE]
0x01EEE000… CPU control block (“corex2”): cache control (0x01EEE008), debug/guard limits, performance counters [SDK]
0x01EEF000… Interrupt controller (ICFG, pending), exception and trace registers [CODE]
0x01F00000… Cache internal arrays (the bootloader clears some ranges here to invalidate) [RE]
0x01F28000… The data cache’s 8 ways of 4 KiB, one after another. 1 to 7 of them can be made plain RAM (Performance). [HW]
0x02000000… Flash XIP window, decrypted and cached. Flash offset off (≥ 0x4000) reads at 0x02000000 + off − 0x4000. [CODE]
0x02000120 Entry point of every known application image [CODE] [RE]
0x04000000 External RAM window. Absent on the FM-1 (but see the SDRAM question in Open Questions). [SDK] [RE]
0xFFC00000–0xFFCFFFFF The chip’s ROM. Dinghy’s build refuses any call to, or constant loaded from, this range: a constant that happens to fall in it (-32767 << 7 = 0xFFC00080) trips the check too. [CODE]

ROM services. [RE] M-VAVE’s V13 calls the ROM at fixed addresses: 0xFFC00404 flash read, 0xFFC00476 flash write, 0xFFC05C4C delay, 0xFFC00EEA / 0xFFC00F2E P33 read / write (FM-1-RE io/09-storage.md §1, io/07-input.md §1, io/01-boot.md §5, marked high).

The stock app runs at 0x02000120

[RE] Felucca-family code maps flash 0x4120 (where app.bin starts) to 0x02000120, and working firmware proves it for open firmwares. FM-1-RE reads M-VAVE’s V13 app.bin as if its first byte were at 0x02000000 (docs/architecture.md §2: flash_offset − 0x4120 + 0x02000000, vectors at 0x020000A0). This wiki’s reading of FM-1-RE’s own data (2026-11-26) is that the stock app is linked at 0x02000120 too, and FM-1-RE’s app addresses are 0x120 low:

  • The stock package’s metadata, as FM-1-RE unpacked it, gives entry-point: 33554720, which is 0x02000120 (firmware-images/v13/raw_fw/FM-1.fwsc_unpack/jlfw.yaml). docs/01-firmware-analysis.md converts it as 0x020000A0.
  • The start-up code jumps to the literal 0x02001C24, but FM-1-RE finds that function starting at its 0x02001B04, 0x120 lower. The entry handed to core 1, 0x020001B8, is FM-1-RE’s core-1 vector 0x02000098 + 0x120 (io/01-boot.md §4, §5.2 “Anomaly note”).
  • Tables sit 0x120 below the addresses the code loads for them (io/04-synth-engine.md §1 “Reading note”; io/05-midi.md §3.3).
  • The start-up code copies .data, 0x9E7C bytes, from 0x02084820, then 32 bytes from 0x0208E69C (io/01-boot.md §2, §2.1). app.bin is 0x8E59C bytes. Placed at 0x02000000, the copies would run 0x100 bytes past the end of the file; placed at 0x02000120, they end exactly at its last byte (this wiki’s arithmetic).
  • fm1-to-smk37 says independently that stock app.bin runs at 0x02000120, checked with tables of string pointers (docs/05-reverse-engineering.md §3, stock 016). felucca-bsp’s package builder writes 0x02000120 into the app_area_head entry (tools/fm1pkg.py).

FM-1-RE calls the offsets “anomalies” or a “shard artifact” and does not conclude; its io/01-boot.md header says the plain mapping was verified. Both readings are shown here. When you use an FM-1-RE address of code or data in app.bin, add 0x120 to get the address the CPU uses. Its RAM, register and ROM addresses are not affected, nor an address it computed from a literal in the code (that one is already the CPU’s).

One firmware’s RAM layout (example)

This is the layout of Felucca’s linker script as used in DUB-1 (GPL-3.0-only, © Leo Kuroshita). Other firmwares divide RAM differently; the reserved top is the same for all.

MEMORY
{
    XIP    (rx)  : ORIGIN = 0x02000120, LENGTH = 0x8DFBC   /* the app slot: 581,564 bytes */
    RAMTEXT (rwx): ORIGIN = 0x01C00000, LENGTH = 0x6000    /* code that runs while the flash is busy */
    RAM    (rwx) : ORIGIN = 0x01C08000, LENGTH = 96K       /* .data, .bss */
    POOL   (rw)  : ORIGIN = 0x01C20000, LENGTH = 0x54000   /* big buffers: delay lines, canvases */
    NOINIT (rw)  : ORIGIN = 0x01C7C000, LENGTH = 0x3D50    /* survives a reset: crash record, boot counters */
}

Points to know:

  • The app slot is 0x8DFBC bytes (581,564) in the stock layout. The package builder refuses a bigger image. fm1-base can move the app area’s end with app_end (up to 0xE0000; 0xCE000 gives an app.bin of 823,228 bytes), and its update loader writes the bigger area (Flash Storage). [CODE]
  • Any SRAM can hold code. The “(rw)” on the pool is only a linker label. M-VAVE’s own open firmware marks its render functions to run from SRAM. See Performance. [CODE] [HW]
  • Stacks sit high in RAM with guard bands under them; Felucca’s hardware guards fault on a write into a band. See Debugging. [CODE]
  • Leave 0x01C7FD50 and up alone until your vectors are set up. The bootloader passes boot info there, and the update path writes its record at 0x01C7FD88 (112 bytes). Writing usb_update_mode\0 at 0x01C7FD80 and resetting enters the mask ROM’s download mode. [CODE] [HW]
  • Dinghy’s layout differs again: a 360 KB pool from 0x01C1A000, stacks in 0x01C74000–0x01C7C000 with 256-byte guard bands (mvave-fm1 development skill §3). [CODE]
  • NOINIT survives a reset and an entry into download mode: MvaveFM1Unbricker reads 512 bytes at 0x01C7C000 through the ROM’s loader to recover Melodee’s crash record. [CODE]
  • fm1-base’s figures for its template: 96 KB of RAM for .data/.bss and a 336 KB pool (128 KB and 304 KB in a WiFi build). With ram_layout = "packed" the RAM code, .data/.bss and the pool share one budget of 464 KB instead, 8 KB kept spare. PLAT_SPARE puts a buffer in NOINIT’s room past the records that must survive a reset (about 13.8 KB of its 15.7 KB), zeroed at boot (fm1-base README “What each costs”, include/plat.h, at 3039770). [CODE]
  • The radio’s frame DMA does not reach above 0x01C20000. fm1-base’s own WiFi stack keeps its frame buffers below that address, and its build checks it (README). [CODE]
  • Felucca itself has since changed its layout: at ac8cc0e (2026-11-24) firmware/app.ld has 72 KB of RAM and a pool of 0x5A000 from 0x01C1A000. [CODE]
  • M-VAVE’s V13, for comparison: .data (0x9E7C bytes) at 0x01C00000, .bss after it up to 0x01C211FB, core 0’s stacks topped at 0x01C14BB4 and 0x01C15BB4, core 1’s at 0x01C15EB4 and 0x01C16EB4, and the same vector table at 0x01C7FE00 (FM-1-RE io/01-boot.md §1, marked high). [RE]

Calling between flash and RAM

[CODE] A call from XIP code (0x02…) to RAM code (0x01C…) is out of the CPU’s direct call range (23 bits). Felucca calls RAM code through a pointer the compiler can’t fold back:

/* from felucca-bsp chip/fm1_flash.h (MPL-2.0, © Leo Kuroshita); Felucca's own copy was hal/fm1_flash.h before 1.7.0 */
static inline void *fl_far(void *p) { void *volatile q = p; return q; }
#define FL_FAR(fn) ((__typeof__(&fn))fl_far((void *)&fn))

Code that runs while the flash is switched off (erasing, programming) must touch only registers, the stack and RAM: no constants in flash, no library calls, no helpers in flash. Felucca’s build checks that its .ram_text section contains no call instruction.

Sources


Unofficial community wiki. Not affiliated with M-VAVE or JieLi. Text under CC BY-SA 4.0; code excerpts keep their own licences (License). Facts are tagged [HW] [SDK] [RE] [CODE] [?]: see Home. Found an error? See Contributing. Home