DTC, Strings, and Flags
Beyond calibration maps, ECU firmware contains diagnostic codes, configuration flags, and identification strings. BitEdit 2 provides dedicated editors for managing these entities.
DTC Editor
DTC (Diagnostic Trouble Code) entries define error codes and the byte-level patches used to enable or disable them in the firmware.
Opening
Open the DTC Editor from:
- Tools → DTC Editor on the Ribbon
- The Map Tree panel (DTC entries appear under the DTC folder)
DTC Entry Structure
Each DTC entry contains:
- Codes — one or more numeric identifiers (e.g.,
P0171,P0300). A single entry can have multiple codes when the same patch disables several related DTCs simultaneously. - Patches — byte modifications that toggle the DTC. Each patch specifies:
- Address — where in the dump to write
- Original bytes — the stock firmware values
- Patched bytes — the modified values that disable the DTC
State Indicators
The DTC editor shows the current state of each entry:
| State | Meaning |
|---|---|
| Original | Dump matches the original bytes — DTC is active |
| Patched | Dump matches the patched bytes — DTC is disabled |
| Inconsistent | Dump matches neither — manual investigation needed |
Operations
- Apply Patches — write patched bytes to the dump (disables the DTC)
- Revert Patches — write original bytes to the dump (re-enables the DTC)
- Search (Ctrl+F) — filter DTCs by code or description
All DTC modifications are tracked in the undo stack.
Strings and Flags Editor
The Strings and Flags editor manages text values, binary flags, and bit fields stored in the firmware. Open it from the Tools tab on the Ribbon.
String Values
String values are ASCII text stored at fixed addresses in the dump. Common uses include:
- ECU software identifiers
- Tuner signature stamps
- Calibration version markers
Each string has:
- Name — descriptive label
- Address — dump offset
- Length — maximum character count
- Fill character — padding for strings shorter than the maximum length
Edit string values directly in the editor grid. Changes are written to the dump immediately and tracked in the undo stack.
Flags
Flags are named on/off switches implemented as byte-level patches (similar to DTCs but for general configuration). Each flag can have one or more patches. The editor shows the current state:
| State | Meaning |
|---|---|
| Set | Dump matches the patched bytes |
| Not Set | Dump matches the original bytes |
| Unknown | Dump matches neither — requires inspection |
Toggle a flag by clicking its state indicator.
Bit Fields
Bit fields represent individual bits within specific bytes of the dump. They provide fine-grained control over single-bit configuration flags that ECU firmware uses for feature toggles.
Each bit field has:
- Name — descriptive label
- Address — the byte address in the dump
- Bit number — which bit (0–7) within that byte
- Description — explanation of what the bit controls
The editor displays the current bit value (0 or 1) and allows toggling.
Creating New Entries
New DTC Entry
- Use the Add DTC command in the DTC editor ribbon
- Enter the DTC code(s)
- Add patches with the original and patched byte values
New String Value
- Use the Add String command in the Strings and Flags editor
- Specify the name, address, and length
- Optionally set a fill character
New Flag
- Use the Add Flag command in the Strings and Flags editor
- Enter the flag name and description
- Add patches with address, original bytes, and patched bytes
New Bit Field
- Use the Add Bit Field command
- Specify the name, byte address, and bit number (0–7)
- Optionally add a description
Tips
- DTC codes are ECU-specific — the same P-code may have different patches on different firmware versions. Always verify patch addresses against known-good references.
- Strings persist across versions — when importing a new dump version, string addresses may shift. Use the hex editor to locate the new positions.
- Bit fields vs. flags — use bit fields for single-bit toggles at known addresses. Use flags when you need multi-byte patches or when the modification involves changing several bytes at once.
- Backup before patching — DTC and flag modifications write directly to the dump. Create a version snapshot before making batch changes.