Skip to content

Commit

Permalink
add build-merged-firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
74th committed Feb 12, 2024
1 parent 478bd8c commit b609ea0
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 11 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,7 @@ jobs:
cd m5dial-simple-pointer
cp src/ssid.h.template src/ssid.h
pio run
- name: Rename Firmware
if: startsWith(github.ref, 'refs/tags/m5dial-simple-pointer')
run: |
cp m5dial-simple-pointer/.pio/build/m5dial/firmware.elf ./m5dial-simple-pointer.elf
cp m5dial-simple-pointer/.pio/build/m5dial/firmware.bin ./m5dial-simple-pointer.bin
./build-merged-firmware.sh
- name: Release
uses: softprops/action-gh-release@v1
Expand All @@ -50,6 +45,10 @@ jobs:
files: |
m5dial-simple-pointer.elf
m5dial-simple-pointer.bin
body: |
```
esptool.py --chip esp32s3 write_flash -z 0 m5dial-simple-pointer.bin
```
build-m5stackcore2-simple-pointer:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
build
.pio
*.bin
10 changes: 10 additions & 0 deletions m5dial-pimoroni-trackball-compatible/build-merged-firmware.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
esptool.py --chip esp32s3 merge_bin \
-o m5dial-simple-pointer-merged.bin \
--flash_mode dio \
--flash_freq 40m \
--flash_size 4MB \
0x1000 .pio/build/m5dial/bootloader.bin \
0x8000 .pio/build/m5dial/partitions.bin \
0xe000 ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin \
0x10000 .pio/build/m5dial/firmware.bin
4 changes: 2 additions & 2 deletions m5dial-pimoroni-trackball-compatible/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ lib_deps =
m5stack/M5Dial@^1.0.2
m5stack/M5Unified@^0.1.12

upload_protocol = custom
upload_command = curl -F "image=@.pio/build/m5dial/firmware.bin" m5dial.local/update
; upload_protocol = custom
; upload_command = curl -F "image=@.pio/build/m5dial/firmware.bin" m5dial.local/update
10 changes: 10 additions & 0 deletions m5dial-simple-pointer/build-merged-firmware.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
~/.platformio/penv/bin/python ~/.platformio/packages/tool-esptoolpy/esptool.py --chip esp32s3 merge_bin \
-o m5dial-simple-pointer.bin \
--flash_mode dio \
--flash_freq 80m \
--flash_size 8MB \
0x1000 .pio/build/m5dial/bootloader.bin \
0x8000 .pio/build/m5dial/partitions.bin \
0xe000 ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin \
0x10000 .pio/build/m5dial/firmware.bin
4 changes: 2 additions & 2 deletions m5dial-simple-pointer/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ lib_deps =
m5stack/M5Dial@^1.0.2
m5stack/M5Unified@^0.1.12

upload_protocol = custom
upload_command = curl -F "image=@.pio/build/m5dial/firmware.bin" m5dial.local/update
; upload_protocol = custom
; upload_command = curl -F "image=@.pio/build/m5dial/firmware.bin" m5dial.local/update
2 changes: 1 addition & 1 deletion m5stackcore2-simple-pointer/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
.vscode/.browse.c_cpp.db*
.vscode/c_cpp_properties.json
.vscode/launch.json
.vscode/ipch
.vscode/ipch
10 changes: 10 additions & 0 deletions m5stackcore2-simple-pointer/build-merged-firmware.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
esptool.py --chip esp32s3 merge_bin \
-o m5stackcore2-simple-pointer-merged.bin \
--flash_mode dio \
--flash_freq 40m \
--flash_size 16MB \
0x1000 .pio/build/m5stack-core2/bootloader.bin \
0x8000 .pio/build/m5stack-core2/partitions.bin \
0xe000 ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin \
0x10000 .pio/build/m5stack-core2/firmware.bin

0 comments on commit b609ea0

Please sign in to comment.