Skip to content

Commit b1e2083

Browse files
committed
gh-actions: Build bin file
Signed-off-by: Daniel Schaefer <[email protected]>
1 parent 8e59cf1 commit b1e2083

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

.github/workflows/firmware.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,41 @@ jobs:
2222
- run: cargo build -p b1display --release
2323
- run: cargo build -p c1minimal --release
2424

25-
- run: |
25+
- name: Convert to UF2 format
26+
run: |
2627
sudo apt-get update
2728
sudo apt-get install -y libudev-dev
2829
cargo install elf2uf2-rs
2930
elf2uf2-rs target/thumbv6m-none-eabi/release/b1display b1display.uf2
3031
elf2uf2-rs target/thumbv6m-none-eabi/release/c1minimal c1minimal.uf2
3132
elf2uf2-rs target/thumbv6m-none-eabi/release/ledmatrix ledmatrix.uf2
3233
33-
- name: Upload Linux tool
34+
- name: Upload UF2 files
3435
uses: actions/upload-artifact@v3
3536
with:
36-
name: inputmodule_fw
37+
name: inputmodule_fw_uf2
3738
path: |
3839
b1display.uf2
3940
c1minimal.uf2
4041
ledmatrix.uf2
4142
43+
- name: Convert to bin format
44+
run: |
45+
sudo apt-get update
46+
sudo apt-get install -y llvm
47+
llvm-objcopy -O binary target/thumbv6m-none-eabi/release/b1display b1display.bin
48+
llvm-objcopy -O binary target/thumbv6m-none-eabi/release/c1minimal c1minimal.bin
49+
llvm-objcopy -O binary target/thumbv6m-none-eabi/release/ledmatrix ledmatrix.bin
50+
51+
- name: Upload bin files
52+
uses: actions/upload-artifact@v3
53+
with:
54+
name: inputmodule_fw_bin
55+
path: |
56+
b1display.bin
57+
c1minimal.bin
58+
ledmatrix.bin
59+
4260
linting:
4361
name: Linting
4462
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)