Memory map
Confidence tags
[verified]: checked against every available dump and/or the decompiled code. [inferred]: consistent with the evidence, not proven.
Hardware & file basics
| Item | Value | |
|---|---|---|
| CPU | Motorola MC68336 (CPU32 core, 68k ISA), big-endian | [verified] (code disassembles cleanly as 68020/CPU32; SIM watchdog at 0xFFFA27) |
| Flash | 256 KB (2 Mbit), sector map 16K/8K/8K/32K/64K/64K/64K | [inferred] from region boundaries; matches a bottom-boot 29F200B-class part |
| RAM | variables at 0xFF82B6–0xFF8956, stacks at 0xFF8FFF (boot) / 0xFF9DFF (app) | [verified] |
| On-chip modules | 0xFFF000+ (SIM 0xFFFA00, …) | [verified] |
| Address model | ROM is mapped at 0x000000; file offset == ROM address in a full dump | [verified] |
| Other chips (wiki) | Bosch CC770 CAN controller, HIP9010 knock processor | from BMS46-Wiki notes.c |
Dump formats in circulation
| Format | Size | File offset 0 = | Notes |
|---|---|---|---|
| Full | 256 KB (0x40000) | ROM 0x000000 | What nfsx directmode read --variant BMS46 -m full produces |
| Partial ("32k") | 32 KB (0x8000) | ROM 0x008010 | Calibration only; covers 0x8010–0x1000F. File offset = ROM − 0x8010 [verified: 6 of 7 partial/full pairs are byte-identical at this alignment] |
| Byte-swapped | either | — | 16-bit words swapped (AB CD → BA DC). Recognisable by the ident reading 101179000F00…. Must be un-swapped before using any address in this document (bms46_checksum.py <in> --unswap <out>, or nfsx … --swap-bytes when you want this layout) |
In about half the known full dumps, 0x0000–0x7FFF reads back as all FF. Either the boot area wasn't readable by the dump tool, or it wasn't dumped. Treat FF there as "unknown", not "erased".
Memory map
0x00000 ┌──────────────────────────────┐
│ BOOT (16 KB sector) │ boot vectors, bootloader, CRC routine,
│ │ CRC table, boot CRC
0x04000 ├──────────────────────────────┤
│ 8 KB sector ┐ NV / adaptive │ contents differ between otherwise
0x06000 ├──────────────┤ data │ identical ECUs [inferred]
│ 8 KB sector ┘ │
0x08000 ├──────────────────────────────┤
│ CALIBRATION (32 KB sector) │ ident, Kennung, maps, scalars, trailer
0x10000 ├──────────────────────────────┤
│ PROGRAM (192 KB, 3×64 KB) │ app vectors, Kennung, CRC descriptors,
│ │ code, sensor tables, program ident
0x40000 └──────────────────────────────┘2.1 Boot sector 0x00000–0x03FFF
| Address | Size | Content | |
|---|---|---|---|
0x00000 | 4 | Initial SSP = 0x00FF8FFF | [verified] |
0x00004 | 4 | Initial PC = 0x00000400 | [verified] |
0x00400 | … | Boot code entry | [verified] |
0x02000–0x035xx | Boot logic: program/cal validity checks, flash programming, DS2 handling | [verified] (functions at 0x22E8, 0x2A70, 0x3002, 0x30E8, 0x314A, 0x34FA, 0x3656) | |
0x03254 | CRC-16 inner loop (per byte, services watchdog) | [verified] | |
0x0314A | CRC descriptor walker (see checksums) | [verified] | |
0x03696 | 16 | "SINGLE BOARD ". Compared against program 0x14090 | [verified] |
0x036A6 | 16 | "NO SINGLE BOARD ". Alternative accepted value | [verified] |
0x01F56 | DS2 0x0D system-address response builder (see DS2) | [verified] | |
0x0373A | 2 | UPROG word (0x0000) | [verified] |
0x0373C | 1 | Erase duration (0x23) | [verified] |
0x0373D | 1 | Max DS2 block length (0xFF) | [verified] |
0x03D00 | 32 | Boot-only CRC descriptor table (1 record + FF terminator) | [verified] |
0x03D20 | 512 | CRC-16/ARC lookup table (0000 C0C1 C181 0140 …) | [verified] |
0x03F20 | 0x22 | Baud-rate table (6 × 24-bit rate) + SCI divisors; reported as ADRESSE_EEPROM_SUBSTITUT | [verified] |
0x03F42 | 4 | Boot CRC end pointer = 0x00003F46 | [verified] |
0x03F46 | 2 | Boot CRC (over 0x0000–0x3F45) | [verified] |
0x03F48–0x03FFF | Mostly FF; a few bytes near 0x3F64 vary per ECU | [inferred: NV data] | |
0x03FE6 | 3×8 | "01119700" ×3 + 0x3FFE = 0x5AA5. HW-Referenz reported by DS2 0x0D | [verified] |
2.2 NV sectors 0x04000–0x07FFF
Two 8 KB sectors with a small header at 0x4000 (00 00 42 AC AA 55 55 AA …, followed by a list of 32-bit offsets). The content differs between dumps of the same software. The wiki's "MIL" modification (TUNED_…O2AG) changes only this area, which fits stored fault/readiness or adaptation data being cleared. Not covered by any CRC. [inferred] Don't write it blindly.
2.3 Calibration sector 0x08000–0x0FFFF
| Address | Size | Content | |
|---|---|---|---|
0x08000 | 4 | Programming-state marker: AA55AA55 or FFFFFFFF in the wild. Boot code (0x3002) treats AA55FFFF specially and then writes AA55 to 0x8002 | [verified code path; meaning inferred] |
0x08004–0x0800F | 12 | FF | |
0x08010 | 16 | Calibration ident (Datenstand), e.g. 01119700F000Q28G. Partial dumps start here | [verified] |
0x08020, 0x08030 | 16 each | Two more copies of the ident | [verified] |
0x08040 | 0x38 | Kennung: "BMS EU3 M43 B19 EE HW C2 0000SW F0000000REV0 q28g\r\n\0". Compared to the program Kennung at 0x14040 (0x26 or 0x2C bytes depending on a version char) | [verified] |
0x08040 | — | Calibration CRC range start | [verified] |
0x08078 | 12 | "XXXXXXXXXXXX": placeholder field | [inferred: VIN/patch slot] |
0x08084–0x080CB | Table of RAM pointers (0x00FFxxxx) + bytes | [inferred: measurement/snapshot list] | |
0x080D0–0x08163 | Byte flags (0x33/0x00 pattern) | [inferred: DTC/feature enable matrix] | |
0x08164–0x0AE77 | ~11 KB | Map structs: 236 maps (map structures), interleaved with 65 gaps holding scalar constants (1947 bytes total; 1-byte gaps are word-alignment padding) | [verified] |
0x0A9E1–0x0AE61 | 1153 | DTC configuration: per-fault-index arrays read by the fault manager 0x254CE (0xA9E4 debounce threshold, 0xAA30 heal threshold, 0xAA7C weight, 0xABAC flags). DS2 fault code = index + 100 | [verified code path] |
0x0AE78–0x0B83F | ~2.5 KB | 00 padding | [verified] |
0x0B840–0x0FFF5 | ~18 KB | FF, unused | [verified] |
0x0FFF6 | 4 | Cal CRC end pointer = 0x0000FFFA | [verified] |
0x0FFFA | 2 | Calibration CRC (over 0x8040–0xFFF9) | [verified] |
0x0FFFC | 4 | Cal trailer magic 0x0055FFAA (checked by boot 0x3002/0x34FA) | [verified] |
2.4 Program 0x10000–0x3FFFF
| Address | Size | Content | |
|---|---|---|---|
0x10000 | 4 | App SSP = 0x00FF9DFF. Boot treats FFFFFFFF here as "no program" | [verified] |
0x10004 | 4 | App PC = 0x00010400 | [verified] |
0x10008–0x103FF | App exception vector table (mostly 0x00011206 default handler) | [verified] | |
0x10400 | App entry | [verified] | |
0x14000 | 0x30 | "! Link Time ! 05.10.1998 17:10 cermet" | [verified] |
0x14030 | 0x50 | "! Kennung ! BMS EU3 M43 B19 EE HW C2 …" (Kennung at 0x14040) | [verified] |
0x14080 | 0x60 | "! CondComp ! SINGLE BOARD VERSION AUTO HW-MUSTER-C2 MIT EWS KEINE VARIANTEN!" | [verified] |
0x14200 | 0x50 | CRC descriptor table (4 records + terminator, checksums) | [verified] |
0x14250–0x1444F | 512 | Copy of the CRC-16/ARC table | [verified] |
0x14450 | 4 | End pointer for program part 1 = 0x00014454 | [verified] |
0x14454–0x144CF | 124 | FF, excluded from the program CRC. ZIF backup slot (0x144B0, from DS2 0x0D) | [verified] |
0x144D0 | Code continues | ||
0x150F2, 0x15130, 0x15166 | Word sensor linearisation tables: Coolant_Temp, Radiator_Temp, Engine_IAT (NTC voltage → °C). Outside the calibration, so not in partial dumps | [verified] | |
0x1335E–0x13FFF | FF gap | ||
0x3755C | 4 | End pointer for program part 2 (0x00037560; 0x00037006 on EF00) | [verified] |
0x37560 | 2 | Program CRC | [verified] |
0x37562–0x3FCAF | FF, unused | ||
0x3FCB0 | 3×12 | Program ident "01119700F000" ×3. The cal ident must match it (6 + 2 chars compared) | [verified] |
0x3FCD4 | "1430940" repeated: BMW hardware/part number | [inferred] | |
0x3FD20 | Manufacturing data (ADRESSE_HERST_FERT_DATUM) | [verified] | |
0x3FD60 | AIF, application info field (ADRESSE_AIF) | [verified] | |
0x3FFFC | 4 | Program trailer magic 0x55FFAA00 (boot: "program valid") | [verified] |