Update tools to simplify compile/upload ; note them in the readme
This commit is contained in:
parent
601e2ad4f0
commit
ce63d33a57
|
@ -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%)
|
- Battery level on feather neopixel (green = >80% ; yellow >=40% ; orange >= 25% ; red < 25%)
|
||||||
- User LED (red) always on when feather is running
|
- 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
|
## Licensing
|
||||||
|
|
||||||
Unless otherwise stated all source code is licensed under the [Apache 2 License](LICENSE-APACHE-2.0.txt).
|
Unless otherwise stated all source code is licensed under the [Apache 2 License](LICENSE-APACHE-2.0.txt).
|
||||||
|
|
1
build.ps1
Normal file
1
build.ps1
Normal file
|
@ -0,0 +1 @@
|
||||||
|
arduino-cli compile --log-level=warn --fqbn adafruit:nrf52:feather52840 serial_debugger.ino
|
9
make.ps1
9
make.ps1
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Reference in a new issue