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 | image.bin, session.cfg |
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"]
bin --> log["me7logger log"]
cfg --> log
cable[K-line cable] --- log
log --> csv[log.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, plusimage.xdfbeside the image when it locates calibration maps.- List the variables to log in
session.cfg, pointing atecus/image.ecu. me7logger log -p PORT -o log.csv image.bin session.cfglogs until Ctrl-C.
Commands, the session.cfg format and user overrides: 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/"]
user["config/user/*.yaml<br/>your overrides"] -.-> needles
user -.-> sigs
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 thatME7ImportLabelsScriptin ghidra-me7-analyzer reads: 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.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.
sequenceDiagram
participant L as me7logger
participant E as ECU
L->>E: 5-baud or fast init (address from image.bin)
E-->>L: keywords, at 10400 baud
L->>E: StartCommunication, diagnostic session
loop each sample
L->>E: $23 ReadMemoryByAddress (up to 254 bytes)
E-->>L: RAM bytes
L->>L: convert with ecus/image.ecu, append a CSV row
end
- Logging stays at 10400 baud. Each request reads up to 254 contiguous bytes, so variables spread across RAM lower the sample rate.
SamplesPerSecondinsession.cfgis 1 to 50, default 10;-soverrides it.-1reads one sample and stops, as a connection check.
flowchart LR
shipped["config/<br/>shipped definitions"] --> merged[loaded config]
user["config/user/*.yaml<br/>added or replaced rows"] --> merged
embedded["embedded copy<br/>when config/ lacks the file"] -.-> merged
merged --> tools[me7info, me7logger]
The programs read 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. Rows in config/user/ with the same name replace the shipped ones; --user or ME7_USER picks another directory.
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, so put your rows elsewhere and point ME7_USER at them. make uninstall removes the install and the links that point into it, and keeps any config/user/ there.
DEVELOPER.md covers the design, the config files, the parity scoring against legacy ME7Info output, 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 publishes it; -rcN is a prerelease.
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.
MIT, see LICENSE.