Arduino CLI build system with HAL-based test architecture

Build and upload tool (arduino-build.sh):
- Compile, upload, and monitor via arduino-cli
- Device discovery with USB ID identification (--devices)
- Persistent reconnecting serial monitor (--watch)
- Split compile/upload workflow (--verify, --upload-only)
- First-time setup wizard (--setup)
- Comprehensive --help with troubleshooting and RedBoard specs

Testable application architecture:
- Hardware abstraction layer (lib/hal/) decouples logic from Arduino API
- Google Mock HAL for unit tests (exact call verification)
- Simulated HAL for system tests (GPIO state, virtual clock, I2C devices)
- Example I2C temperature sensor simulator (TMP102)
- Host-side test suite via CMake + Google Test (21 tests)

Example sketch:
- blink/ -- LED blink with button-controlled speed, wired through HAL
This commit is contained in:
Eric Ratliff
2026-02-14 09:25:49 -06:00
committed by Eric Ratliff
commit 991b9a8ee9
19 changed files with 2438 additions and 0 deletions

29
.gitattributes vendored Normal file
View File

@@ -0,0 +1,29 @@
# Auto-detect text files and normalize line endings
* text=auto
# Source code
*.ino text
*.cpp text
*.c text
*.h text
*.hpp text
*.S text
# Scripts
*.sh text eol=lf
# Config
*.json text
*.yaml text
*.yml text
*.md text
*.txt text
# Binary / generated -- do not diff
*.hex binary
*.elf binary
*.bin binary
*.eep binary
*.png binary
*.jpg binary
*.pdf binary