Firmware of single board OBD1 ECU
https://wiki.rusefi.com/uaEFI-Honda-OBD1
This repository is a rusEFI custom board definition: it holds only the board-specific
customization on top of the rusEFI core, which lives in the ext/rusefi git submodule.
This board is itself derived from the uaEFI121 board
(ext/rusefi/firmware/config/boards/hellen/uaefi121/) and reuses its mega-uaefi code.
- Board schematics PDF is in the docs folder:
docs/uaefi-Honda-OBD1-e-schematic.pdf - docs/schematic-notes.md — text extraction of the schematic: which pages matter for firmware, full pin-mapping tables, populate-options
docs/vato/CurrentTune.msq— a known-good reference tune- Wiki page: https://wiki.rusefi.com/uaEFI-Honda-OBD1
A custom board customizes rusEFI at three levels: build system (.mk/.env files),
C++ code (pin defaults, validation, knock hardware), and code generation inputs
(connector .yaml, TunerStudio .txt/.ini templating files).
meta-info.env— top-level board identity:SHORT_BOARD_NAME=uaefi-obd1(used in bundle and signature names),PROJECT_CPU=ARCH_STM32F4,USE_OPENBLT=yes(OpenBLT bootloader).board.mk— makefile fragment included by the rusEFI build:- adds
board_configuration.cppand the parent board'smega-uaefi.cppto the build (BOARDCPPSRC) - adds include paths for
generated/headers and the parent uaefi121 board (BOARDINC) - sets the default engine type:
-DDEFAULT_ENGINE_TYPE=engine_type_e::HONDA_OBD1 - chains into the parent board's
mega-uaefi.mk
- adds
board_unit_tests.mk— adds board-specific unit tests (tests/test_example.cpp) to the rusEFI unit test suite.
-
board_configuration.cpp— the heart of board customization. Its entry pointsetup_custom_board_overrides()installs three hooks into the rusEFI core:custom_board_DefaultConfiguration→customBoardDefaultConfiguration(): starts from the parent board defaults (setUaefiBoardDefaultConfiguration()), then assigns Honda-OBD1 pin mapping — injector pins, ICM ignition output, fuel pump, IACV, tach, VR crank/cam trigger inputs, and TPS/MAP/CLT/IAT analog channels, all viaGpio::MM100_*/MM100_IN_*symbols fromhellen_mm100_meta.h.custom_board_ConfigOverrides→ parent board'ssetMegaUaefiBoardConfigOverrides().custom_board_validateConfig→customBoardValidateConfig(): board-specific sanity checks; here it rejects a known-bad 24/0 toothed-wheel trigger configuration with a critical error.
The file also defines the
OUTPUTS[]table (getBoardMetaOutputs()/getBoardMetaOutputsCount()/getBoardMetaLowSideOutputsCount()) used by hardware QC / board self-test to enumerate every physical output with its connector pin. -
default_tune.cpp—boardTuneDefaults()sets tune values baked into the default calibration (e.g.displacement = 1.6for the D16 engine). -
knock_config.h— knock sensing hardware description: which ADC (ADCD3), which pin/channel (PA3 /ADC_CHANNEL_IN3), and sample rate/time for the STM32F4.
-
connectors/honda-obd1.yaml— the machine-readable pinout definition, the single source of truth mapping physical connector pins to MCU functions. Top-level keys:meta:— points at the header (config/boards/hellen_mm100_meta.h) whose symbols (e.g.MM100_INJ4,MM100_IN_CLT_ANALOG) are referenced by pin entries.pins:— one entry per physical pin across the Honda OBD1 A/B/D ECU connectors plus the board's own J1–J5 adapter connectors and the C AUX plug. Per-pin fields:pin:— connector pin name (e.g.A7,B15,J4_8)class:— role:outputs,analog_inputs,event_inputs,switch_inputs(a list plusid:list when one pin serves two roles)meta:— the MCU signal symbol from the meta header; generates thePIN_xxxdefinests_name:— pin display name in TunerStudio drop-downsfunction:,type:(inj/ign/ls/hs/av/at/gnd/5v/12v/can/hall/etb),color:— documentation for humans and the interactive pinout
info:— interactive pinout metadata: board title, wiki URL, connector photo (76pin-178780.jpg) and x/y coordinates of every pin on that image.
From this YAML, rusEFI automation (PinoutLogic.java) generates the files that sit next to it:
generated_board_pin_names.h,generated_outputs.h,generated_ts_name_by_pin.cpp. Never edit thegenerated_*files manually — edit the YAML and regenerate. -
connectors/readme.md— how to activate custom pin naming for the interactive pinout.
prepend.txt—#defineflags prepended during .ini generation to tailor the TunerStudio dialogs to this board: hides irrelevant UI (ETB pins, bank-2 cams, cylinders 5–12, rotary/HD options...), shows VR threshold settings, and overrides table sizes (IGN_TRIM_SIZE 8).extra.txt— board-specific data points added to the configuration definition (struct_no_prefix extra_s— currently empty).board_config.txt— board-specific calibrations hook (see comments inside).board_indicators.ini— board-specific TunerStudio indicators (seegen_config_common.sh).generated/— output of config generation: TunerStudio .ini, console live-data files, simulator tunes, canned tunes. Auto-generated; normally refreshed by GitHub Actions ormanual-generate-meta-data.sh.
compile_firmware.sh— build the firmware locally (wrapsext/rusefi/firmware/bin/compile.shwith this board'smeta-info.env)._compile_bundle.sh/_compile_bootloader.sh/_compile_simulator.sh/_compile_unit_tests.sh— build the full bundle, OpenBLT bootloader, simulator, and run board unit tests respectively.manual-generate-meta-data.sh— run config/code generation locally (GitHub Actions is the recommended path).bin/update-rusefi.sh— reset and re-init theext/rusefisubmodule to a clean state.bin/git_clean.sh— deep-clean repo and submodule.extra_files_to_copy_on_image/— extra files (Discord/nightly bundle links) copied into the firmware bundle image.
tests/test_example.cpp— board-specific GoogleTest cases, wired in viaboard_unit_tests.mkand run by_compile_unit_tests.sh.