Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
727ab96
Millibyte platforms and specific configuration
millibyte-products Jan 24, 2026
733c7f6
Rebasing
millibyte-products Jan 24, 2026
cf092fa
Update wip 2
millibyte-products Mar 23, 2026
c710875
Millibyte Platforms - ESP32 Firmware
millibyte-products Mar 28, 2026
d3fba04
Motor fix
millibyte-products Apr 3, 2026
b4dc680
Memory overuse fixes for ssr1
millibyte-products Apr 3, 2026
a502d35
Millibyte Platforms changes
millibyte-products Apr 18, 2026
29bc520
Remove junk filess
millibyte-products Apr 18, 2026
b352035
MCPWM fixes
millibyte-products Apr 20, 2026
dda4fc6
Fix serial inputs
millibyte-products Apr 22, 2026
dc32f25
SR6PCB Production updates
millibyte-products May 1, 2026
4ef848d
Auto flasher
millibyte-products May 1, 2026
e3fc461
Fix include casing for case-sensitive filesystems (TCode/ not tcode/)
millibyte-products May 1, 2026
8d9d43d
CI: prepend pioarduino toolchain bins to PATH on Windows
millibyte-products May 1, 2026
a9f3f9d
Fix Motion/ include casing in main.cpp
millibyte-products May 1, 2026
f9de1a5
CI: disable build cache + fallback bootloader/partitions; preinstall …
millibyte-products May 1, 2026
17db9a9
CI: keep build cache enabled, ensure dir exists, log build contents a…
millibyte-products May 1, 2026
9e6ac62
CI: build buildfs first to avoid -t buildfs wiping firmware bins; shi…
millibyte-products May 1, 2026
00861df
CI: avoid powershell heredoc in YAML literal block
millibyte-products May 1, 2026
cc04c33
CI: add all tool-* dirs to PATH on Windows so mklittlefs/esptool resolve
millibyte-products May 1, 2026
2829bcb
CI: build firmware once on Ubuntu, share via artifact, package per-OS…
millibyte-products May 1, 2026
0095740
Merge remote-tracking branch 'upstream/Development' into MillibytePla…
millibyte-products May 6, 2026
a008a0a
Post-merge build fixes for servo envs (sr6_pcb, esp32doit-devkit-v1)
millibyte-products May 6, 2026
18d43e3
Restore BLDCHandler v0.3/v0.4 from pre-merge; rename PinMapSSR1->PinM…
millibyte-products May 7, 2026
f1f9c12
Remove duplicate flat-layout headers superseded by refactored subdirs
millibyte-products May 7, 2026
126fe74
Guard MCPWMServo::attachV5 against resolution_hz exceeding source clock
millibyte-products May 7, 2026
4fb952d
Honor DEFAULT_BOARD build flag in cfg/<chip>/config.h
millibyte-products May 7, 2026
bfa7706
Restore canonical BLDC_MotorA_* setting keys
millibyte-products May 7, 2026
1e87ce3
Add /debugInfo GET/POST endpoints to active WebHandler
millibyte-products May 7, 2026
8bd8391
Hoist polling to module scope and tolerate /debugInfo 404
millibyte-products May 7, 2026
3840273
BLDCHandler0_3: log driver init result and explicitly enable driver
millibyte-products May 7, 2026
28df609
Revert bldc-motor.js to pre-merge singleton
millibyte-products May 7, 2026
9431743
Wire up BLDCMotor.setupPins() in setPinoutSettings
millibyte-products May 7, 2026
a50bc90
SSR1PCB: populate BLDC PID/LowPass, lock MT6701 SSI encoder, hide unu…
millibyte-products May 7, 2026
6f54a69
Fix SR6PCB servo idle: PWM resolution default + UI/JS race fixes
millibyte-products May 8, 2026
ab98a72
Clean up FreeRTOS task layout
millibyte-products May 8, 2026
5eb777f
Flashing and webui fixes
millibyte-products May 8, 2026
07e8991
ci(flasher): build Rust millibyte-flasher for sr6_pcb + ssr1_pcb
millibyte-products May 8, 2026
107d4ce
ci(flasher): publish raw firmware bins + merged release.bin per board
millibyte-products May 8, 2026
09950bc
ci(flasher): build firmware then buildfs; fail loudly if FS image mis…
millibyte-products May 8, 2026
02a9c06
ci(flasher): robust boot_app0 lookup; drop fragile python heredoc
millibyte-products May 8, 2026
bd38cb5
ci(flasher): stash FS image before firmware build to survive .pio cle…
millibyte-products May 8, 2026
bac6f45
fix(flasher): use \ (system cmd) instead of #save when pushing Wi-Fi …
millibyte-products May 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
286 changes: 286 additions & 0 deletions .github/workflows/flasher.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,286 @@
name: flasher

on:
push:
branches: [master, MillibytePlatforms]
tags: ['v*']
paths:
- "ESP32/flasher/millibyte-flasher/**"
- "ESP32/platformio.ini"
- "ESP32/src/**"
- "ESP32/data/**"
- "ESP32/dataEdit/**"
- "ESP32/boards/**"
- ".github/workflows/flasher.yml"
pull_request:
paths:
- "ESP32/flasher/millibyte-flasher/**"
- ".github/workflows/flasher.yml"
workflow_dispatch:
release:
types: [published]

defaults:
run:
shell: bash

jobs:
firmware:
name: Build firmware (${{ matrix.board }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
board: [sr6_pcb, ssr1_pcb]
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install platformio
run: |
python -m pip install --upgrade pip
pip install platformio

- name: Build firmware + filesystem
working-directory: ESP32
run: |
set -euxo pipefail
mkdir -p cache
echo "::group::data/ contents"
find data -type f -print -exec ls -la {} \;
echo "::endgroup::"
stash=$(mktemp -d)
# Step 1: build the filesystem image and stash it immediately, since
# a later `pio run` invocation has been observed to wipe other
# artifacts out of .pio/build/<env>/ on some pioarduino releases.
pio run -t buildfs -e ${{ matrix.board }}
for f in littlefs.bin spiffs.bin; do
if [ -f .pio/build/${{ matrix.board }}/$f ]; then
cp .pio/build/${{ matrix.board }}/$f "$stash/"
fi
done
# Step 2: build firmware/bootloader/partitions.
pio run -e ${{ matrix.board }}
# Step 3: restore the FS image so staging can pick it up.
cp -n "$stash"/*.bin .pio/build/${{ matrix.board }}/ 2>/dev/null || true
ls -la .pio/build/${{ matrix.board }}/

- name: Stage firmware bundle
working-directory: ESP32
run: |
set -euxo pipefail
dest=flasher/millibyte-flasher/firmware/${{ matrix.board }}
src=.pio/build/${{ matrix.board }}
mkdir -p "$dest"
cp "$src/bootloader.bin" "$dest/"
cp "$src/partitions.bin" "$dest/"
cp "$src/firmware.bin" "$dest/"
if [ -f "$src/littlefs.bin" ]; then
cp "$src/littlefs.bin" "$dest/"
elif [ -f "$src/spiffs.bin" ]; then
cp "$src/spiffs.bin" "$dest/littlefs.bin"
else
echo "::error::No filesystem image (littlefs.bin / spiffs.bin) was produced for ${{ matrix.board }}"
ls -la "$src"
exit 1
fi
# boot_app0.bin location varies by arduino-espressif32 install layout.
boot_app0=""
for cand in \
~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin \
~/.platformio/packages/framework-arduinoespressif32@*/tools/partitions/boot_app0.bin; do
if [ -f "$cand" ]; then boot_app0="$cand"; break; fi
done
if [ -z "$boot_app0" ]; then
boot_app0=$(find ~/.platformio/packages -name boot_app0.bin -type f 2>/dev/null | head -n1 || true)
fi
if [ -z "$boot_app0" ]; then
echo "::error::could not locate boot_app0.bin"
ls -la ~/.platformio/packages/ || true
exit 1
fi
cp "$boot_app0" "$dest/boot_app0.bin"
ls -la "$dest"

- uses: actions/upload-artifact@v4
with:
name: firmware-${{ matrix.board }}
path: ESP32/flasher/millibyte-flasher/firmware/${{ matrix.board }}/
if-no-files-found: error

# Raw-bin release archive: same files, but renamed and zipped so users
# who already have esptool can flash without downloading the full
# MillibyteFlasher bundle.
- name: Build merged release.bin (esptool)
working-directory: ESP32
run: |
pip install esptool
src=flasher/millibyte-flasher/firmware/${{ matrix.board }}
python - <<'PY'
import json, os, subprocess, sys
src = os.environ["SRC"]
m = json.load(open(f"{src}/manifest.json"))
chip = m["chip"]
mode = m.get("flash_mode", "dio")
freq = str(m.get("flash_freq", "40m")).lower().replace("mhz", "m")
size = m.get("flash_size", "4MB")
pairs = []
for f in m["files"]:
name = f.get("name") or f.get("path")
pairs += [f["offset"], f"{src}/{name}"]
cmd = [
"esptool.py", "--chip", chip, "merge_bin",
"-o", f"{src}/release.bin",
"--flash_mode", mode, "--flash_freq", freq, "--flash_size", size,
*pairs,
]
print("+", " ".join(cmd))
subprocess.check_call(cmd)
PY
env:
SRC: flasher/millibyte-flasher/firmware/${{ matrix.board }}

- name: Stage raw-bin archive
working-directory: ESP32/flasher/millibyte-flasher
run: |
board=${{ matrix.board }}
src=firmware/$board
name=MillibyteFirmware-$board
stage=dist-firmware/$name
rm -rf "$stage"
mkdir -p "$stage"
cp "$src/bootloader.bin" "$src/partitions.bin" "$src/firmware.bin" \
"$src/boot_app0.bin" "$src/manifest.json" "$src/release.bin" "$stage/"
if [ -f "$src/littlefs.bin" ]; then cp "$src/littlefs.bin" "$stage/"; fi
(cd dist-firmware && zip -r9 "$name.zip" "$name")
ls -la dist-firmware/

- uses: actions/upload-artifact@v4
with:
name: firmware-archive-${{ matrix.board }}
path: ESP32/flasher/millibyte-flasher/dist-firmware/MillibyteFirmware-${{ matrix.board }}.zip
if-no-files-found: error

package:
name: Package flasher (${{ matrix.os }})
needs: firmware
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
artifact: MillibyteFlasher-linux-x86_64
ext: ""
- os: windows-latest
artifact: MillibyteFlasher-windows-x86_64
ext: ".exe"
- os: macos-latest
artifact: MillibyteFlasher-macos-universal
ext: ""
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Cache cargo
uses: Swatinem/rust-cache@v2
with:
workspaces: ESP32/flasher/millibyte-flasher

- name: Linux GUI deps
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libudev-dev libgtk-3-dev libxkbcommon-dev libwayland-dev

- name: Download sr6_pcb firmware
uses: actions/download-artifact@v4
with:
name: firmware-sr6_pcb
path: ESP32/flasher/millibyte-flasher/firmware/sr6_pcb

- name: Download ssr1_pcb firmware
uses: actions/download-artifact@v4
with:
name: firmware-ssr1_pcb
path: ESP32/flasher/millibyte-flasher/firmware/ssr1_pcb

- name: Build (macOS universal)
if: runner.os == 'macOS'
working-directory: ESP32/flasher/millibyte-flasher
run: |
rustup target add aarch64-apple-darwin x86_64-apple-darwin
cargo build --release --target aarch64-apple-darwin
cargo build --release --target x86_64-apple-darwin
mkdir -p target/release
lipo -create \
target/aarch64-apple-darwin/release/millibyte-flasher \
target/x86_64-apple-darwin/release/millibyte-flasher \
-output target/release/millibyte-flasher

- name: Build (Linux/Windows)
if: runner.os != 'macOS'
working-directory: ESP32/flasher/millibyte-flasher
run: cargo build --release

- name: Stage distribution
working-directory: ESP32/flasher/millibyte-flasher
run: |
stage="dist/${{ matrix.artifact }}"
rm -rf "$stage"
mkdir -p "$stage"
cp "target/release/millibyte-flasher${{ matrix.ext }}" "$stage/"
cp README.md "$stage/" || true
mkdir -p "$stage/firmware"
cp -R firmware/sr6_pcb "$stage/firmware/"
cp -R firmware/ssr1_pcb "$stage/firmware/"
ls -laR "$stage"

- name: Package (Windows)
if: runner.os == 'Windows'
working-directory: ESP32/flasher/millibyte-flasher/dist
run: 7z a "${{ matrix.artifact }}.zip" "${{ matrix.artifact }}"

- name: Package (Linux)
if: runner.os == 'Linux'
working-directory: ESP32/flasher/millibyte-flasher/dist
run: tar -czvf "${{ matrix.artifact }}.tar.gz" "${{ matrix.artifact }}"

- name: Package (macOS)
if: runner.os == 'macOS'
working-directory: ESP32/flasher/millibyte-flasher/dist
run: zip -r9 "${{ matrix.artifact }}.zip" "${{ matrix.artifact }}"

- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: |
ESP32/flasher/millibyte-flasher/dist/${{ matrix.artifact }}.zip
ESP32/flasher/millibyte-flasher/dist/${{ matrix.artifact }}.tar.gz
if-no-files-found: error

release:
name: Attach to release
needs: package
if: github.event_name == 'release' || startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
path: dist
- name: Flatten download tree
run: |
mkdir -p release
find dist -type f \( -name '*.zip' -o -name '*.tar.gz' \) -exec cp {} release/ \;
ls -la release/
- uses: softprops/action-gh-release@v2
with:
files: release/*
fail_on_unmatched_files: true
54 changes: 54 additions & 0 deletions ESP32/boards/sr6pcb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"build": {
"arduino": {
"partitions": "default.csv",
"memory_type": "qio_qspi"
},
"core": "esp32",
"extra_flags": [
"-DARDUINO_ESP32S3_DEV",
"-DARDUINO_RUNNING_CORE=1",
"-DARDUINO_EVENT_RUNNING_CORE=1",
"-DARDUINO_USB_CDC_ON_BOOT=1"
],
"f_cpu": "240000000L",
"f_flash": "80000000L",
"flash_mode": "qio",
"hwids": [
[
"0x303A",
"0x1001"
]
],
"mcu": "esp32s3",
"variant": "sr6pcb"
},
"connectivity": [
"wifi",
"bluetooth"
],
"debug": {
"default_tool": "esp-builtin",
"onboard_tools": [
"esp-builtin"
],
"openocd_target": "esp32s3.cfg"
},
"frameworks": [
"arduino",
"espidf"
],
"platforms": [
"espressif32"
],
"name": "SR6PCB",
"upload": {
"flash_size": "8MB",
"maximum_ram_size": 327680,
"maximum_size": 8388608,
"require_upload_port": true,
"speed": 921600
},
"url": "https://millibyte.store",
"vendor": "Millibyte LLC"
}
37 changes: 37 additions & 0 deletions ESP32/boards/ssr1pcb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"build": {
"arduino": {
"ldscript": "esp32_out.ld"
},
"core": "esp32",
"extra_flags": "-DARDUINO_ESP32_DEV",
"f_cpu": "240000000L",
"f_flash": "40000000L",
"flash_mode": "dio",
"mcu": "esp32",
"variant": "ssr1pcb"
},
"connectivity": [
"wifi",
"bluetooth",
"ethernet",
"can"
],
"debug": {
"openocd_board": "esp-wroom-32.cfg"
},
"frameworks": [
"arduino",
"espidf"
],
"name": "SSR1PCB",
"upload": {
"flash_size": "4MB",
"maximum_ram_size": 327680,
"maximum_size": 4194304,
"require_upload_port": true,
"speed": 460800
},
"url": "https://millibyte.store",
"vendor": "Millibyte LLC"
}
Loading
Loading