Skip to content

Commit

Permalink
Adds UF2 output support for release builds. (#94)
Browse files Browse the repository at this point in the history
Adding UF2 output support for release builds.
  • Loading branch information
jeff-winn committed Dec 12, 2021
1 parent db2f1a3 commit 32d285a
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 3 deletions.
52 changes: 49 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,57 @@ jobs:
- name: Upload mainboard
uses: actions/upload-artifact@v2
with:
name: mainboard
path: out/Mainboard/Mainboard.ino.*
name: sketches
path: out/Mainboard/Mainboard.ino.bin

- name: Extract files
run: 7z e ${env:GITHUB_WORKSPACE}/out/Bluetooth/Bluetooth.ino.zip -o"${env:GITHUB_WORKSPACE}/out/Bluetooth"

- name: Upload bluetooth
uses: actions/upload-artifact@v2
with:
name: sketches
path: out/Bluetooth/Bluetooth.ino.bin

package:
runs-on: windows-latest
timeout-minutes: 15
needs: build

steps:
- name: Checkout packager
uses: actions/checkout@v2
with:
repository: microsoft/uf2
path: uf2

- name: Setup Python
uses: actions/setup-python@v2

- name: Download sketches
uses: actions/download-artifact@v2
with:
name: sketches
path: bin

# The values passed into the script need to be retrieved from the following page:
# See: https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51/uf2-bootloader-details
- name: Package mainboard
run: python uf2/utils/uf2conv.py -c -b 0x4000 -o ${env:GITHUB_WORKSPACE}/mainboard.uf2 ${env:GITHUB_WORKSPACE}/bin/Mainboard.ino.bin

# The values passed into the script need to be retrieved from the following page:
# See: https://github.com/adafruit/Adafruit_nRF52_Bootloader
- name: Package bluetooth
run: python uf2/utils/uf2conv.py -c -b 0x26000 -f 0xADA52840 -o ${env:GITHUB_WORKSPACE}/bluetooth.uf2 ${env:GITHUB_WORKSPACE}/bin/Bluetooth.ino.bin

- name: Upload mainboard
uses: actions/upload-artifact@v2
with:
name: mainboard
path: out/Bluetooth/Bluetooth.ino.*
path: mainboard.uf2

- name: Upload bluetooth
uses: actions/upload-artifact@v2
with:
name: bluetooth
path: bluetooth.uf2
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ else
endif

# Arduino CLI Board type
# NOTE: Any changes to the FQBNs here will also likely require updating the release workflow for packaging the UF2 files.
MAIN_BOARD_TYPE = adafruit:samd
MAIN_BOARD_VERSION = 1.7.5
MAIN_FQBN = $(MAIN_BOARD_TYPE):adafruit_feather_m4
Expand Down

0 comments on commit 32d285a

Please sign in to comment.