Tools for Bosch ME7 engine control units, in Go, for macOS, Linux and Windows.
| Program | Does | Reads | Writes |
|---|---|---|---|
me7info |
Locates measurements and calibration maps in a flash image, and copies a map catalog onto another image | image.bin, a reference catalog |
ME7Logger .ecu, TunerPro .xdf, model JSON, Ghidra label TSV |
me7logger |
Samples ECU RAM over the K-line diagnostic port | session.cfg + generated .ecu |
CSV |
Neither program writes flash or EEPROM. me7info never opens a serial port.
me7info place ref.json ref.bin dst.bin writes a model JSON for the second image. A body that still matches is kept. One code pointer, found once, moves the object. Anything else is left out. The model's origin is auto.
flowchart LR
ecu[(ECU flash)] -->|your flash tool| bin[image.bin]
bin --> gen["me7info generate"]
gen --> ecufile[ecus/image.ecu]
gen --> xdf["image.xdf<br/>tuner maps"]
gen -.->|--full-xdf| full["image-full.xdf<br/>every located map"]
gen -.->|--labels| labels["labels.tsv<br/>Ghidra labels"]
xdf --> tp[TunerPro]
full --> tp
ecufile --> cfg["session.cfg<br/>variables, sample rate"]
ecufile --> log["me7logger"]
cfg --> log
cable[K-line cable] --- log
log --> csv["logs/session_….csv"]
csv --> plot["ECUxPlot or<br/>any CSV viewer"]
- Read the flash image from the ECU with a flash tool. These programs don't read flash.
me7info generate image.binwritesecus/image.ecu(Connect, Session or SafeOnly, LogSpeed, measurements), plusimage.xdfbeside the image when it locates calibration maps. Use--5120here when needed; the logger does not take a bin.- List the variables to log in
session.cfg, pointing atecus/image.ecu. me7logger session.cfg(sole USB cable, or--usb N/-p PORT) writeslogs/session_<date>_<time>.csvuntil Ctrl-C (--tagoptional;-oappends /-o -stdout). The.ecuis the logging contract.Session=0x86allows the embedded RAM handler at LogSpeed;SafeOnly=yes(or--safe) stays on stock0x23at 10400.
If connect fails with the generated .ecu (no sync / keywords), see QUICKSTART.md Connect / double slowinit (SLOW-0x00); the engine must be stopped for that first connect.
Do not copy or log against files under testdata/. They are internal parity fixtures only and are deprecated for users. Always generate from an original (ORI) bin of your own ECU.
Commands and the session.cfg format: QUICKSTART.md.
flowchart TD
bin[image.bin] --> id["Identify<br/>part number, DPP block"]
id --> needles["Needles<br/>config/needles.yaml"]
id --> sigs["Map signatures<br/>config/mapsigs.d/"]
needles --> items["Measurements<br/>RAM addresses, conversions"]
sigs --> maps["Calibration maps<br/>addresses, axes"]
items --> ecuw[".ecu writer"] --> ecufile[ecus/image.ecu]
maps --> xdfw["xdfkit<br/>model, .xdf writer"]
cats["config/categories.json<br/>tuner names, categories"] --> xdfw
xdfw --> xdf[image.xdf]
xdfw -.-> full[image-full.xdf]
- Measurements are found by masked byte patterns ("needles") and a few decoded instructions, not by disassembling the whole image.
- Each Bosch map name and the bytes that locate it are a row in
config/mapsigs.d/(layout-scoped shards, first hit wins). A RAM address other rows splice is a row inconfig/signatures.yaml. image.xdfholds the maps named inconfig/categories.json, filed under its categories, plus the maps at their axis addresses.--full-xdfwrites every located map, with the rest underOther.--labels labels.tsvwrites theaddr,name,size,commentTSV for ME7 Ghidra label import: needle function entries (0x800000 plus the file offset), the.ecuRAM items, and each named map body and axis. A needle with several entries isNAME_ADDR. See docs/ghidra/.me7info probe image.binreports what was found without writing files. With--maps, it also prints how many maps each XDF would hold, and any axis constant it couldn't turn into an axis-point curve.--5120 autoreads located PUMN, PUMX, and PUE. The stock conversion is the mbar scale for that cell. When the doubled value is inside 400–1200 mbar and the stock value is outside it, every mbar factor is doubled.ondoubles them.offleaves them.
With Session=0x86 in the .ecu, the default path matches ME7Logger (embedded
log/logger/handler.bin + LogSpeed / 0xBE). SafeOnly or --safe is stock
0x23 at 10400. Flags: QUICKSTART.md.
SamplesPerSecondinsession.cfgis 1 to 50, default 10;-soverrides it.-c 0connects and writes the ident header only (no handler; CSV stays10400/HM0);-1/-c Nstop after samples.--abs-time,--align, and--no-headeradjust TIME and CSV headers (QUICKSTART.md).- Typical SPS and how channel count affects rate: docs/logging-rate.md.
- Connect / Session / SoftContinue background: docs/kwp-connect.md.
flowchart LR
shipped["config/<br/>beside the executable"] --> info[me7info]
embedded["embedded copy<br/>when config/ lacks the file"] -.-> info
me7info reads config/ beside the executable, symlinks resolved, so a symlink in /usr/local/bin works: the unpacked release, build/ after make, or the make install directory. Each file documents its fields in its header. --core, --names, --meas, --map, or --alias (or ME7_*) replaces one file. me7logger reads only the .ecu.
Release archives for macOS, Linux and Windows (amd64; arm64 for macOS and Linux) are on the releases page. Unpack one and run the programs from it, or symlink them onto your PATH.
From source, with Go installed:
make # runs the tests, builds build/me7info and build/me7logger
sudo make install # /usr/local/lib/me7-logger, links in /usr/local/bin
make help # all targetsPREFIX moves the install (PREFIX=/usr gives /usr/lib/me7-logger and /usr/bin). DESTDIR stages it for a package. The installed config/ is root-owned. Change a definition in a checkout and rebuild. make uninstall removes the install and the links that point into it.
AGENTS.md is for coding agents and is the commit / style guide for developers. DEVELOPER.md covers the design, the config files, the parity benchmark, and the private image corpus the tests use.
Related projects:
- xdfkit: converts map definitions between WinOLS KP, TunerPro XDF and JSON.
me7infowrites its XDF and reads the corpus definitions with it. This repo publishes the corpus map packs (publish/). - ecu-corpus (private): flash images and their map definitions, shared by the test suites.
make package writes dist/. Tag vX.Y.Z builds each OS on that OS and publishes the archives; -rcN is a prerelease. Darwin needs a Mac because USB listing links IOKit.
Under heavy development, and history is rewritten often. Expect to git reset --hard origin/master. Nothing is a public contract yet: config formats, flags and output can change without notice.
testdata/ (including leftover testdata/parity/ecu/me7info/*.ecu) is not a sample pack. It is for internal parity testing only and is deprecated for any other use. Run me7info on your own ORI bin.
GNU General Public License, version 3 or any later version. See LICENSE.
The embedded RAM handler (log/logger/handler.bin, source in
log/logger/handler/) is from
me7log, Copyright (C) 2023 prj, under
the same license.