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 is0x02000120(firmware-images/v13/raw_fw/FM-1.fwsc_unpack/jlfw.yaml).docs/01-firmware-analysis.mdconverts it as0x020000A0. - The start-up code jumps to the literal
0x02001C24, but FM-1-RE finds that function starting at its0x02001B04, 0x120 lower. The entry handed to core 1,0x020001B8, is FM-1-RE’s core-1 vector0x02000098+ 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,0x9E7Cbytes, from0x02084820, then 32 bytes from0x0208E69C(io/01-boot.md§2, §2.1).app.binis0x8E59Cbytes. Placed at0x02000000, the copies would run 0x100 bytes past the end of the file; placed at0x02000120, they end exactly at its last byte (this wiki’s arithmetic). - fm1-to-smk37 says independently that stock
app.binruns at0x02000120, checked with tables of string pointers (docs/05-reverse-engineering.md§3, stock 016). felucca-bsp’s package builder writes0x02000120into theapp_area_headentry (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
0x8DFBCbytes (581,564) in the stock layout. The package builder refuses a bigger image. fm1-base can move the app area’s end withapp_end(up to0xE0000;0xCE000gives anapp.binof 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
0x01C7FD50and up alone until your vectors are set up. The bootloader passes boot info there, and the update path writes its record at0x01C7FD88(112 bytes). Writingusb_update_mode\0at0x01C7FD80and resetting enters the mask ROM’s download mode. [CODE] [HW] - Dinghy’s layout differs again: a 360 KB pool from
0x01C1A000, stacks in0x01C74000–0x01C7C000with 256-byte guard bands (mvave-fm1 development skill §3). [CODE] NOINITsurvives a reset and an entry into download mode: MvaveFM1Unbricker reads 512 bytes at0x01C7C000through the ROM’s loader to recover Melodee’s crash record. [CODE]- fm1-base’s figures for its template: 96 KB of RAM for
.data/.bssand a 336 KB pool (128 KB and 304 KB in a WiFi build). Withram_layout = "packed"the RAM code,.data/.bssand the pool share one budget of 464 KB instead, 8 KB kept spare.PLAT_SPAREputs 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.ldhas 72 KB of RAM and a pool of0x5A000from0x01C1A000. [CODE] - M-VAVE’s V13, for comparison:
.data(0x9E7Cbytes) at0x01C00000,.bssafter it up to0x01C211FB, core 0’s stacks topped at0x01C14BB4and0x01C15BB4, core 1’s at0x01C15EB4and0x01C16EB4, and the same vector table at0x01C7FE00(FM-1-REio/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
- m-bootloader SPEC.md §2.1, §2.2, §4.2, §6, §11.8 (RAM apps).
- FM-1-RE (WTFPL; stock V13; last commit 2026-09-08):
docs/architecture.md§2,docs/01-firmware-analysis.md,docs/io/01-boot.md§1, §2, §4, §5,docs/io/04-synth-engine.md§1,docs/io/05-midi.md§3.3,docs/io/07-input.md§1,docs/io/09-storage.md§1,firmware-images/v13/raw_fw/FM-1.fwsc_unpack/jlfw.yaml. - fm1-to-smk37
docs/05-reverse-engineering.md§3 (CC BY-NC 4.0; cited, not copied). - Felucca’s
firmware/app.ld(GPL-3.0-only). felucca-bspchip/fm1_xip.h,chip/fm1_flash.h,chip/fm1_sys.h,docs/EXPERIMENTAL.md(MPL-2.0); Felucca has used them as itsfirmware/bspsubmodule since 1.7.0, and itshal/copies are gone. - fm1-base README, “What each costs”, “A bigger app slot”;
docs/bt/BLE-HW-FACTS.md§1 anddocs/wifi/README.md(radio registers). - Dinghy
docs/RULES.md,tools/build.py(GPL-3.0); mvave-fm1 development skill §3. - MvaveFM1Unbricker README (
retained-ram.bin).
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