forked from hoylabs/OpenDTU-OnBattery
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE: repartition to double sketch size
this updates the partition scheme for 4 MB devices to have only a single app partition, making OTA updates impossible. the new environment is called "generic_esp32_4mb_no_ota". another new environment is added, called "generic_esp32_8mb", which uses the new common partition layout, where the previous two app partitions are merged into one, and one additional such app partition is added to the back of the table. the environments "generic" and "generic_esp32" are removed. the former was merely a version of "generic_esp32" with some pins pre-defined. we want users to install a pin_mapping.json and use the generic firmwares. the change preserves the littlefs partition (position and size), allowing for upgrades without loosing the configuration. users must flash the factory.bin for their respective environment using esptool (or compatible software) using the USB port of their board. in other words: updating to the new partition scheme using an OTA update is NOT possible.
- Loading branch information
1 parent
79214d7
commit 4630f4a
Showing
4 changed files
with
22 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: OpenDTU-onBattery Build | ||
name: OpenDTU-OnBattery Build | ||
|
||
on: | ||
push: | ||
|
@@ -8,7 +8,7 @@ on: | |
branches: | ||
- master | ||
- development | ||
tags-ignore: | ||
tags-ignore: | ||
- 'v**' | ||
pull_request: | ||
paths-ignore: | ||
|
@@ -120,6 +120,7 @@ jobs: | |
name: opendtu-onbattery-${{ matrix.environment }} | ||
path: | | ||
.pio/build/${{ matrix.environment }}/opendtu-onbattery-${{ matrix.environment }}.bin | ||
!.pio/build/generic_esp32_4mb_no_ota/opendtu-onbattery-generic_esp32_4mb_no_ota.bin | ||
.pio/build/${{ matrix.environment }}/opendtu-onbattery-${{ matrix.environment }}.factory.bin | ||
release: | ||
|
@@ -130,14 +131,14 @@ jobs: | |
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get tags | ||
run: git fetch --force --tags origin | ||
|
||
- name: Get openDTU core release | ||
run: | | ||
echo "OPEN_DTU_CORE_RELEASE=$(git for-each-ref --sort=creatordate --format '%(refname) %(creatordate)' refs/tags | grep 'refs/tags/v' | tail -1 | sed 's#.*/##' | sed 's/ .*//')" >> $GITHUB_ENV | ||
- name: Create openDTU-core-release-Badge | ||
uses: schneegans/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
# Name, Type, SubType, Offset, Size, Flags | ||
nvs, data, nvs, 0x9000, 0x5000, | ||
otadata, data, ota, 0xe000, 0x2000, | ||
app0, app, ota_0, 0x10000, 0x1E0000, | ||
app1, app, ota_1, 0x1F0000, 0x1E0000, | ||
app0, app, ota_0, 0x10000, 0x3C0000, | ||
spiffs, data, spiffs, 0x3D0000, 0x30000, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Name, Type, SubType, Offset, Size, Flags | ||
nvs, data, nvs, 0x9000, 0x5000, | ||
otadata, data, ota, 0xe000, 0x2000, | ||
app0, app, ota_0, 0x10000, 0x3C0000, | ||
spiffs, data, spiffs, 0x3D0000, 0x30000, | ||
app1, app, ota_1, 0x400000, 0x3C0000, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,17 +9,14 @@ | |
; https://docs.platformio.org/page/projectconf.html | ||
|
||
[platformio] | ||
default_envs = generic_esp32 | ||
default_envs = generic_esp32s3_usb | ||
extra_configs = | ||
platformio_override.ini | ||
|
||
[env] | ||
; Make sure to NOT add any spaces in the custom_ci_action property | ||
; (also the position in the file is important) | ||
; disabling generic and generic_esp32 until we decided on how to handle | ||
; the overflowing sketch partition for all ESP32 with 4MB flash. | ||
; custom_ci_action = generic,generic_esp32,generic_esp32s3,generic_esp32s3_usb | ||
custom_ci_action = generic_esp32s3,generic_esp32s3_usb | ||
custom_ci_action = generic_esp32_4mb_no_ota,generic_esp32_8mb,generic_esp32s3,generic_esp32s3_usb | ||
|
||
framework = arduino | ||
platform = [email protected] | ||
|
@@ -57,7 +54,7 @@ extra_scripts = | |
pre:pio-scripts/patch_apply.py | ||
post:pio-scripts/create_factory_bin.py | ||
|
||
board_build.partitions = partitions_custom_4mb.csv | ||
board_build.partitions = partitions_custom_8mb.csv | ||
board_build.filesystem = littlefs | ||
board_build.embed_files = | ||
webapp_dist/index.html.gz | ||
|
@@ -78,7 +75,13 @@ upload_protocol = esptool | |
; upload_port = COM4 | ||
|
||
|
||
[env:generic_esp32] | ||
[env:generic_esp32_4mb_no_ota] | ||
board = esp32dev | ||
build_flags = ${env.build_flags} | ||
board_build.partitions = partitions_custom_4mb.csv | ||
|
||
|
||
[env:generic_esp32_8mb] | ||
board = esp32dev | ||
build_flags = ${env.build_flags} | ||
|
||
|