Update tools to simplify compile/upload ; note them in the readme

This commit is contained in:
KemoNine 2020-09-07 22:10:48 -04:00
parent 601e2ad4f0
commit ce63d33a57
4 changed files with 17 additions and 2 deletions

View File

@ -46,6 +46,10 @@ A debug console for serial TTL. This can be used to work with serial TTL directl
- Battery level on feather neopixel (green = >80% ; yellow >=40% ; orange >= 25% ; red < 25%)
- User LED (red) always on when feather is running
## Building / Uploading
The ```make.ps1```, ```build.ps1``` and ```upload.ps1``` scripts can be used to build/upload this project. These scripts call the ```arduino-cli``` commands programatically.
## Licensing
Unless otherwise stated all source code is licensed under the [Apache 2 License](LICENSE-APACHE-2.0.txt).

1
build.ps1 Normal file
View File

@ -0,0 +1 @@
arduino-cli compile --log-level=warn --fqbn adafruit:nrf52:feather52840 serial_debugger.ino

View File

@ -1 +1,8 @@
arduino-cli compile --log-level=warn --fqbn adafruit:nrf52:feather52840 serial_debugger.ino
# Ensure this script fails if either build or upload fails
$ErrorActionPreference = "Stop"
# Ensure we actually build before upload (common mistake)
& .\build.ps1
# Upload to board
& .\upload.ps1

View File

@ -1 +1,4 @@
arduino-cli upload --fqbn adafruit:nrf52:feather52840 -p COM5
# Get list of boards
$COM_PORT=$(arduino-cli board list | Select-String -Pattern "adafruit:nrf52:feather52840" | %{ $_.ToString().Split(' ')[0]; })
Write-Host "Using serial port $($COM_PORT)"
arduino-cli upload --fqbn adafruit:nrf52:feather52840 -p $COM_PORT