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
36 lines
1.0 KiB
JSON
36 lines
1.0 KiB
JSON
{
|
|
"files.associations": {
|
|
"*.ino": "cpp"
|
|
},
|
|
"C_Cpp.default.compilerPath": "",
|
|
"C_Cpp.default.defines": [
|
|
"ARDUINO=10816",
|
|
"ARDUINO_AVR_UNO",
|
|
"ARDUINO_ARCH_AVR",
|
|
"__AVR_ATmega328P__",
|
|
"F_CPU=16000000L"
|
|
],
|
|
"C_Cpp.default.includePath": [
|
|
"${workspaceFolder}/**",
|
|
"~/.arduino15/packages/arduino/hardware/avr/*/cores/arduino",
|
|
"~/.arduino15/packages/arduino/hardware/avr/*/variants/standard",
|
|
"~/.arduino15/packages/arduino/hardware/avr/*/libraries/**",
|
|
"~/Arduino/libraries/**"
|
|
],
|
|
"C_Cpp.errorSquiggles": "enabled",
|
|
"C_Cpp.default.cStandard": "c11",
|
|
"C_Cpp.default.cppStandard": "c++11",
|
|
"editor.formatOnSave": false,
|
|
"files.trimTrailingWhitespace": true,
|
|
"files.insertFinalNewline": true,
|
|
"files.exclude": {
|
|
"**/*.o": true,
|
|
"**/*.d": true,
|
|
"**/*.elf": true,
|
|
"**/*.hex": true
|
|
},
|
|
"search.exclude": {
|
|
"**/build": true,
|
|
"/tmp/arduino-build": true
|
|
}
|
|
} |