Skip to content

Commit 508f717

Browse files
authored
Merge pull request #5 from cjkas/scz/123
Improve release build suport for multiple esp32 chips
2 parents 4a2afd5 + bc4972c commit 508f717

6 files changed

Lines changed: 30 additions & 7 deletions

File tree

.github/workflows/release.yaml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,36 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16+
# fwname: firmware-only binary for OTA updates
17+
# obname: onboard image (bootloader + partitions + firmware + littlefs merged)
18+
# for flashing a new chip via USB/serial
19+
# addr_bootloader: chip-dependent (ESP32: 0x1000, C3/S3: 0x0)
20+
# addr_fs: must match spiffs/littlefs offset in huge_app.csv
1621
include:
1722
- env: esp32dev
1823
name: ESP32
1924
chip: ESP32
2025
addr_bootloader: "0x1000"
26+
addr_fs: "0x310000"
2127
fwname: SomfyController.esp32.bin
28+
fsname: SomfyController.littlefs.esp32.bin
2229
obname: SomfyController.onboard.esp32.bin
30+
- env: esp32c3
31+
name: ESP32-C3
32+
chip: ESP32-C3
33+
addr_bootloader: "0x0"
34+
addr_fs: "0x310000"
35+
fwname: SomfyController.esp32c3.bin
36+
fsname: SomfyController.littlefs.esp32c3.bin
37+
obname: SomfyController.onboard.esp32c3.bin
38+
- env: esp32s3
39+
name: ESP32-S3
40+
chip: ESP32-S3
41+
addr_bootloader: "0x0"
42+
addr_fs: "0x310000"
43+
fwname: SomfyController.esp32s3.bin
44+
fsname: SomfyController.littlefs.esp32s3.bin
45+
obname: SomfyController.onboard.esp32s3.bin
2346

2447
steps:
2548
- name: Get Release
@@ -52,7 +75,7 @@ jobs:
5275
${{ matrix.addr_bootloader }} .pio/build/${{ matrix.env }}/bootloader.bin \
5376
0x8000 .pio/build/${{ matrix.env }}/partitions.bin \
5477
0x10000 .pio/build/${{ matrix.env }}/firmware.bin \
55-
0x310000 .pio/build/${{ matrix.env }}/littlefs.bin
78+
${{ matrix.addr_fs }} .pio/build/${{ matrix.env }}/littlefs.bin
5679
5780
- name: Compress onboard image
5881
run: zip ${{ matrix.obname }}.zip ${{ matrix.obname }}
@@ -62,7 +85,7 @@ jobs:
6285
with:
6386
github_token: ${{ github.token }}
6487
upload_url: ${{ steps.get_release.outputs.upload_url }}
65-
asset_name: SomfyController.littlefs.bin
88+
asset_name: ${{ matrix.fsname }}
6689
asset_path: .pio/build/${{ matrix.env }}/littlefs.bin
6790
overwrite: true
6891

platformio.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ extra_scripts =
2525
post:archive_elf.py
2626
board_build.partitions = huge_app.csv
2727
board_build.filesystem = littlefs
28-
build_flags =
28+
build_flags =
2929
-DCORE_DEBUG_LEVEL=3
3030
-DCONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=1
3131
-DCONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=1

src/Somfy.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ enum class radio_proto : byte { // Ordinal byte 0-255
3030
};
3131
enum class somfy_commands : byte {
3232
Unknown0 = 0x0,
33-
My = 0x2,//DOWN
34-
Up = 0x1,
35-
MyUp = 0x4, //up
36-
Down = 0x3,
33+
My = 0x1,
34+
Up = 0x2,
35+
MyUp = 0x3,
36+
Down = 0x4,
3737
MyDown = 0x5,
3838
UpDown = 0x6,
3939
MyUpDown = 0x7,

src/SomfyController.ino.esp32.bin

-1.25 MB
Binary file not shown.
-1.13 MB
Binary file not shown.

src/SomfyController.littlefs.bin

-1.38 MB
Binary file not shown.

0 commit comments

Comments
 (0)