Skip to content

Commit 4c0d417

Browse files
committed
feat: connector YAML, TunerStudio config, build system improvements
Board connectors (all boards): - Add connectors/main.yaml per board with full pin mapping from wiki - Add connectors/can.yaml: register CAN_INPUT_0-7 and EFI_ADC_48-55 in TunerStudio switch/analog input dropdowns - Remove Knock (PA3/EFI_ADC_3) from compact & mini6ch dropdowns — reserved for internal ADC knock, not user-configurable TunerStudio UI (prepend.txt all boards): - MAIN_HELP_URL → wiki.mazduino.com - RE_auto_update_root_url → mazduino.com/firmware/ - WIKI_CAN_SENSORS/OUTPUTS/USER_TABLES/LOGIC_OUTPUTS/MATH_CHANNELS → wiki.mazduino.com/firmware/... - ts_show_cylinder_N: cap cylinder count — lite=4, compact=8, mini6ch=12 - ts_show_experimental false: hide Experimental 1/2/3 menus Build system: - build_boards.sh: skip Docker image rebuild if already exists; add ccache volume mount for faster incremental builds - Dockerfile: install ccache - board.mk: set EFI_EMBED_INI_MSD=FALSE on lite, compact, mini6ch, mega100 - nightly-release.yaml: extract INI from bundle ZIPs and deploy to GitHub Pages (gh-pages) for TunerStudio autodownload Submodule: - .gitmodules: point ext/rusefi to mazduino/rusefi-core (private fork) - Update submodule to latest commit
1 parent dd9b0ed commit 4c0d417

70 files changed

Lines changed: 53640 additions & 10213 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.DS_Store

0 Bytes
Binary file not shown.

.devcontainer/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ RUN sed -i \
99
apt-get update
1010
RUN apt-get -y install make automake autoconf gcc-12-arm-linux-gnueabi gcc-12-arm-linux-gnueabi-base gcc-arm-none-eabi binutils-arm-none-eabi git nano openjdk-21-jdk-headless mtools dosfstools xxd
1111
RUN apt-get -y install openssh-server cmake rsync gdb-multiarch build-essential zip p7zip-full bc
12+
RUN apt-get -y install ccache
1213
# used for remote non-devcontainer use ex: (https://blog.jetbrains.com/clion/2020/01/using-docker-with-clion/) [also on vscode: https://code.visualstudio.com/remote/advancedcontainers/develop-remote-host]
1314
RUN useradd -m rusefi && yes password | passwd rusefi
1415

.github/workflows/nightly-release.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,39 @@ jobs:
126126
## TunerStudio
127127
Launch `rusefi_console.jar` or open TunerStudio and point it to the `.ini` file for your board.
128128
files: bundles/*
129+
130+
- name: Extract INI files from bundles
131+
id: extract-ini
132+
run: |
133+
mkdir -p ini-pages
134+
for zip in bundles/*.zip; do
135+
[ -f "$zip" ] || continue
136+
tmpdir=$(mktemp -d)
137+
unzip -q "$zip" "*.ini" -d "$tmpdir" 2>/dev/null || true
138+
for ini in "$tmpdir"/*.ini; do
139+
[ -f "$ini" ] || continue
140+
# Parse signature: "rusEFI master.2026.06.22.mazduino-lite.1830052633"
141+
SIG=$(grep -oP 'signature\s*=\s*"\K[^"]+' "$ini" | head -1)
142+
# Strip "rusEFI " prefix and split by dot
143+
SIGPART="${SIG#rusEFI }"
144+
IFS='.' read -r BRANCH YEAR MONTH DAY TARGET HASH <<< "$SIGPART"
145+
if [ -z "$HASH" ]; then
146+
echo "Skipping $ini — could not parse signature: $SIG"
147+
continue
148+
fi
149+
DEST="ini-pages/$BRANCH/$YEAR/$MONTH/$DAY/$TARGET"
150+
mkdir -p "$DEST"
151+
cp "$ini" "$DEST/${HASH}.ini"
152+
echo "Staged: $DEST/${HASH}.ini"
153+
done
154+
rm -rf "$tmpdir"
155+
done
156+
ls -lR ini-pages/
157+
158+
- name: Deploy INI files to GitHub Pages
159+
uses: peaceiris/actions-gh-pages@v3
160+
with:
161+
github_token: ${{ secrets.GITHUB_TOKEN }}
162+
publish_dir: ./ini-pages
163+
destination_dir: ini
164+
keep_files: true

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
/.idea
1+
/.idea
2+
.ccache/

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "ext/rusefi"]
22
path = ext/rusefi
3-
url = https://github.com/rusefi/rusefi
3+
url = https://github.com/mazduino/rusefi-core.git

CHANGELOG.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,29 @@ All notable changes to Mazduino firmware are documented here.
55
## [Unreleased]
66

77
### Added
8-
- mazduino-mega100: STM32F407VGT6 (1MB) board with full feature set, dual pinout support (board04 and UA4C) selectable via TunerStudio board action
9-
- mazduino-mega100-512: STM32F407VET6 (512KB) board with reduced feature set; firmware constrained to 384KB to keep tune storage sector (sector 7, 0x08060000) free
108
- Nightly release workflow publishing per-board .bin, .srec, and .hex artifacts as GitHub Releases
119
- Docker-based build system (`build_boards.sh`) using `--platform linux/amd64` for consistent builds on Apple Silicon and x86-64
1210
- TunerStudio UI flags in `prepend.txt` to hide ETB, traction control, boost, rotary, Harley-Davidson, torque model, and other features not applicable to each board variant
11+
- mazduino-mega100: STM32F407VGT6 (1MB) board with full feature set, dual pinout support (board04 and UA4C) selectable via TunerStudio board action
12+
- mazduino-mega100-512: STM32F407VET6 (512KB) board with reduced feature set; firmware constrained to 384KB to keep tune storage sector (sector 7, 0x08060000) free
1313

1414
### Changed
15+
- `_compile_unit_tests.sh` updated to use `boards/mazduino-lite/meta-info.env` as the reference board (replacing deleted root `meta-info.env`)
16+
- `generated/controllers/generated/` pre-generated headers regenerated to include CAN input/output feature structs and new enum values from the mazduino rusefi fork
1517
- mazduino-mega100 and mega100-512: status LED at PB7 enabled (`getCommsLedPin()` and `LED_CRITICAL_ERROR_BRAIN_PIN` both assigned to PB7)
1618
- mazduino-compact: second idle solenoid field corrected to `secondSolenoidPin`
1719
- mazduino-lite: knock disabled by leaving `EFI_SOFTWARE_KNOCK` undefined (not set to FALSE) so `#ifdef` guards evaluate correctly
1820
- mazduino-mini6ch: `ts_show_traction_control true` enabled as ETB-capable board is the only variant that supports traction control
1921
- Dockerfile updated to handle both `ports.ubuntu.com` (ARM64) and `archive.ubuntu.com` (x86-64) Ubuntu mirror replacements for EOL Mantic release
2022

23+
### Removed
24+
- Root `meta-info.env` (SHORT_BOARD_NAME=mazduino): generic board identifier removed; all builds now reference a named board variant
25+
2126
### Fixed
2227
- Root `board_configuration.cpp`: removed forward declaration of `customBoardTsAction` which caused undefined reference linker error in CI unit test build
2328
- `EFI_EMBED_INI_MSD=FALSE` on mega100-512: the embedded TunerStudio INI file was contributing approximately 155KB to the firmware binary; disabling it reduced firmware from 488KB to 271KB
29+
- `EFI_EMBED_INI_MSD=FALSE` on all boards (mazduino-lite, mazduino-compact, mazduino-mini6ch, mazduino-mega100): CAN feature additions grew firmware beyond the 768KB linker budget; disabling INI embedding removes the 160KB ramdisk from flash. The TunerStudio INI is published as a GitHub Releases artifact instead
30+
- `EFI_HPFP=FALSE` on all boards: high-pressure fuel pump (GDI) control is not applicable to Mazda port-injection hardware; disabling it removes unused code
2431
- `board_unit_tests.mk`: added `BOARDINC` pointing to `generated/controllers/generated/` so the unit test build can find `rusefi_generated_mazduino.h` (previously the compiler could not find this file because the unit test Makefile does not include `rusefi.mk` which is what adds that path for firmware builds)
2532

2633
## [2025-01-01]

_compile_unit_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ cd ext/rusefi/unit_tests/
55
# This full path of the firmware directory
66
FDIR=$(cd "$(dirname "$0")"; pwd -P)
77

8-
MI="../../../meta-info.env"
8+
MI="../../../boards/mazduino-lite/meta-info.env"
99

1010
if [ -f "$FDIR/$MI" ]; then
1111
true

boards/mazduino-compact/board.mk

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,10 @@ DDEFS += -DRAM_UNUSED_SIZE=100
99
DDEFS += -DSTM32_ADC_USE_ADC3=TRUE
1010
DDEFS += -DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE
1111
DDEFS += -DKNOCK_SPECTROGRAM=TRUE
12+
13+
# INI embedded in flash overflows the 768KB budget with CAN feature additions.
14+
# INI is published as a GitHub Releases artifact instead.
15+
DDEFS += -DEFI_EMBED_INI_MSD=FALSE
16+
17+
# Mazda PFI — no GDI high-pressure fuel pump
18+
DDEFS += -DEFI_HPFP=FALSE

boards/mazduino-compact/board_configuration.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ static void customBoardDefaultConfiguration() {
2626
engineConfiguration->clt.adcChannel = EFI_ADC_4; // PA4
2727
engineConfiguration->iat.adcChannel = EFI_ADC_5; // PA5
2828

29-
engineConfiguration->analogInputDividerCoefficient = 1.47f;
29+
engineConfiguration->analogInputDividerCoefficient = 1.56f; // 5.6k high side/10k low side
30+
engineConfiguration->vbattDividerCoeff = (82.0f + 10.0f) / 10.0f; // 82k high side/10k low side
3031
engineConfiguration->adcVcc = 3.3f;
31-
engineConfiguration->clt.config.bias_resistor = 2490;
32-
engineConfiguration->iat.config.bias_resistor = 2490;
32+
engineConfiguration->clt.config.bias_resistor = 2700;
33+
engineConfiguration->iat.config.bias_resistor = 2700;
3334

3435
// Injectors - 4 channel
3536
engineConfiguration->injectionPins[0] = Gpio::D8;
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
pins:
2+
- id: CAN_INPUT_0
3+
class: switch_inputs
4+
ts_name: CAN Switch 1
5+
6+
- id: CAN_INPUT_1
7+
class: switch_inputs
8+
ts_name: CAN Switch 2
9+
10+
- id: CAN_INPUT_2
11+
class: switch_inputs
12+
ts_name: CAN Switch 3
13+
14+
- id: CAN_INPUT_3
15+
class: switch_inputs
16+
ts_name: CAN Switch 4
17+
18+
- id: CAN_INPUT_4
19+
class: switch_inputs
20+
ts_name: CAN Switch 5
21+
22+
- id: CAN_INPUT_5
23+
class: switch_inputs
24+
ts_name: CAN Switch 6
25+
26+
- id: CAN_INPUT_6
27+
class: switch_inputs
28+
ts_name: CAN Switch 7
29+
30+
- id: CAN_INPUT_7
31+
class: switch_inputs
32+
ts_name: CAN Switch 8
33+
34+
- id: EFI_ADC_48
35+
class: analog_inputs
36+
ts_name: CAN Analog 1
37+
38+
- id: EFI_ADC_49
39+
class: analog_inputs
40+
ts_name: CAN Analog 2
41+
42+
- id: EFI_ADC_50
43+
class: analog_inputs
44+
ts_name: CAN Analog 3
45+
46+
- id: EFI_ADC_51
47+
class: analog_inputs
48+
ts_name: CAN Analog 4
49+
50+
- id: EFI_ADC_52
51+
class: analog_inputs
52+
ts_name: CAN Analog 5
53+
54+
- id: EFI_ADC_53
55+
class: analog_inputs
56+
ts_name: CAN Analog 6
57+
58+
- id: EFI_ADC_54
59+
class: analog_inputs
60+
ts_name: CAN Analog 7
61+
62+
- id: EFI_ADC_55
63+
class: analog_inputs
64+
ts_name: CAN Analog 8

0 commit comments

Comments
 (0)