Skip to content

Add Arduino Uno firmware upload support (avrdude bundling, GUI upload, release packaging) - #8

Merged
Aria00pp merged 1 commit into
mainfrom
codex/add-arduino-uno-firmware-upload-support
Jun 1, 2026
Merged

Aria00pp merged 1 commit into
mainfrom
codex/add-arduino-uno-firmware-upload-support

Conversation

@Aria00pp

@Aria00pp Aria00pp commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Enable non-technical customers to upload a prepared Arduino Uno .hex from the Windows app without using Arduino IDE/CLI or command-line tooling.
  • Preserve conservative safety boundaries by only accepting prepared .hex artifacts and not compiling raw .ino source inside the app.
  • Ensure release artifacts can include a tested Windows avrdude uploader and that packaging/CI validate presence and assembly of uploader files.
  • Keep user experience responsive and robust by running uploads in the background, streaming logs, and showing clear success/failure messages.

Description

  • GUI: Replaced the placeholder Firmware workflow with real upload support in gui/portable_avr_control_studio.py, adding find_avrdude_tool, validate_upload_request, and command-construction helpers, a Use bundled firmware button, and an Upload Firmware to Arduino Uno action that disconnects serial, runs avrdude in a background thread, streams stdout/stderr to the Logs tab, and shows clear dialogs on completion.
  • Packaging: Updated release/scripts/assemble_customer_package.py to require staged Windows uploader files under release/artifacts/windows/tools/avrdude/, fail with a clear error if missing or incomplete, and copy them into the customer package under tools/avrdude/.
  • CI / Release workflows: Updated .github/workflows/release-build.yml to install Arduino CLI on the Windows job, locate and stage the Arduino AVR avrdude files into release/artifacts/windows/tools/avrdude/, and include staged uploader files in artifact uploads and checksum generation; updated .github/workflows/checks.yml to add smoke tests for uploader command construction/validation and package assembly with staged uploader files.
  • Docs and templates: Updated README.md, docs/customer_handoff.md, docs/PACKAGING.md, docs/testing.md, release/* templates and checklists to explain that the app uploads prepared .hex artifacts only, does not compile raw .ino source, that upload success is not physical hardware validation, and to document the staged tools/avrdude/ packaging expectations.

Testing

  • Compiled Python modules: ran python -m py_compile gui/portable_avr_control_studio.py release/scripts/assemble_customer_package.py and the compilation succeeded.
  • Parser/uploader smoke tests: ran the inline smoke script (via the updated checks.yml) exercising parse_serial_line and validate_upload_request with a temporary tools/avrdude fixture and various validation failure cases; these tests passed locally.
  • Release assembly help and smoke: ran python release/scripts/assemble_customer_package.py --help and verified behavior; ran assembly with dummy EXE/HEX and staged uploader files under release/artifacts/windows/tools/avrdude/ and confirmed the staged package and ZIP contain tools/avrdude/avrdude.exe, avrdude.conf, and support files.
  • Missing-uploader failure: ran the assembly script without staged uploader files and confirmed it fails with a clear error message explaining release/artifacts/windows/tools/avrdude/ must be staged first.
  • Notes: arduino-cli compile --fqbn arduino:avr:uno firmware/PortableAVRControlStudio could not be executed locally here because arduino-cli is not installed in this environment; the release workflow is configured to perform the Uno compile and uploader staging on the CI Windows job.

All automated smoke/unit checks added or modified in this change passed in the local verification steps above; the Arduino CLI compile step is expected to run in CI during the release build job.


Codex Task

@Aria00pp
Aria00pp merged commit 30b0797 into main Jun 1, 2026
2 checks passed
@Aria00pp
Aria00pp deleted the codex/add-arduino-uno-firmware-upload-support branch June 1, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant