[Telink] Add w91 dual core OTA, board versions & Update builds to docker version 81 (#35778)
* [Telink] Added W91 v2.1 board configuration
* [Telink] removed config for crypto
HW acceleration alternatives options
removed from config
CONFIG_TELINK_B9X_MBEDTLS_HW_ACCELERATION
MBEDTLS_AES_ALT
MBEDTLS_ECP_ALT
* [Telink] fixed status-led for Lighting app
related to PWM
pull: [Telink] Lighting app build with disabled CONFIG_PWM #35621
* [Telink] removed v2 definition for W91
Only left board and board_v1
* [Telink] minor review fixes
* [Telink] Remove all partitions instead of one by one
* [Telink] Change N22 Image offset & size
* [Telink] OTA multi image in single slot
* [Telink] use corect key
* [Telink] Update test revision and add W91 continue-on-error
* [Telink] First verision of python script for process binaries
* [Telink] update readme files
* [Telink] Improve process binaries script
* [Telink] Use merged.bin always
* [Telink] Update Zephyr rev for build test
* [Telink] Fix code-lints & Spelling errors
* [Telink] Update Zephyr rev for build test
* [Telink] set correct order for set env
* [Telink] Clean up merged.bin from previuse build
* [Telink] Fix CI build
* [Telink] Update Zephyr rev for build test
* Restyled by autopep8
* [Telink] Add debug prints to check fill gap issue
* [Telink] Fix issue with enabled Factory Data only
* Restyled by autopep8
* [Telink] Update builds to docker version 81
* [Telink] disable debug part
* [Telink] Update NXP to docker version 81
* merge conflict resolve issue fix
---------
Co-authored-by: Alex Tsitsiura <s07641069@gmail.com>
Co-authored-by: Restyled.io <commits@restyled.io>
diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml
index 31630e1..7ec2a6b 100644
--- a/.github/workflows/bloat_check.yaml
+++ b/.github/workflows/bloat_check.yaml
@@ -34,7 +34,7 @@
runs-on: ubuntu-latest
container:
- image: ghcr.io/project-chip/chip-build:80
+ image: ghcr.io/project-chip/chip-build:81
steps:
- name: Checkout
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index d54f4e1..490d7e7 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -42,7 +42,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build:80
+ image: ghcr.io/project-chip/chip-build:81
volumes:
- "/:/runner-root-volume"
- "/tmp/log_output:/tmp/test_logs"
@@ -138,7 +138,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build:80
+ image: ghcr.io/project-chip/chip-build:81
volumes:
- "/:/runner-root-volume"
- "/tmp/log_output:/tmp/test_logs"
@@ -283,7 +283,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build:80
+ image: ghcr.io/project-chip/chip-build:81
volumes:
- "/:/runner-root-volume"
- "/tmp/log_output:/tmp/test_logs"
@@ -346,7 +346,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build:80
+ image: ghcr.io/project-chip/chip-build:81
volumes:
- "/:/runner-root-volume"
- "/tmp/log_output:/tmp/test_logs"
@@ -457,7 +457,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build:80
+ image: ghcr.io/project-chip/chip-build:81
volumes:
- "/:/runner-root-volume"
- "/tmp/log_output:/tmp/test_logs"
diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml
index 218ba5e..ca3f42e 100644
--- a/.github/workflows/chef.yaml
+++ b/.github/workflows/chef.yaml
@@ -35,7 +35,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build:80
+ image: ghcr.io/project-chip/chip-build:81
options: --user root
steps:
@@ -56,7 +56,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-esp32:80
+ image: ghcr.io/project-chip/chip-build-esp32:81
options: --user root
steps:
@@ -77,7 +77,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-nrf-platform:80
+ image: ghcr.io/project-chip/chip-build-nrf-platform:81
options: --user root
steps:
@@ -98,7 +98,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-telink:80
+ image: ghcr.io/project-chip/chip-build-telink:81
options: --user root
steps:
@@ -110,7 +110,7 @@
platform: telink
# - name: Update Zephyr to specific revision (for developers purpose)
# shell: bash
- # run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py ab81a585fca6a83b30e1f4e58a021113d6a3acb8"
+ # run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py 3ed7686a9378de6be1368c912f9a42f998bbfb18"
- name: CI Examples Telink
shell: bash
run: |
diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml
index 25e909a..e255ddc 100644
--- a/.github/workflows/doxygen.yaml
+++ b/.github/workflows/doxygen.yaml
@@ -81,7 +81,7 @@
runs-on: ubuntu-latest
container:
- image: ghcr.io/project-chip/chip-build-doxygen:80
+ image: ghcr.io/project-chip/chip-build-doxygen:81
if: github.actor != 'restyled-io[bot]'
diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml
index 863c1c7..c2bb69c 100644
--- a/.github/workflows/examples-ameba.yaml
+++ b/.github/workflows/examples-ameba.yaml
@@ -38,7 +38,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-ameba:80
+ image: ghcr.io/project-chip/chip-build-ameba:81
options: --user root
steps:
diff --git a/.github/workflows/examples-asr.yaml b/.github/workflows/examples-asr.yaml
index 89d4ad6..531709a 100644
--- a/.github/workflows/examples-asr.yaml
+++ b/.github/workflows/examples-asr.yaml
@@ -36,7 +36,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-asr:80
+ image: ghcr.io/project-chip/chip-build-asr:81
options: --user root
steps:
diff --git a/.github/workflows/examples-bouffalolab.yaml b/.github/workflows/examples-bouffalolab.yaml
index 2c17e2b..e49450f 100644
--- a/.github/workflows/examples-bouffalolab.yaml
+++ b/.github/workflows/examples-bouffalolab.yaml
@@ -37,7 +37,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-bouffalolab:80
+ image: ghcr.io/project-chip/chip-build-bouffalolab:81
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
diff --git a/.github/workflows/examples-cc13xx_26xx.yaml b/.github/workflows/examples-cc13xx_26xx.yaml
index d6e767b..80184cb 100644
--- a/.github/workflows/examples-cc13xx_26xx.yaml
+++ b/.github/workflows/examples-cc13xx_26xx.yaml
@@ -41,7 +41,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-ti:80
+ image: ghcr.io/project-chip/chip-build-ti:81
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
diff --git a/.github/workflows/examples-cc32xx.yaml b/.github/workflows/examples-cc32xx.yaml
index f72ef85..537621b 100644
--- a/.github/workflows/examples-cc32xx.yaml
+++ b/.github/workflows/examples-cc32xx.yaml
@@ -40,7 +40,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-ti:80
+ image: ghcr.io/project-chip/chip-build-ti:81
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml
index 4dc32df..75e4929 100644
--- a/.github/workflows/examples-efr32.yaml
+++ b/.github/workflows/examples-efr32.yaml
@@ -40,7 +40,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-efr32:80
+ image: ghcr.io/project-chip/chip-build-efr32:81
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml
index 933f167..dc1446a 100644
--- a/.github/workflows/examples-esp32.yaml
+++ b/.github/workflows/examples-esp32.yaml
@@ -36,7 +36,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-esp32:80
+ image: ghcr.io/project-chip/chip-build-esp32:81
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
@@ -126,7 +126,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-esp32:80
+ image: ghcr.io/project-chip/chip-build-esp32:81
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml
index 19c5981..9a3b419 100644
--- a/.github/workflows/examples-infineon.yaml
+++ b/.github/workflows/examples-infineon.yaml
@@ -37,7 +37,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-infineon:80
+ image: ghcr.io/project-chip/chip-build-infineon:81
env:
# TODO: this should probably be part of the dockerfile itself
CY_TOOLS_PATHS: /opt/Tools/ModusToolbox/tools_3.2
diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml
index 113dac7..f93e295 100644
--- a/.github/workflows/examples-linux-arm.yaml
+++ b/.github/workflows/examples-linux-arm.yaml
@@ -36,7 +36,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-crosscompile:80
+ image: ghcr.io/project-chip/chip-build-crosscompile:81
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml
index 832a4f3..f964f07 100644
--- a/.github/workflows/examples-linux-imx.yaml
+++ b/.github/workflows/examples-linux-imx.yaml
@@ -36,7 +36,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-imx:80
+ image: ghcr.io/project-chip/chip-build-imx:81
steps:
- name: Checkout
diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml
index dfa15c4..ff3762c 100644
--- a/.github/workflows/examples-linux-standalone.yaml
+++ b/.github/workflows/examples-linux-standalone.yaml
@@ -36,7 +36,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build:80
+ image: ghcr.io/project-chip/chip-build:81
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
diff --git a/.github/workflows/examples-linux-tv-casting-app.yaml b/.github/workflows/examples-linux-tv-casting-app.yaml
index 3a0b5cd..64000e4 100644
--- a/.github/workflows/examples-linux-tv-casting-app.yaml
+++ b/.github/workflows/examples-linux-tv-casting-app.yaml
@@ -36,7 +36,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build:80
+ image: ghcr.io/project-chip/chip-build:81
steps:
- name: Checkout
diff --git a/.github/workflows/examples-mw320.yaml b/.github/workflows/examples-mw320.yaml
index b40aba2..45daa41 100644
--- a/.github/workflows/examples-mw320.yaml
+++ b/.github/workflows/examples-mw320.yaml
@@ -39,7 +39,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build:80
+ image: ghcr.io/project-chip/chip-build:81
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml
index f717a7b..19fdeca 100644
--- a/.github/workflows/examples-nrfconnect.yaml
+++ b/.github/workflows/examples-nrfconnect.yaml
@@ -39,7 +39,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-nrf-platform:80
+ image: ghcr.io/project-chip/chip-build-nrf-platform:81
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
diff --git a/.github/workflows/examples-nuttx.yaml b/.github/workflows/examples-nuttx.yaml
index 9cd4c7f..6006cea1 100644
--- a/.github/workflows/examples-nuttx.yaml
+++ b/.github/workflows/examples-nuttx.yaml
@@ -35,7 +35,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-nuttx:80
+ image: ghcr.io/project-chip/chip-build-nuttx:81
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
diff --git a/.github/workflows/examples-nxp.yaml b/.github/workflows/examples-nxp.yaml
index 13023b6..c03b9a1 100644
--- a/.github/workflows/examples-nxp.yaml
+++ b/.github/workflows/examples-nxp.yaml
@@ -96,7 +96,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-nxp:80
+ image: ghcr.io/project-chip/chip-build-nxp:81
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
@@ -157,7 +157,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-nxp:80
+ image: ghcr.io/project-chip/chip-build-nxp:81
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
@@ -218,7 +218,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-nxp:80
+ image: ghcr.io/project-chip/chip-build-nxp:81
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
@@ -279,7 +279,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-nxp-zephyr:80
+ image: ghcr.io/project-chip/chip-build-nxp-zephyr:81
steps:
- name: Checkout
diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml
index 15897d7..95389cb 100644
--- a/.github/workflows/examples-openiotsdk.yaml
+++ b/.github/workflows/examples-openiotsdk.yaml
@@ -36,7 +36,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-openiotsdk:80
+ image: ghcr.io/project-chip/chip-build-openiotsdk:81
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
options: --privileged
diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml
index e326019..e0cf4c6 100644
--- a/.github/workflows/examples-qpg.yaml
+++ b/.github/workflows/examples-qpg.yaml
@@ -39,7 +39,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build:80
+ image: ghcr.io/project-chip/chip-build:81
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
diff --git a/.github/workflows/examples-stm32.yaml b/.github/workflows/examples-stm32.yaml
index 361e82b..c0bc9af 100644
--- a/.github/workflows/examples-stm32.yaml
+++ b/.github/workflows/examples-stm32.yaml
@@ -40,7 +40,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build:80
+ image: ghcr.io/project-chip/chip-build:81
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml
index 7fb14e8..757f112 100644
--- a/.github/workflows/examples-telink.yaml
+++ b/.github/workflows/examples-telink.yaml
@@ -38,7 +38,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-telink:80
+ image: ghcr.io/project-chip/chip-build-telink:81
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
@@ -57,7 +57,7 @@
gh-context: ${{ toJson(github) }}
# - name: Update Zephyr to specific revision (for developers purpose)
- # run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py ab81a585fca6a83b30e1f4e58a021113d6a3acb8"
+ # run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py 3ed7686a9378de6be1368c912f9a42f998bbfb18"
- name: Build example Telink (B92 retention) Air Quality Sensor App
run: |
@@ -72,6 +72,7 @@
run: rm -rf ./out
- name: Build example Telink (W91) All Clusters App
+ continue-on-error: true
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --target 'telink-tlsr9118bdk40d-all-clusters' build"
@@ -130,6 +131,7 @@
run: rm -rf ./out/telink*
- name: Build example Telink (W91) Lighting App with OTA, Factory Data
+ continue-on-error: true
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --target 'telink-tlsr9118bdk40d-light-ota-factory-data' build"
@@ -262,6 +264,7 @@
run: rm -rf ./out
- name: Build example Telink (W91) Window Covering App
+ continue-on-error: true
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --target 'telink-tlsr9118bdk40d-window-covering' build"
diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml
index 4c59fb5..8c6024e 100644
--- a/.github/workflows/examples-tizen.yaml
+++ b/.github/workflows/examples-tizen.yaml
@@ -36,7 +36,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-tizen:80
+ image: ghcr.io/project-chip/chip-build-tizen:81
options: --user root
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml
index b30ad7b..54561c6 100644
--- a/.github/workflows/full-android.yaml
+++ b/.github/workflows/full-android.yaml
@@ -38,7 +38,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-android:80
+ image: ghcr.io/project-chip/chip-build-android:81
volumes:
- "/tmp/log_output:/tmp/test_logs"
diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml
index 58174f9..c37ca98 100644
--- a/.github/workflows/fuzzing-build.yaml
+++ b/.github/workflows/fuzzing-build.yaml
@@ -33,7 +33,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build:80
+ image: ghcr.io/project-chip/chip-build:81
volumes:
- "/tmp/log_output:/tmp/test_logs"
diff --git a/.github/workflows/java-tests.yaml b/.github/workflows/java-tests.yaml
index 8c1f853..cc6dbc9 100644
--- a/.github/workflows/java-tests.yaml
+++ b/.github/workflows/java-tests.yaml
@@ -42,7 +42,7 @@
runs-on: ubuntu-latest
container:
- image: ghcr.io/project-chip/chip-build-java:80
+ image: ghcr.io/project-chip/chip-build-java:81
options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0"
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index b16919e..ddcfed3 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -35,7 +35,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build:80
+ image: ghcr.io/project-chip/chip-build:81
steps:
- name: Checkout
diff --git a/.github/workflows/minimal-build.yaml b/.github/workflows/minimal-build.yaml
index bf24052..5e364f3 100644
--- a/.github/workflows/minimal-build.yaml
+++ b/.github/workflows/minimal-build.yaml
@@ -33,7 +33,7 @@
runs-on: ubuntu-latest
container:
- image: ghcr.io/project-chip/chip-build-minimal:80
+ image: ghcr.io/project-chip/chip-build-minimal:81
steps:
- name: Checkout
@@ -55,7 +55,7 @@
runs-on: ubuntu-latest
container:
- image: ghcr.io/project-chip/chip-build-minimal:80
+ image: ghcr.io/project-chip/chip-build-minimal:81
steps:
- name: Checkout
diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml
index 3b3aab6..f21903d 100644
--- a/.github/workflows/qemu.yaml
+++ b/.github/workflows/qemu.yaml
@@ -40,7 +40,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-esp32-qemu:80
+ image: ghcr.io/project-chip/chip-build-esp32-qemu:81
volumes:
- "/tmp/log_output:/tmp/test_logs"
@@ -78,7 +78,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-tizen-qemu:80
+ image: ghcr.io/project-chip/chip-build-tizen-qemu:81
options: --user root
volumes:
- "/tmp/log_output:/tmp/test_logs"
diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml
index 9a9e5ba..22cf6b3 100644
--- a/.github/workflows/release_artifacts.yaml
+++ b/.github/workflows/release_artifacts.yaml
@@ -32,7 +32,7 @@
runs-on: ubuntu-latest
container:
- image: ghcr.io/project-chip/chip-build-esp32:80
+ image: ghcr.io/project-chip/chip-build-esp32:81
steps:
- name: Checkout
@@ -64,7 +64,7 @@
runs-on: ubuntu-latest
container:
- image: ghcr.io/project-chip/chip-build-efr32:80
+ image: ghcr.io/project-chip/chip-build-efr32:81
steps:
- name: Checkout
uses: actions/checkout@v4
diff --git a/.github/workflows/smoketest-android.yaml b/.github/workflows/smoketest-android.yaml
index eb2e14f..7d0e124 100644
--- a/.github/workflows/smoketest-android.yaml
+++ b/.github/workflows/smoketest-android.yaml
@@ -37,7 +37,7 @@
if: github.actor != 'restyled-io[bot]'
container:
- image: ghcr.io/project-chip/chip-build-android:80
+ image: ghcr.io/project-chip/chip-build-android:81
volumes:
- "/:/runner-root-volume"
- "/tmp/log_output:/tmp/test_logs"
diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml
index 9395f84..f10e569 100644
--- a/.github/workflows/tests.yaml
+++ b/.github/workflows/tests.yaml
@@ -49,7 +49,7 @@
runs-on: ubuntu-latest
container:
- image: ghcr.io/project-chip/chip-build:80
+ image: ghcr.io/project-chip/chip-build:81
options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1"
@@ -451,7 +451,7 @@
runs-on: ubuntu-latest
container:
- image: ghcr.io/project-chip/chip-build:80
+ image: ghcr.io/project-chip/chip-build:81
options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0"
diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml
index 87eb79e..e593630 100644
--- a/.github/workflows/unit_integration_test.yaml
+++ b/.github/workflows/unit_integration_test.yaml
@@ -39,7 +39,7 @@
runs-on: ubuntu-latest
container:
- image: ghcr.io/project-chip/chip-build:80
+ image: ghcr.io/project-chip/chip-build:81
volumes:
- "/:/runner-root-volume"
- "/tmp/log_output:/tmp/test_logs"
diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml
index 72370f1..483b948 100644
--- a/.github/workflows/zap_regeneration.yaml
+++ b/.github/workflows/zap_regeneration.yaml
@@ -30,7 +30,7 @@
runs-on: ubuntu-20.04
container:
- image: ghcr.io/project-chip/chip-build:80
+ image: ghcr.io/project-chip/chip-build:81
defaults:
run:
shell: sh
diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml
index 017a41c..45a3611 100644
--- a/.github/workflows/zap_templates.yaml
+++ b/.github/workflows/zap_templates.yaml
@@ -34,7 +34,7 @@
runs-on: ubuntu-20.04
container:
- image: ghcr.io/project-chip/chip-build:80
+ image: ghcr.io/project-chip/chip-build:81
defaults:
run:
shell: sh
diff --git a/config/telink/chip-module/CMakeLists.txt b/config/telink/chip-module/CMakeLists.txt
index d4c02aa..bfc26ce 100644
--- a/config/telink/chip-module/CMakeLists.txt
+++ b/config/telink/chip-module/CMakeLists.txt
@@ -152,6 +152,7 @@
# ==============================================================================
# Build chip library
# ==============================================================================
+
matter_build(chip
LIB_SHELL ${CONFIG_CHIP_LIB_SHELL}
DEVICE_INFO_EXAMPLE_PROVIDER ${CONFIG_CHIP_EXAMPLE_DEVICE_INFO_PROVIDER}
@@ -159,60 +160,43 @@
)
set_property(GLOBAL APPEND PROPERTY ZEPHYR_INTERFACE_LIBS chip)
-# ==============================================================================
-# Define 'chip-ota-image' target for building CHIP OTA image
-# ==============================================================================
-
include(${TELINK_COMMON}/common.cmake)
-set(BLOCK_SIZE "1024")
+# ==============================================================================
+# Define 'process_binaries' target for collecting final binary to flash
+# ==============================================================================
-if (CONFIG_BOOTLOADER_MCUBOOT)
- dt_nodelabel(dts_partition_path NODELABEL "boot_partition")
- dt_reg_size(mcuboot_size PATH ${dts_partition_path})
- math(EXPR boot_blocks "${mcuboot_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL)
+add_custom_target(
+ process_binaries ALL
+ COMMAND ${Python3_EXECUTABLE} ${CHIP_ROOT}/scripts/tools/telink/process_binaries.py
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+)
+add_dependencies(process_binaries ${ZEPHYR_FINAL_EXECUTABLE})
+# ==============================================================================
+# Define 'build_mcuboot' target for building the MCUBoot bootloader
+# ==============================================================================
+
+if (CONFIG_BOOTLOADER_MCUBOOT AND CONFIG_SOC_SERIES_RISCV_TELINK_B9X)
add_custom_target(build_mcuboot ALL
COMMAND
west build -b ${BASE_BOARD} -d build_mcuboot ${ZEPHYR_BASE}/../bootloader/mcuboot/boot/zephyr
-- -DOVERLAY_CONFIG=${GLOBAL_BOOT_CONF_OVERLAY_FILE} -DDTC_OVERLAY_FILE="${GLOBAL_BOOT_DTC_OVERLAY_FILE};${FLASH_DTC_OVERLAY_FILE};${USB_BOOT_DTC_OVERLAY_FILE};${MARS_BOOT_DTC_OVERLAY_FILE}"
COMMAND
- cp ${PROJECT_BINARY_DIR}/../modules/chip-module/build_mcuboot/zephyr/zephyr.bin ${PROJECT_BINARY_DIR}/zephyr.mcuboot.bin
+ cp ${PROJECT_BINARY_DIR}/../modules/chip-module/build_mcuboot/zephyr/zephyr.bin ${PROJECT_BINARY_DIR}/mcuboot.bin
)
-
- add_custom_target(merge_mcuboot ALL
- COMMAND
- dd if=${PROJECT_BINARY_DIR}/zephyr.mcuboot.bin of=${PROJECT_BINARY_DIR}/zephyr.bin
- COMMAND
- dd if=${PROJECT_BINARY_DIR}/zephyr.signed.bin of=${PROJECT_BINARY_DIR}/zephyr.bin bs=${BLOCK_SIZE} seek=${boot_blocks}
- )
-
- add_dependencies(merge_mcuboot ${ZEPHYR_FINAL_EXECUTABLE})
-
- if (CONFIG_CHIP_OTA_IMAGE_BUILD)
- chip_ota_image(chip-ota-image
- INPUT_FILES ${PROJECT_BINARY_DIR}/zephyr.signed.bin
- OUTPUT_FILE ${PROJECT_BINARY_DIR}/zephyr-ota.bin
- )
-
- add_dependencies(chip-ota-image ${ZEPHYR_FINAL_EXECUTABLE})
- endif()
endif()
-if (CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE)
- dt_nodelabel(dts_partition_path NODELABEL "factory_partition")
- dt_reg_addr(factory_size PATH ${dts_partition_path})
- math(EXPR factory_blocks "${factory_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL)
+# ==============================================================================
+# Define 'chip-ota-image' target for building CHIP OTA image
+# ==============================================================================
- add_custom_target(merge_factory_data ALL
- COMMAND
- dd if=${PROJECT_BINARY_DIR}/factory/factory_data.bin of=${PROJECT_BINARY_DIR}/zephyr.bin bs=${BLOCK_SIZE} seek=${factory_blocks}
+if (CONFIG_CHIP_OTA_IMAGE_BUILD)
+ chip_ota_image(chip-ota-image
+ INPUT_FILES ${PROJECT_BINARY_DIR}/zephyr.signed.bin
+ OUTPUT_FILE ${PROJECT_BINARY_DIR}/${CONFIG_CHIP_OTA_IMAGE_FILE_NAME}
)
- if (CONFIG_CHIP_OTA_IMAGE_BUILD)
- add_dependencies(merge_factory_data merge_mcuboot)
- else()
- add_dependencies(merge_factory_data ${ZEPHYR_FINAL_EXECUTABLE})
- endif()
+ add_dependencies(chip-ota-image process_binaries)
endif()
# ==============================================================================
@@ -223,27 +207,4 @@
telink_generate_factory_data()
endif()
-if (CONFIG_SOC_SERIES_RISCV_TELINK_W91 AND CONFIG_TELINK_W91_FETCH_N22_BIN)
- dt_nodelabel(flash_path NODELABEL "flash")
- dt_reg_size(flash_size PATH ${flash_path})
- math(EXPR flash_blocks "${flash_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL)
-
- add_custom_target(merge_n22 ALL
- COMMAND
- [ -f ${PROJECT_BINARY_DIR}/n22.bin ] && (
- dd if=/dev/zero bs=${BLOCK_SIZE} count=${flash_blocks} | tr '\\000' '\\377' > ${PROJECT_BINARY_DIR}/merged.bin &&
- dd if=${PROJECT_BINARY_DIR}/zephyr.bin of=${PROJECT_BINARY_DIR}/merged.bin conv=notrunc &&
- dd if=${PROJECT_BINARY_DIR}/n22.bin of=${PROJECT_BINARY_DIR}/merged.bin bs=${BLOCK_SIZE} seek=${flash_blocks} conv=notrunc
- ) || true
- )
-
- if (CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE)
- add_dependencies(merge_n22 merge_factory_data)
- elseif (CONFIG_CHIP_OTA_IMAGE_BUILD)
- add_dependencies(merge_n22 merge_mcuboot)
- else()
- add_dependencies(merge_n22 ${ZEPHYR_FINAL_EXECUTABLE})
- endif()
-endif()
-
endif() # CONFIG_CHIP
diff --git a/config/telink/chip-module/Kconfig b/config/telink/chip-module/Kconfig
index d09f453..7d9296b 100644
--- a/config/telink/chip-module/Kconfig
+++ b/config/telink/chip-module/Kconfig
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2023 Project CHIP Authors
+# Copyright (c) 2023-2024 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -46,6 +46,7 @@
select IMG_MANAGER
select STREAM_FLASH
select STREAM_FLASH_ERASE
+ select TELINK_W91_N22_MATTER_OTA_LAYOUT if BOARD_TLSR9118BDK40D
config CHIP_OTA_REQUESTOR_BUFFER_SIZE
int "OTA Requestor image buffer size"
@@ -123,9 +124,14 @@
default y
help
Enables merging generated factory data with the build target zephyr.bin file.
- As a result, output file zephyr.bin will consist of all partitions including
+ As a result, output file merged.bin will consist of all partitions including
factory data.
+config TELINK_FACTORY_DATA_PARTITION_ADDR
+ hex "factory-data partition address"
+ default $(dt_node_reg_addr_hex,$(dt_nodelabel_path,factory_partition),0)
+ depends on CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE
+
# Use default certificates without generating or providing them
config CHIP_FACTORY_DATA_USE_DEFAULT_CERTS
bool "Use default certificates located in Matter repository"
@@ -180,6 +186,7 @@
config CHIP_BUTTON_MANAGER_IRQ_MODE
bool "Use GPIO in an IRQ mode instead of polling the GPIO"
+ default y if BOARD_TLSR9118BDK40D
default PM
help
Use GPIO in an IRQ mode to avoid button polling loop and extend the battery lifetime by waking up by GPIO event.
diff --git a/config/telink/chip-module/Kconfig.defaults b/config/telink/chip-module/Kconfig.defaults
index 80d0715..ed8172b 100644
--- a/config/telink/chip-module/Kconfig.defaults
+++ b/config/telink/chip-module/Kconfig.defaults
@@ -180,7 +180,8 @@
endif
# Board non-retention config
-if BOARD_TLSR9118BDK40D || BOARD_TLSR9528A || BOARD_TLSR9258A || BOARD_TLSR9518ADK80D
+if BOARD_TLSR9118BDK40D || BOARD_TLSR9118BDK40D_V1 || \
+ BOARD_TLSR9528A || BOARD_TLSR9258A || BOARD_TLSR9518ADK80D
config PWM
default y
endif
@@ -192,6 +193,10 @@
config CHIP_OTA_REQUESTOR
default y
+config MCUBOOT_SIGNATURE_KEY_FILE
+ default "bootloader/mcuboot/root-ec-p256.pem" if BOARD_TLSR9118BDK40D
+ depends on BOOTLOADER_MCUBOOT
+
# In current config/zephyr/Kconfig
# next deprecated values are selected
# warning: Deprecated symbol CPLUSPLUS is enabled.
@@ -292,7 +297,7 @@
config CHIP_WIFI
bool "Enable Telink Wi-Fi support"
- default y if BOARD_TLSR9118BDK40D
+ default y if BOARD_TLSR9118BDK40D || BOARD_TLSR9118BDK40D_V1
select WIFI_W91
select WIFI
select NET_STATISTICS
diff --git a/examples/air-quality-sensor-app/telink/README.md b/examples/air-quality-sensor-app/telink/README.md
index e2c4b49..c3d403f 100644
--- a/examples/air-quality-sensor-app/telink/README.md
+++ b/examples/air-quality-sensor-app/telink/README.md
@@ -138,10 +138,10 @@
After build application with enabled OTA feature, use next binary files:
-- zephyr.bin - main binary to flash PCB (Use at least 2MB PCB).
-- zephyr-ota.bin - binary for OTA Provider
+- merged.bin - main binary to flash PCB (Use at least 2MB PCB).
+- matter.ota - binary for OTA Provider
-All binaries has the same SW version. To test OTA “zephyr-ota.bin” should have
+All binaries has the same SW version. To test OTA “matter.ota” should have
higher SW version than base SW. Set CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 in
corresponding “prj.conf” configuration file.
@@ -156,7 +156,7 @@
- Run the Linux OTA Provider with OTA image.
```
- ./chip-ota-provider-app -f zephyr-ota.bin
+ ./chip-ota-provider-app -f matter.ota
```
- Provision the Linux OTA Provider using chip-tool
diff --git a/examples/all-clusters-app/ameba/README.md b/examples/all-clusters-app/ameba/README.md
index 0569c91..9c442d6 100644
--- a/examples/all-clusters-app/ameba/README.md
+++ b/examples/all-clusters-app/ameba/README.md
@@ -27,11 +27,11 @@
- Pull docker image:
- $ docker pull ghcr.io/project-chip/chip-build-ameba:76
+ $ docker pull ghcr.io/project-chip/chip-build-ameba:81
- Run docker container:
- $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:76
+ $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:81
- Setup build environment:
diff --git a/examples/all-clusters-app/telink/README.md b/examples/all-clusters-app/telink/README.md
index 8404672..b702fd6 100644
--- a/examples/all-clusters-app/telink/README.md
+++ b/examples/all-clusters-app/telink/README.md
@@ -140,10 +140,10 @@
After build application with enabled OTA feature, use next binary files:
-- zephyr.bin - main binary to flash PCB (Use at least 2MB PCB).
-- zephyr-ota.bin - binary for OTA Provider
+- merged.bin - main binary to flash PCB (Use at least 2MB PCB).
+- matter.ota - binary for OTA Provider
-All binaries has the same SW version. To test OTA “zephyr-ota.bin” should have
+All binaries has the same SW version. To test OTA “matter.ota” should have
higher SW version than base SW. Set CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 in
corresponding “prj.conf” configuration file.
@@ -158,7 +158,7 @@
- Run the Linux OTA Provider with OTA image.
```
- ./chip-ota-provider-app -f zephyr-ota.bin
+ ./chip-ota-provider-app -f matter.ota
```
- Provision the Linux OTA Provider using chip-tool
diff --git a/examples/all-clusters-minimal-app/ameba/README.md b/examples/all-clusters-minimal-app/ameba/README.md
index c136008..b120d9c 100644
--- a/examples/all-clusters-minimal-app/ameba/README.md
+++ b/examples/all-clusters-minimal-app/ameba/README.md
@@ -27,13 +27,13 @@
- Pull docker image:
```
- $ docker pull ghcr.io/project-chip/chip-build-ameba:76
+ $ docker pull ghcr.io/project-chip/chip-build-ameba:81
```
- Run docker container:
```
- $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:76
+ $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:81
```
- Setup build environment:
diff --git a/examples/all-clusters-minimal-app/telink/README.md b/examples/all-clusters-minimal-app/telink/README.md
index f3a0646..33ad1fb 100644
--- a/examples/all-clusters-minimal-app/telink/README.md
+++ b/examples/all-clusters-minimal-app/telink/README.md
@@ -125,10 +125,10 @@
After build application with enabled OTA feature, use next binary files:
-- zephyr.bin - main binary to flash PCB (Use at least 2MB PCB).
-- zephyr-ota.bin - binary for OTA Provider
+- merged.bin - main binary to flash PCB (Use at least 2MB PCB).
+- matter.ota - binary for OTA Provider
-All binaries has the same SW version. To test OTA “zephyr-ota.bin” should have
+All binaries has the same SW version. To test OTA “matter.ota” should have
higher SW version than base SW. Set CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 in
corresponding “prj.conf” configuration file.
@@ -143,7 +143,7 @@
- Run the Linux OTA Provider with OTA image.
```
- ./chip-ota-provider-app -f zephyr-ota.bin
+ ./chip-ota-provider-app -f matter.ota
```
- Provision the Linux OTA Provider using chip-tool
diff --git a/examples/bridge-app/telink/README.md b/examples/bridge-app/telink/README.md
index 7dc29df..00b050e 100644
--- a/examples/bridge-app/telink/README.md
+++ b/examples/bridge-app/telink/README.md
@@ -285,10 +285,10 @@
After build application with enabled OTA feature, use next binary files:
-- zephyr.bin - main binary to flash PCB (Use at least 2MB PCB).
-- zephyr-ota.bin - binary for OTA Provider
+- merged.bin - main binary to flash PCB (Use at least 2MB PCB).
+- matter.ota - binary for OTA Provider
-All binaries has the same SW version. To test OTA “zephyr-ota.bin” should have
+All binaries has the same SW version. To test OTA “matter.ota” should have
higher SW version than base SW. Set CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 in
corresponding “prj.conf” configuration file.
@@ -303,7 +303,7 @@
- Run the Linux OTA Provider with OTA image.
```
- ./chip-ota-provider-app -f zephyr-ota.bin
+ ./chip-ota-provider-app -f matter.ota
```
- Provision the Linux OTA Provider using chip-tool
diff --git a/examples/contact-sensor-app/telink/README.md b/examples/contact-sensor-app/telink/README.md
index cbceff7..27d5721 100755
--- a/examples/contact-sensor-app/telink/README.md
+++ b/examples/contact-sensor-app/telink/README.md
@@ -142,10 +142,10 @@
After build application with enabled OTA feature, use next binary files:
-- zephyr.bin - main binary to flash PCB (Use at least 2MB PCB).
-- zephyr-ota.bin - binary for OTA Provider
+- merged.bin - main binary to flash PCB (Use at least 2MB PCB).
+- matter.ota - binary for OTA Provider
-All binaries has the same SW version. To test OTA “zephyr-ota.bin” should have
+All binaries has the same SW version. To test OTA “matter.ota” should have
higher SW version than base SW. Set CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 in
corresponding “prj.conf” configuration file.
@@ -160,7 +160,7 @@
- Run the Linux OTA Provider with OTA image.
```
- ./chip-ota-provider-app -f zephyr-ota.bin
+ ./chip-ota-provider-app -f matter.ota
```
- Provision the Linux OTA Provider using chip-tool
diff --git a/examples/light-switch-app/ameba/README.md b/examples/light-switch-app/ameba/README.md
index d24c9a5..a0d0275 100644
--- a/examples/light-switch-app/ameba/README.md
+++ b/examples/light-switch-app/ameba/README.md
@@ -26,11 +26,11 @@
- Pull docker image:
- $ docker pull ghcr.io/project-chip/chip-build-ameba:76
+ $ docker pull ghcr.io/project-chip/chip-build-ameba:81
- Run docker container:
- $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:76
+ $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:81
- Setup build environment:
diff --git a/examples/light-switch-app/telink/README.md b/examples/light-switch-app/telink/README.md
index c60dd6a..b2c75f1 100755
--- a/examples/light-switch-app/telink/README.md
+++ b/examples/light-switch-app/telink/README.md
@@ -263,10 +263,10 @@
After build application with enabled OTA feature, use next binary files:
-- zephyr.bin - main binary to flash PCB (Use at least 2MB PCB).
-- zephyr-ota.bin - binary for OTA Provider
+- merged.bin - main binary to flash PCB (Use at least 2MB PCB).
+- matter.ota - binary for OTA Provider
-All binaries has the same SW version. To test OTA “zephyr-ota.bin” should have
+All binaries has the same SW version. To test OTA “matter.ota” should have
higher SW version than base SW. Set CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 in
corresponding “prj.conf” configuration file.
@@ -281,7 +281,7 @@
- Run the Linux OTA Provider with OTA image.
```
- ./chip-ota-provider-app -f zephyr-ota.bin
+ ./chip-ota-provider-app -f matter.ota
```
- Provision the Linux OTA Provider using chip-tool
diff --git a/examples/lighting-app/ameba/README.md b/examples/lighting-app/ameba/README.md
index 810aa6d..7527d02 100644
--- a/examples/lighting-app/ameba/README.md
+++ b/examples/lighting-app/ameba/README.md
@@ -23,11 +23,11 @@
- Pull docker image:
- $ docker pull ghcr.io/project-chip/chip-build-ameba:76
+ $ docker pull ghcr.io/project-chip/chip-build-ameba:81
- Run docker container:
- $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:76
+ $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:81
- Setup build environment:
diff --git a/examples/lighting-app/telink/README.md b/examples/lighting-app/telink/README.md
index 0bf52ea..1a14250 100644
--- a/examples/lighting-app/telink/README.md
+++ b/examples/lighting-app/telink/README.md
@@ -204,10 +204,10 @@
After build application with enabled OTA feature, use next binary files:
-- zephyr.bin - main binary to flash PCB (Use at least 2MB PCB).
-- zephyr-ota.bin - binary for OTA Provider
+- merged.bin - main binary to flash PCB (Use at least 2MB PCB).
+- matter.ota - binary for OTA Provider
-All binaries has the same SW version. To test OTA “zephyr-ota.bin” should have
+All binaries has the same SW version. To test OTA “matter.ota” should have
higher SW version than base SW. Set CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 in
corresponding “prj.conf” configuration file.
@@ -222,7 +222,7 @@
- Run the Linux OTA Provider with OTA image.
```
- ./chip-ota-provider-app -f zephyr-ota.bin
+ ./chip-ota-provider-app -f matter.ota
```
- Provision the Linux OTA Provider using chip-tool
diff --git a/examples/lighting-app/telink/src/AppTask.cpp b/examples/lighting-app/telink/src/AppTask.cpp
index 63a5cb7..9e41915 100644
--- a/examples/lighting-app/telink/src/AppTask.cpp
+++ b/examples/lighting-app/telink/src/AppTask.cpp
@@ -252,7 +252,11 @@
void AppTask::LinkLeds(LedManager & ledManager)
{
-#if (!CONFIG_PWM)
- ledManager.linkLed(LedManager::EAppLed_App0, 0);
-#endif // !CONFIG_PWM
+#if CONFIG_CHIP_ENABLE_APPLICATION_STATUS_LED
+ ledManager.linkLed(LedManager::EAppLed_Status, 0);
+#endif
+
+#if !CONFIG_PWM
+ ledManager.linkLed(LedManager::EAppLed_App0, 1);
+#endif /* !CONFIG_PWM */
}
diff --git a/examples/lock-app/telink/README.md b/examples/lock-app/telink/README.md
index 8e0d605..9f6e867 100755
--- a/examples/lock-app/telink/README.md
+++ b/examples/lock-app/telink/README.md
@@ -145,10 +145,10 @@
After build application with enabled OTA feature, use next binary files:
-- zephyr.bin - main binary to flash PCB (Use at least 2MB PCB).
-- zephyr-ota.bin - binary for OTA Provider
+- merged.bin - main binary to flash PCB (Use at least 2MB PCB).
+- matter.ota - binary for OTA Provider
-All binaries has the same SW version. To test OTA “zephyr-ota.bin” should have
+All binaries has the same SW version. To test OTA “matter.ota” should have
higher SW version than base SW. Set CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 in
corresponding “prj.conf” configuration file.
@@ -163,7 +163,7 @@
- Run the Linux OTA Provider with OTA image.
```
- ./chip-ota-provider-app -f zephyr-ota.bin
+ ./chip-ota-provider-app -f matter.ota
```
- Provision the Linux OTA Provider using chip-tool
diff --git a/examples/ota-requestor-app/ameba/README.md b/examples/ota-requestor-app/ameba/README.md
index b3efb9d..1af6617 100644
--- a/examples/ota-requestor-app/ameba/README.md
+++ b/examples/ota-requestor-app/ameba/README.md
@@ -6,11 +6,11 @@
- Pull docker image:
- $ docker pull ghcr.io/project-chip/chip-build-ameba:76
+ $ docker pull ghcr.io/project-chip/chip-build-ameba:81
- Run docker container:
- $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:76
+ $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:81
- Setup build environment:
diff --git a/examples/ota-requestor-app/telink/README.md b/examples/ota-requestor-app/telink/README.md
index d8590c6..0c359b3 100755
--- a/examples/ota-requestor-app/telink/README.md
+++ b/examples/ota-requestor-app/telink/README.md
@@ -134,10 +134,10 @@
After build application with enabled OTA feature, use next binary files:
-- zephyr.bin - main binary to flash PCB (Use at least 2MB PCB).
-- zephyr-ota.bin - binary for OTA Provider
+- merged.bin - main binary to flash PCB (Use at least 2MB PCB).
+- matter.ota - binary for OTA Provider
-All binaries has the same SW version. To test OTA “zephyr-ota.bin” should have
+All binaries has the same SW version. To test OTA “matter.ota” should have
higher SW version than base SW. Set CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 in
corresponding “prj.conf” configuration file.
@@ -152,7 +152,7 @@
- Run the Linux OTA Provider with OTA image.
```
- ./chip-ota-provider-app -f zephyr-ota.bin
+ ./chip-ota-provider-app -f matter.ota
```
- Provision the Linux OTA Provider using chip-tool
diff --git a/examples/pigweed-app/ameba/README.md b/examples/pigweed-app/ameba/README.md
index acf8c48..6478091 100644
--- a/examples/pigweed-app/ameba/README.md
+++ b/examples/pigweed-app/ameba/README.md
@@ -31,11 +31,11 @@
- Pull docker image:
- $ docker pull ghcr.io/project-chip/chip-build-ameba:76
+ $ docker pull ghcr.io/project-chip/chip-build-ameba:81
- Run docker container:
- $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:76
+ $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:81
- Setup build environment:
diff --git a/examples/platform/telink/common.cmake b/examples/platform/telink/common.cmake
index 9b8149c..34ff2db 100644
--- a/examples/platform/telink/common.cmake
+++ b/examples/platform/telink/common.cmake
@@ -14,10 +14,11 @@
# limitations under the License.
string(REPLACE "_retention" "" BASE_BOARD ${BOARD})
+string(REGEX REPLACE "_v[0-9]+" "" BASE_BOARD ${BASE_BOARD})
if(NOT FLASH_SIZE)
if(${BASE_BOARD} MATCHES "tlsr9118bdk40d")
- set(FLASH_SIZE "3m")
+ set(FLASH_SIZE "4m")
else()
set(FLASH_SIZE "2m")
endif()
@@ -86,17 +87,20 @@
set(GLOBAL_BOOT_DTC_OVERLAY_FILE "${CHIP_ROOT}/src/platform/telink/${BASE_BOARD}.overlay")
if(NOT EXISTS "${GLOBAL_BOOT_DTC_OVERLAY_FILE}")
- message(FATAL_ERROR "${GLOBAL_BOOT_DTC_OVERLAY_FILE} doesn't exist")
+ message(STATUS "${GLOBAL_BOOT_DTC_OVERLAY_FILE} doesn't exist")
+ unset(GLOBAL_BOOT_DTC_OVERLAY_FILE)
endif()
set(GLOBAL_DTC_OVERLAY_FILE "${CHIP_ROOT}/src/platform/telink/${BOARD}.overlay")
if(NOT EXISTS "${GLOBAL_DTC_OVERLAY_FILE}")
- message(FATAL_ERROR "${GLOBAL_DTC_OVERLAY_FILE} doesn't exist")
+ message(STATUS "${GLOBAL_DTC_OVERLAY_FILE} doesn't exist")
+ unset(GLOBAL_DTC_OVERLAY_FILE)
endif()
set(FLASH_DTC_OVERLAY_FILE "${CHIP_ROOT}/src/platform/telink/${BASE_BOARD}_${FLASH_SIZE}_flash.overlay")
if(NOT EXISTS "${FLASH_DTC_OVERLAY_FILE}")
- message(FATAL_ERROR "${FLASH_DTC_OVERLAY_FILE} doesn't exist")
+ message(STATUS "${FLASH_DTC_OVERLAY_FILE} doesn't exist")
+ unset(FLASH_DTC_OVERLAY_FILE)
endif()
if(DTC_OVERLAY_FILE)
diff --git a/examples/platform/telink/common/src/AppTaskCommon.cpp b/examples/platform/telink/common/src/AppTaskCommon.cpp
index 8b67c40..1303674 100644
--- a/examples/platform/telink/common/src/AppTaskCommon.cpp
+++ b/examples/platform/telink/common/src/AppTaskCommon.cpp
@@ -416,7 +416,7 @@
void AppTaskCommon::LinkPwms(PwmManager & pwmManager)
{
-#if CONFIG_BOARD_TLSR9118BDK40D // TLSR9118BDK40D EVK supports only 1 PWM channel connected to LED
+#if CONFIG_BOARD_TLSR9118BDK40D_V1 && CONFIG_PWM // TLSR9118BDK40D_V1 EVK supports single LED PWM channel
pwmManager.linkPwm(PwmManager::EAppPwm_Red, 0);
#elif CONFIG_WS2812_STRIP
pwmManager.linkPwm(PwmManager::EAppPwm_Red, 0);
diff --git a/examples/pump-app/telink/README.md b/examples/pump-app/telink/README.md
index 2a89b75..0f3337f 100755
--- a/examples/pump-app/telink/README.md
+++ b/examples/pump-app/telink/README.md
@@ -146,10 +146,10 @@
After build application with enabled OTA feature, use next binary files:
-- zephyr.bin - main binary to flash PCB (Use at least 2MB PCB).
-- zephyr-ota.bin - binary for OTA Provider
+- merged.bin - main binary to flash PCB (Use at least 2MB PCB).
+- matter.ota - binary for OTA Provider
-All binaries has the same SW version. To test OTA “zephyr-ota.bin” should have
+All binaries has the same SW version. To test OTA “matter.ota” should have
higher SW version than base SW. Set CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 in
corresponding “prj.conf” configuration file.
@@ -164,7 +164,7 @@
- Run the Linux OTA Provider with OTA image.
```
- ./chip-ota-provider-app -f zephyr-ota.bin
+ ./chip-ota-provider-app -f matter.ota
```
- Provision the Linux OTA Provider using chip-tool
diff --git a/examples/pump-controller-app/telink/README.md b/examples/pump-controller-app/telink/README.md
index 529cc37..3d1cb1f 100755
--- a/examples/pump-controller-app/telink/README.md
+++ b/examples/pump-controller-app/telink/README.md
@@ -147,10 +147,10 @@
After build application with enabled OTA feature, use next binary files:
-- zephyr.bin - main binary to flash PCB (Use at least 2MB PCB).
-- zephyr-ota.bin - binary for OTA Provider
+- merged.bin - main binary to flash PCB (Use at least 2MB PCB).
+- matter.ota - binary for OTA Provider
-All binaries has the same SW version. To test OTA “zephyr-ota.bin” should have
+All binaries has the same SW version. To test OTA “matter.ota” should have
higher SW version than base SW. Set CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 in
corresponding “prj.conf” configuration file.
@@ -165,7 +165,7 @@
- Run the Linux OTA Provider with OTA image.
```
- ./chip-ota-provider-app -f zephyr-ota.bin
+ ./chip-ota-provider-app -f matter.ota
```
- Provision the Linux OTA Provider using chip-tool
diff --git a/examples/smoke-co-alarm-app/telink/README.md b/examples/smoke-co-alarm-app/telink/README.md
index da8a084..a2fce29 100755
--- a/examples/smoke-co-alarm-app/telink/README.md
+++ b/examples/smoke-co-alarm-app/telink/README.md
@@ -144,10 +144,10 @@
After build application with enabled OTA feature, use next binary files:
-- zephyr.bin - main binary to flash PCB (Use at least 2MB PCB).
-- zephyr-ota.bin - binary for OTA Provider
+- merged.bin - main binary to flash PCB (Use at least 2MB PCB).
+- matter.ota - binary for OTA Provider
-All binaries has the same SW version. To test OTA “zephyr-ota.bin” should have
+All binaries has the same SW version. To test OTA “matter.ota” should have
higher SW version than base SW. Set CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 in
corresponding “prj.conf” configuration file.
@@ -162,7 +162,7 @@
- Run the Linux OTA Provider with OTA image.
```
- ./chip-ota-provider-app -f zephyr-ota.bin
+ ./chip-ota-provider-app -f matter.ota
```
- Provision the Linux OTA Provider using chip-tool
diff --git a/examples/temperature-measurement-app/telink/README.md b/examples/temperature-measurement-app/telink/README.md
index 04668c0..7dc9287 100644
--- a/examples/temperature-measurement-app/telink/README.md
+++ b/examples/temperature-measurement-app/telink/README.md
@@ -127,10 +127,10 @@
After build application with enabled OTA feature, use next binary files:
-- zephyr.bin - main binary to flash PCB (Use at least 2MB PCB).
-- zephyr-ota.bin - binary for OTA Provider
+- merged.bin - main binary to flash PCB (Use at least 2MB PCB).
+- matter.ota - binary for OTA Provider
-All binaries has the same SW version. To test OTA “zephyr-ota.bin” should have
+All binaries has the same SW version. To test OTA “matter.ota” should have
higher SW version than base SW. Set CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 in
corresponding “prj.conf” configuration file.
@@ -145,7 +145,7 @@
- Run the Linux OTA Provider with OTA image.
```
- ./chip-ota-provider-app -f zephyr-ota.bin
+ ./chip-ota-provider-app -f matter.ota
```
- Provision the Linux OTA Provider using chip-tool
diff --git a/examples/thermostat/telink/README.md b/examples/thermostat/telink/README.md
index 1d6c66b..2685613 100755
--- a/examples/thermostat/telink/README.md
+++ b/examples/thermostat/telink/README.md
@@ -138,10 +138,10 @@
After build application with enabled OTA feature, use next binary files:
-- zephyr.bin - main binary to flash PCB (Use at least 2MB PCB).
-- zephyr-ota.bin - binary for OTA Provider
+- merged.bin - main binary to flash PCB (Use at least 2MB PCB).
+- matter.ota - binary for OTA Provider
-All binaries has the same SW version. To test OTA “zephyr-ota.bin” should have
+All binaries has the same SW version. To test OTA “matter.ota” should have
higher SW version than base SW. Set CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 in
corresponding “prj.conf” configuration file.
@@ -156,7 +156,7 @@
- Run the Linux OTA Provider with OTA image.
```
- ./chip-ota-provider-app -f zephyr-ota.bin
+ ./chip-ota-provider-app -f matter.ota
```
- Provision the Linux OTA Provider using chip-tool
diff --git a/examples/window-app/telink/README.md b/examples/window-app/telink/README.md
index ee788a7..b40a12b 100644
--- a/examples/window-app/telink/README.md
+++ b/examples/window-app/telink/README.md
@@ -209,10 +209,10 @@
After build application with enabled OTA feature, use next binary files:
-- zephyr.bin - main binary to flash PCB (Use at least 2MB PCB).
-- zephyr-ota.bin - binary for OTA Provider
+- merged.bin - main binary to flash PCB (Use at least 2MB PCB).
+- matter.ota - binary for OTA Provider
-All binaries has the same SW version. To test OTA “zephyr-ota.bin” should have
+All binaries has the same SW version. To test OTA “matter.ota” should have
higher SW version than base SW. Set CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 in
corresponding “prj.conf” configuration file.
@@ -227,7 +227,7 @@
- Run the Linux OTA Provider with OTA image.
```
- ./chip-ota-provider-app -f zephyr-ota.bin
+ ./chip-ota-provider-app -f matter.ota
```
- Provision the Linux OTA Provider using chip-tool
diff --git a/integrations/cloudbuild/chef.yaml b/integrations/cloudbuild/chef.yaml
index 8931f73..fd34dab 100644
--- a/integrations/cloudbuild/chef.yaml
+++ b/integrations/cloudbuild/chef.yaml
@@ -1,5 +1,5 @@
steps:
- - name: "ghcr.io/project-chip/chip-build-vscode:76"
+ - name: "ghcr.io/project-chip/chip-build-vscode:81"
entrypoint: "bash"
args:
- "-c"
@@ -7,7 +7,7 @@
git config --global --add safe.directory "*"
python scripts/checkout_submodules.py --shallow --recursive --platform esp32 nrfconnect silabs linux android
id: Submodules
- - name: "ghcr.io/project-chip/chip-build-vscode:76"
+ - name: "ghcr.io/project-chip/chip-build-vscode:81"
# NOTE: silabs boostrap is NOT done with the rest as it requests a conflicting
# jinja2 version (asks for 3.1.3 when constraints.txt asks for 3.0.3)
env:
@@ -23,7 +23,7 @@
- name: pwenv
path: /pwenv
timeout: 900s
- - name: "ghcr.io/project-chip/chip-build-vscode:76"
+ - name: "ghcr.io/project-chip/chip-build-vscode:81"
env:
- PW_ENVIRONMENT_ROOT=/pwenv
args:
@@ -38,7 +38,7 @@
- name: pwenv
path: /pwenv
- - name: "ghcr.io/project-chip/chip-build-vscode:76"
+ - name: "ghcr.io/project-chip/chip-build-vscode:81"
env:
- PW_ENVIRONMENT_ROOT=/pwenv
args:
diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml
index 92f6494..99bc504 100644
--- a/integrations/cloudbuild/smoke-test.yaml
+++ b/integrations/cloudbuild/smoke-test.yaml
@@ -1,5 +1,5 @@
steps:
- - name: "ghcr.io/project-chip/chip-build-vscode:78"
+ - name: "ghcr.io/project-chip/chip-build-vscode:81"
entrypoint: "bash"
args:
- "-c"
@@ -7,7 +7,7 @@
git config --global --add safe.directory "*"
python scripts/checkout_submodules.py --shallow --recursive --platform esp32 nrfconnect silabs linux android
id: Submodules
- - name: "ghcr.io/project-chip/chip-build-vscode:78"
+ - name: "ghcr.io/project-chip/chip-build-vscode:81"
# NOTE: silabs boostrap is NOT done with the rest as it requests a conflicting
# jinja2 version (asks for 3.1.3 when constraints.txt asks for 3.0.3)
env:
@@ -24,7 +24,7 @@
path: /pwenv
timeout: 900s
- - name: "ghcr.io/project-chip/chip-build-vscode:78"
+ - name: "ghcr.io/project-chip/chip-build-vscode:81"
id: ESP32
env:
- PW_ENVIRONMENT_ROOT=/pwenv
@@ -45,7 +45,7 @@
volumes:
- name: pwenv
path: /pwenv
- - name: "ghcr.io/project-chip/chip-build-vscode:78"
+ - name: "ghcr.io/project-chip/chip-build-vscode:81"
id: NRFConnect
env:
- PW_ENVIRONMENT_ROOT=/pwenv
@@ -66,7 +66,7 @@
- name: pwenv
path: /pwenv
- - name: "ghcr.io/project-chip/chip-build-vscode:78"
+ - name: "ghcr.io/project-chip/chip-build-vscode:81"
id: EFR32
env:
- PW_ENVIRONMENT_ROOT=/pwenv
@@ -88,7 +88,7 @@
- name: pwenv
path: /pwenv
- - name: "ghcr.io/project-chip/chip-build-vscode:78"
+ - name: "ghcr.io/project-chip/chip-build-vscode:81"
id: Linux
env:
- PW_ENVIRONMENT_ROOT=/pwenv
@@ -141,7 +141,7 @@
- name: pwenv
path: /pwenv
- - name: "ghcr.io/project-chip/chip-build-vscode:78"
+ - name: "ghcr.io/project-chip/chip-build-vscode:81"
id: Android
env:
- PW_ENVIRONMENT_ROOT=/pwenv
diff --git a/scripts/tools/telink/process_binaries.py b/scripts/tools/telink/process_binaries.py
new file mode 100755
index 0000000..0f650e2
--- /dev/null
+++ b/scripts/tools/telink/process_binaries.py
@@ -0,0 +1,110 @@
+#!/usr/bin/env python3
+
+#
+# Copyright (c) 2024 Project CHIP Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+import os
+import subprocess
+import sys
+
+ZEPHYR_BASE = os.environ.get('ZEPHYR_BASE')
+if ZEPHYR_BASE is None:
+ raise EnvironmentError("ZEPHYR_BASE environment variable is not set")
+
+try:
+ from core import BuildConfiguration
+except ImportError:
+ sys.path.append(os.path.abspath(os.path.join(ZEPHYR_BASE, 'scripts/west_commands/runners')))
+ from core import BuildConfiguration
+
+
+def merge_binaries(input_file1, input_file2, output_file, offset):
+ with open(output_file, 'r+b' if os.path.exists(output_file) else 'wb') as outfile:
+ # Merge input_file1 at offset 0
+ with open(input_file1, 'rb') as infile1:
+ outfile.seek(0)
+ data1 = infile1.read()
+ outfile.write(data1)
+ print(f"Merged {len(data1)} bytes from {input_file1} into {output_file} at offset 0")
+
+ # Fill gaps with 0xFF if necessary
+ current_size = outfile.tell()
+ if current_size < offset:
+ gap_size = offset - current_size
+ outfile.write(bytearray([0xFF] * gap_size))
+ print(f"Filled gap of {gap_size} bytes with 0xFF in {output_file} to reach offset {offset}")
+
+ # Merge input_file2 at the specified offset
+ with open(input_file2, 'rb') as infile2:
+ outfile.seek(offset)
+ data2 = infile2.read()
+ outfile.write(data2)
+ print(f"Merged {len(data2)} bytes from {input_file2} into {output_file} at offset {offset}")
+
+
+# Obtain build configuration
+build_conf = BuildConfiguration(os.path.join(os.getcwd(), os.pardir))
+
+# Clean up merged.bin from previous build
+if os.path.exists('merged.bin'):
+ os.remove('merged.bin')
+
+# Telink W91 dual-core SoC binary operations
+if build_conf.getboolean('CONFIG_SOC_SERIES_RISCV_TELINK_W91'):
+ n22_partition_offset = build_conf['CONFIG_TELINK_W91_N22_PARTITION_ADDR']
+ if build_conf.getboolean('CONFIG_BOOTLOADER_MCUBOOT'):
+ n22_partition_offset -= build_conf['CONFIG_FLASH_LOAD_OFFSET']
+
+ # Merge N22 core binary
+ merge_binaries('zephyr.bin', 'n22.bin', 'merged.bin', n22_partition_offset)
+
+ # Sign the image if MCUBoot is used
+ if build_conf.getboolean('CONFIG_BOOTLOADER_MCUBOOT'):
+ sign_command = [
+ 'python3',
+ os.path.join(ZEPHYR_BASE, '../bootloader/mcuboot/scripts/imgtool.py'),
+ 'sign',
+ '--version', '0.0.0+0',
+ '--align', '1',
+ '--header-size', str(build_conf['CONFIG_ROM_START_OFFSET']),
+ '--slot-size', str(build_conf['CONFIG_FLASH_LOAD_SIZE']),
+ '--key', os.path.join(ZEPHYR_BASE, '../', build_conf['CONFIG_MCUBOOT_SIGNATURE_KEY_FILE']),
+ 'merged.bin',
+ 'zephyr.signed.bin'
+ ]
+ try:
+ subprocess.run(sign_command, check=True)
+ os.remove('merged.bin') # Clean up merged.bin after signing
+ except subprocess.CalledProcessError as e:
+ raise RuntimeError(f"Error signing the image: {e}")
+
+# Merge MCUBoot binary if configured
+if build_conf.getboolean('CONFIG_BOOTLOADER_MCUBOOT'):
+ merge_binaries('mcuboot.bin', 'zephyr.signed.bin', 'merged.bin', build_conf['CONFIG_FLASH_LOAD_OFFSET'])
+
+# Merge Factory Data binary if configured
+if build_conf.getboolean('CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE'):
+ if os.path.exists('merged.bin'):
+ merge_binaries('merged.bin', 'factory/factory_data.bin', 'merged.bin',
+ build_conf['CONFIG_TELINK_FACTORY_DATA_PARTITION_ADDR'])
+ else:
+ # Initialize merged.bin with zephyr.bin since no base binary was created
+ merge_binaries('zephyr.bin', 'factory/factory_data.bin', 'merged.bin',
+ build_conf['CONFIG_TELINK_FACTORY_DATA_PARTITION_ADDR'])
+
+# Check if merged.bin was created by any enabled feature, otherwise symlink zephyr.bin
+if not os.path.exists('merged.bin'):
+ os.symlink('zephyr.bin', 'merged.bin')
diff --git a/src/platform/telink/telink-mbedtls-config.h b/src/platform/telink/telink-mbedtls-config.h
index 921255d..c9a79ee 100644
--- a/src/platform/telink/telink-mbedtls-config.h
+++ b/src/platform/telink/telink-mbedtls-config.h
@@ -1,6 +1,6 @@
/*
*
- * Copyright (c) 2022 Project CHIP Authors
+ * Copyright (c) 2022-2024 Project CHIP Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -37,11 +37,6 @@
#define MBEDTLS_X509_CREATE_C
#define MBEDTLS_X509_CSR_WRITE_C
-#ifdef CONFIG_TELINK_B9X_MBEDTLS_HW_ACCELERATION
-#define MBEDTLS_AES_ALT
-#define MBEDTLS_ECP_ALT
-#endif
-
#undef MBEDTLS_ERROR_C
#endif /* MBEDTLS_TSLR9_CONF_H */
diff --git a/src/platform/telink/tlsr9118bdk40d.overlay b/src/platform/telink/tlsr9118bdk40d.overlay
deleted file mode 100644
index 3c44668..0000000
--- a/src/platform/telink/tlsr9118bdk40d.overlay
+++ /dev/null
@@ -1,39 +0,0 @@
-/ {
- /* Short TL_Key1 (J20 pin 11) to ground (J20 pin 25-35) */
- key_pool {
- compatible = "gpio-keys";
-
- inp {
- gpios = <&gpio0 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
- <&gpio0 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
- };
- };
-
- key_matrix {
- compatible = "gpio-keys";
-
- col {
- gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>,
- <&gpio0 17 GPIO_ACTIVE_HIGH>;
- };
-
- row {
- gpios = <&gpio0 16 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>,
- <&gpio0 15 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
- };
- };
-
- led_pool{
- compatible = "gpio-leds";
-
- out {
- gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
- };
- };
- pwm_pool {
- compatible = "pwm-leds";
- out {
- pwms = <&pwm0 4 PWM_MSEC(1) PWM_POLARITY_NORMAL>;
- };
- };
-};
\ No newline at end of file
diff --git a/src/platform/telink/tlsr9118bdk40d_3m_flash.overlay b/src/platform/telink/tlsr9118bdk40d_3m_flash.overlay
deleted file mode 100644
index 02cd3b6..0000000
--- a/src/platform/telink/tlsr9118bdk40d_3m_flash.overlay
+++ /dev/null
@@ -1,36 +0,0 @@
-&flash {
- reg = <0x80000000 0x300000>;
-
- partitions {
- /delete-node/ partition@0;
- /delete-node/ partition@20000;
- /delete-node/ partition@88000;
- /delete-node/ partition@f0000;
- /delete-node/ partition@f4000;
- /delete-node/ partition@fe000;
- boot_partition: partition@0 {
- label = "mcuboot";
- reg = <0x00000000 0x20000>;
- };
- slot0_partition: partition@20000 {
- label = "image-0";
- reg = <0x20000 0xe8000>;
- };
- factory_partition: partition@108000 {
- label = "factory-data";
- reg = <0x108000 0x1000>;
- };
- storage_partition: partition@109000 {
- label = "storage";
- reg = <0x109000 0xf000>;
- };
- slot1_partition: partition@118000 {
- label = "image-1";
- reg = <0x118000 0xe8000>;
- };
- vendor_partition: partition@200000 {
- label = "vendor-data";
- reg = <0x200000 0x100000>;
- };
- };
-};
diff --git a/src/platform/telink/tlsr9118bdk40d_4m_flash.overlay b/src/platform/telink/tlsr9118bdk40d_4m_flash.overlay
new file mode 100644
index 0000000..536872d
--- /dev/null
+++ b/src/platform/telink/tlsr9118bdk40d_4m_flash.overlay
@@ -0,0 +1,39 @@
+&flash {
+ reg = <0x80000000 0x400000>;
+
+ /delete-node/ partitions;
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ boot_partition: partition@0 {
+ label = "mcuboot";
+ reg = <0x00000000 0x20000>;
+ };
+ slot0_partition: partition@20000 {
+ label = "image-0";
+ reg = <0x20000 0x1e7000>; // End address should be same as for n22_partition
+ };
+ n22_partition: partition@140000 { // Don't change n22_partition
+ label = "image-n22";
+ reg = <0x140000 0xc7000>;
+ };
+ factory_partition: partition@207000 {
+ label = "factory-data";
+ reg = <0x207000 0x1000>;
+ };
+ storage_partition: partition@208000 {
+ label = "storage";
+ reg = <0x208000 0xf000>;
+ };
+ slot1_partition: partition@217000 {
+ label = "image-1";
+ reg = <0x217000 0x1e7000>;
+ };
+ vendor_partition: partition@3fe000 {
+ label = "vendor-data";
+ reg = <0x3fe000 0x2000>;
+ };
+ };
+};
diff --git a/src/platform/telink/tlsr9258a_2m_flash.overlay b/src/platform/telink/tlsr9258a_2m_flash.overlay
index a87ebba..bdfc0a4 100644
--- a/src/platform/telink/tlsr9258a_2m_flash.overlay
+++ b/src/platform/telink/tlsr9258a_2m_flash.overlay
@@ -1,13 +1,12 @@
&flash {
reg = <0x20000000 0x200000>;
+ /delete-node/ partitions;
partitions {
- /delete-node/ partition@0;
- /delete-node/ partition@20000;
- /delete-node/ partition@88000;
- /delete-node/ partition@f0000;
- /delete-node/ partition@f4000;
- /delete-node/ partition@fe000;
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 0x13000>;
diff --git a/src/platform/telink/tlsr9518adk80d_1m_flash.overlay b/src/platform/telink/tlsr9518adk80d_1m_flash.overlay
index 3bbd690..ba55da3 100644
--- a/src/platform/telink/tlsr9518adk80d_1m_flash.overlay
+++ b/src/platform/telink/tlsr9518adk80d_1m_flash.overlay
@@ -1,13 +1,12 @@
&flash {
reg = <0x20000000 0x100000>;
+ /delete-node/ partitions;
partitions {
- /delete-node/ partition@0;
- /delete-node/ partition@20000;
- /delete-node/ partition@88000;
- /delete-node/ partition@f0000;
- /delete-node/ partition@f4000;
- /delete-node/ partition@fe000;
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 0x19000>;
diff --git a/src/platform/telink/tlsr9518adk80d_2m_flash.overlay b/src/platform/telink/tlsr9518adk80d_2m_flash.overlay
index 1d54c86..4fd5fd1 100644
--- a/src/platform/telink/tlsr9518adk80d_2m_flash.overlay
+++ b/src/platform/telink/tlsr9518adk80d_2m_flash.overlay
@@ -1,13 +1,12 @@
&flash {
reg = <0x20000000 0x200000>;
+ /delete-node/ partitions;
partitions {
- /delete-node/ partition@0;
- /delete-node/ partition@20000;
- /delete-node/ partition@88000;
- /delete-node/ partition@f0000;
- /delete-node/ partition@f4000;
- /delete-node/ partition@fe000;
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 0x19000>;
diff --git a/src/platform/telink/tlsr9518adk80d_4m_flash.overlay b/src/platform/telink/tlsr9518adk80d_4m_flash.overlay
index 77d5bac..3df4e7a 100644
--- a/src/platform/telink/tlsr9518adk80d_4m_flash.overlay
+++ b/src/platform/telink/tlsr9518adk80d_4m_flash.overlay
@@ -1,13 +1,12 @@
&flash {
reg = <0x20000000 0x400000>;
+ /delete-node/ partitions;
partitions {
- /delete-node/ partition@0;
- /delete-node/ partition@20000;
- /delete-node/ partition@88000;
- /delete-node/ partition@f0000;
- /delete-node/ partition@f4000;
- /delete-node/ partition@fe000;
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 0x19000>;
diff --git a/src/platform/telink/tlsr9528a_2m_flash.overlay b/src/platform/telink/tlsr9528a_2m_flash.overlay
index 98bc72b..35d72af 100644
--- a/src/platform/telink/tlsr9528a_2m_flash.overlay
+++ b/src/platform/telink/tlsr9528a_2m_flash.overlay
@@ -1,13 +1,12 @@
&flash {
reg = <0x20000000 0x200000>;
+ /delete-node/ partitions;
partitions {
- /delete-node/ partition@0;
- /delete-node/ partition@20000;
- /delete-node/ partition@88000;
- /delete-node/ partition@f0000;
- /delete-node/ partition@f4000;
- /delete-node/ partition@fe000;
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 0x13000>;
diff --git a/src/platform/telink/tlsr9528a_4m_flash.overlay b/src/platform/telink/tlsr9528a_4m_flash.overlay
index ec88c57..9ab2890 100644
--- a/src/platform/telink/tlsr9528a_4m_flash.overlay
+++ b/src/platform/telink/tlsr9528a_4m_flash.overlay
@@ -1,13 +1,12 @@
&flash {
reg = <0x20000000 0x400000>;
+ /delete-node/ partitions;
partitions {
- /delete-node/ partition@0;
- /delete-node/ partition@20000;
- /delete-node/ partition@88000;
- /delete-node/ partition@f0000;
- /delete-node/ partition@f4000;
- /delete-node/ partition@fe000;
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 0x13000>;
@@ -26,23 +25,23 @@
};
dac_keypair_partition: partition@3f6000 {
label = "dac-keypair";
- reg = <0x3f6000 0x1000>; //store dac and key pair.
+ reg = <0x3f6000 0x1000>; // store dac and key pair.
};
factory_partition: partition@3f7000 {
label = "factory-data";
- reg = <0x3f7000 0x1000>; // factory data info
+ reg = <0x3f7000 0x1000>; // factory data info.
};
secure_partition: partition@3f8000 {
label = "secure";
- reg = <0x3f8000 0x4000>; //secure info ,reserved for secure boot .if not use , can be used by other way .
+ reg = <0x3f8000 0x4000>; // secure info, reserved for secure boot. if not use, can be used by other way.
};
vendor_rfu_partition: partition@3fc000 {
label = "vendor-rfu";
- reg = <0x3fc000 0x2000>;// reserved for chip extend.
+ reg = <0x3fc000 0x2000>; // reserved for chip extend.
};
vendor_partition: partition@3fe000 {
label = "vendor-data";
- reg = <0x3fe000 0x2000>;// mac and adc info.
+ reg = <0x3fe000 0x2000>; // mac and adc info.
};
};
};