From 8fe45964a2fdf881e0dfea99a431f499980c0263 Mon Sep 17 00:00:00 2001 From: Alex Tsitsiura Date: Tue, 19 Nov 2024 13:26:35 +0200 Subject: [PATCH] [Telink] Add tl3218x board support & Update builds to docker version 92 (#36409) * [Telink] Add TL3218X sceleton * [Telink] Disable temporarry BLE * [Telink] save ram by change config & revert add retention board * riscv: telink:tl3218x: clean code and fix CI. - fix CI error. - clean code and improve settings. - delete retention setting for TL321X. Signed-off-by: Haiwen Xia * [Telink] Revert add retention board --------- Signed-off-by: Haiwen Xia Co-authored-by: Alex Tsitsiura * riscv: telink:tl3218x: add ble optimize. - add optimize for ble. - low down the ramcost. - revert nvs cache to pass certify. Signed-off-by: Haiwen Xia * [Telink] Add LZMA compression support for TL321x platform Signed-off-by: Jinmiao Yu * [Telink] Use LZMA by default for tl321x * [Telink] CI build tests * Restyled by clang-format * [Telink] Update Config B9X_BLE_ to TL_BLE_ Signed-off-by: Damien Ji * [Telink] update zephyr revision for CI build tests Signed-off-by: Damien Ji * [Telink] update zephyr revision for CI build tests Signed-off-by: Damien Ji * [Telink] Cleanup overlays * [Telink] update zephyr revision for CI build tests Signed-off-by: Damien Ji * [Telink] Increase ISR and CHIP stack sizes to avoid 90%+ usage * [Telink] Update builds to docker version 92 --------- Signed-off-by: Haiwen Xia Signed-off-by: Jinmiao Yu Signed-off-by: Damien Ji Co-authored-by: haiwentelink <125550736+haiwentelink@users.noreply.github.com> Co-authored-by: Haiwen Xia Co-authored-by: Jinmiao Yu Co-authored-by: Restyled.io Co-authored-by: Damien Ji --- .github/workflows/bloat_check.yaml | 2 +- .github/workflows/build.yaml | 10 +-- .github/workflows/chef.yaml | 10 +-- .github/workflows/doxygen.yaml | 2 +- .github/workflows/examples-ameba.yaml | 2 +- .github/workflows/examples-asr.yaml | 2 +- .github/workflows/examples-bouffalolab.yaml | 2 +- .github/workflows/examples-cc13xx_26xx.yaml | 2 +- .github/workflows/examples-cc32xx.yaml | 2 +- .github/workflows/examples-efr32.yaml | 2 +- .github/workflows/examples-esp32.yaml | 4 +- .github/workflows/examples-infineon.yaml | 2 +- .github/workflows/examples-linux-arm.yaml | 2 +- .github/workflows/examples-linux-imx.yaml | 2 +- .../workflows/examples-linux-standalone.yaml | 2 +- .../examples-linux-tv-casting-app.yaml | 2 +- .github/workflows/examples-mw320.yaml | 2 +- .github/workflows/examples-nrfconnect.yaml | 2 +- .github/workflows/examples-nuttx.yaml | 2 +- .github/workflows/examples-nxp.yaml | 4 +- .github/workflows/examples-openiotsdk.yaml | 2 +- .github/workflows/examples-qpg.yaml | 2 +- .github/workflows/examples-stm32.yaml | 2 +- .github/workflows/examples-telink.yaml | 17 ++++- .github/workflows/examples-tizen.yaml | 2 +- .github/workflows/full-android.yaml | 2 +- .github/workflows/fuzzing-build.yaml | 2 +- .github/workflows/java-tests.yaml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/minimal-build.yaml | 4 +- .github/workflows/qemu.yaml | 4 +- .github/workflows/release_artifacts.yaml | 4 +- .github/workflows/smoketest-android.yaml | 2 +- .github/workflows/tests.yaml | 4 +- .github/workflows/unit_integration_test.yaml | 2 +- .github/workflows/zap_regeneration.yaml | 2 +- .github/workflows/zap_templates.yaml | 2 +- config/telink/chip-module/CMakeLists.txt | 2 +- config/telink/chip-module/Kconfig | 3 +- config/telink/chip-module/Kconfig.defaults | 67 ++++++++++++++----- examples/all-clusters-app/ameba/README.md | 4 +- .../all-clusters-minimal-app/ameba/README.md | 4 +- examples/fabric-admin/README.md | 4 +- examples/fabric-bridge-app/linux/README.md | 4 +- examples/fabric-sync/README.md | 4 +- examples/light-switch-app/ameba/README.md | 4 +- examples/lighting-app/ameba/README.md | 4 +- examples/ota-requestor-app/ameba/README.md | 4 +- examples/pigweed-app/ameba/README.md | 4 +- examples/platform/telink/common.cmake | 2 +- .../telink/project_include/OpenThreadConfig.h | 7 +- integrations/cloudbuild/chef.yaml | 8 +-- integrations/cloudbuild/smoke-test.yaml | 14 ++-- scripts/build/build/targets.py | 1 + scripts/build/builders/telink.py | 3 + .../build/testdata/all_targets_linux_x64.txt | 2 +- .../telink/CHIPDevicePlatformConfig.h | 6 ++ src/platform/telink/CHIPPlatformConfig.h | 16 ++++- src/platform/telink/SystemPlatformConfig.h | 9 ++- src/platform/telink/tl3218x.overlay | 61 +++++++++++++++++ src/platform/telink/tl3218x_2m_flash.overlay | 39 +++++++++++ 61 files changed, 288 insertions(+), 105 deletions(-) create mode 100644 src/platform/telink/tl3218x.overlay create mode 100644 src/platform/telink/tl3218x_2m_flash.overlay diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml index 43a3993eee6a91..465526ea8799e4 100644 --- a/.github/workflows/bloat_check.yaml +++ b/.github/workflows/bloat_check.yaml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:90 + image: ghcr.io/project-chip/chip-build:92 steps: - name: Checkout diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 92acd73acef165..4d16657b353871 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -43,7 +43,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:90 + image: ghcr.io/project-chip/chip-build:92 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -139,7 +139,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:90 + image: ghcr.io/project-chip/chip-build:92 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -308,7 +308,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:90 + image: ghcr.io/project-chip/chip-build:92 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -371,7 +371,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:90 + image: ghcr.io/project-chip/chip-build:92 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -490,7 +490,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:90 + image: ghcr.io/project-chip/chip-build:92 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index d7360f6cc4876d..d2298bbca33ca0 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:90 + image: ghcr.io/project-chip/chip-build:92 options: --user root steps: @@ -57,7 +57,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:90 + image: ghcr.io/project-chip/chip-build-esp32:92 options: --user root steps: @@ -78,7 +78,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nrf-platform:90 + image: ghcr.io/project-chip/chip-build-nrf-platform:92 options: --user root steps: @@ -99,7 +99,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-telink:90 + image: ghcr.io/project-chip/chip-build-telink:92 options: --user root steps: @@ -111,7 +111,7 @@ jobs: 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 f762f1a1027284e63e338e6d83deeade62f355b0" + # run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py 9ab2325bf76bc7bec92a3ff93fad80ec5d3eae7c" - name: CI Examples Telink shell: bash run: | diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml index e345ff2a75a70e..4af7b3d8ed8eb2 100644 --- a/.github/workflows/doxygen.yaml +++ b/.github/workflows/doxygen.yaml @@ -84,7 +84,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-doxygen:90 + image: ghcr.io/project-chip/chip-build-doxygen:92 if: github.actor != 'restyled-io[bot]' diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index a4b40a19339507..92ee46b49dbf74 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ameba:90 + image: ghcr.io/project-chip/chip-build-ameba:92 options: --user root steps: diff --git a/.github/workflows/examples-asr.yaml b/.github/workflows/examples-asr.yaml index 143ce3364fafad..ce4fef94fde653 100644 --- a/.github/workflows/examples-asr.yaml +++ b/.github/workflows/examples-asr.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-asr:90 + image: ghcr.io/project-chip/chip-build-asr:92 options: --user root steps: diff --git a/.github/workflows/examples-bouffalolab.yaml b/.github/workflows/examples-bouffalolab.yaml index 2e9cf4a8849edd..ed6e583285ebd0 100644 --- a/.github/workflows/examples-bouffalolab.yaml +++ b/.github/workflows/examples-bouffalolab.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-bouffalolab:90 + image: ghcr.io/project-chip/chip-build-bouffalolab:92 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 097a7d103eac95..68f5ecf09f7c9b 100644 --- a/.github/workflows/examples-cc13xx_26xx.yaml +++ b/.github/workflows/examples-cc13xx_26xx.yaml @@ -42,7 +42,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ti:90 + image: ghcr.io/project-chip/chip-build-ti:92 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-cc32xx.yaml b/.github/workflows/examples-cc32xx.yaml index 25afa79903f12d..935c5df723dea6 100644 --- a/.github/workflows/examples-cc32xx.yaml +++ b/.github/workflows/examples-cc32xx.yaml @@ -41,7 +41,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ti:90 + image: ghcr.io/project-chip/chip-build-ti:92 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index dd9fb120a365b2..1b970abf6a52af 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -41,7 +41,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-efr32:90 + image: ghcr.io/project-chip/chip-build-efr32:92 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 9853c0df51885d..ba90be6082c868 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:90 + image: ghcr.io/project-chip/chip-build-esp32:92 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -124,7 +124,7 @@ jobs: if: github.actor != 'restyled-io[bot]' && github.repository_owner == 'espressif' container: - image: ghcr.io/project-chip/chip-build-esp32:90 + image: ghcr.io/project-chip/chip-build-esp32:92 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index 49c2097cd696e8..165d9015fa5570 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-infineon:90 + image: ghcr.io/project-chip/chip-build-infineon:92 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 46c2173530c6be..5815d1d1d35cda 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-crosscompile:90 + image: ghcr.io/project-chip/chip-build-crosscompile:92 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml index e1d64f7a058f1e..69d832282a4fcb 100644 --- a/.github/workflows/examples-linux-imx.yaml +++ b/.github/workflows/examples-linux-imx.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-imx:90 + image: ghcr.io/project-chip/chip-build-imx:92 steps: - name: Checkout diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index 8c483cacd45651..5c1fbcbdf67dfb 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:90 + image: ghcr.io/project-chip/chip-build:92 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 14bfb6fb91b17c..8480509c00fcfc 100644 --- a/.github/workflows/examples-linux-tv-casting-app.yaml +++ b/.github/workflows/examples-linux-tv-casting-app.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:90 + image: ghcr.io/project-chip/chip-build:92 steps: - name: Checkout diff --git a/.github/workflows/examples-mw320.yaml b/.github/workflows/examples-mw320.yaml index 077bdbbfb7f2b6..65a23f6b1ac509 100644 --- a/.github/workflows/examples-mw320.yaml +++ b/.github/workflows/examples-mw320.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:90 + image: ghcr.io/project-chip/chip-build:92 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index 0db5e82e81d8e4..bc8fbde4da0be1 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nrf-platform:90 + image: ghcr.io/project-chip/chip-build-nrf-platform:92 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-nuttx.yaml b/.github/workflows/examples-nuttx.yaml index cccfa44557a4ba..e9b214f3e48868 100644 --- a/.github/workflows/examples-nuttx.yaml +++ b/.github/workflows/examples-nuttx.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nuttx:90 + image: ghcr.io/project-chip/chip-build-nuttx:92 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-nxp.yaml b/.github/workflows/examples-nxp.yaml index aa782544d2ae1d..9348baa83350db 100644 --- a/.github/workflows/examples-nxp.yaml +++ b/.github/workflows/examples-nxp.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nxp:90 + image: ghcr.io/project-chip/chip-build-nxp:92 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: @@ -240,7 +240,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nxp-zephyr:90 + image: ghcr.io/project-chip/chip-build-nxp-zephyr:92 steps: - name: Checkout diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml index 2d59643eeb3aac..4ff65c0c941a14 100644 --- a/.github/workflows/examples-openiotsdk.yaml +++ b/.github/workflows/examples-openiotsdk.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-openiotsdk:90 + image: ghcr.io/project-chip/chip-build-openiotsdk:92 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" options: --privileged diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index 3287b281dc77ef..64f66788182b7b 100644 --- a/.github/workflows/examples-qpg.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:90 + image: ghcr.io/project-chip/chip-build:92 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-stm32.yaml b/.github/workflows/examples-stm32.yaml index d10c91a8e8ca6d..dad94e5267993b 100644 --- a/.github/workflows/examples-stm32.yaml +++ b/.github/workflows/examples-stm32.yaml @@ -41,7 +41,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:90 + image: ghcr.io/project-chip/chip-build:92 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index 6c8b9bd5217f32..c24b8f5565bb24 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-telink:90 + image: ghcr.io/project-chip/chip-build-telink:92 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -58,7 +58,7 @@ jobs: 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 f762f1a1027284e63e338e6d83deeade62f355b0" + # run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py 9ab2325bf76bc7bec92a3ff93fad80ec5d3eae7c" - name: Build example Telink (B92 retention) Air Quality Sensor App # Run test for master and s07641069 PRs @@ -167,6 +167,19 @@ jobs: - name: clean out build output (keep tools) run: rm -rf ./out/telink* + - name: Build example Telink (tl321x) Lighting App with OTA (LZMA), Shell, Factory Data + # Run test for master and all PRs + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target 'telink-tl3218x-light-ota-compress-lzma-shell-factory-data' build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + telink tl3218x light-app-ota-compress-lzma-shell-factory-data \ + out/telink-tl3218x-light-ota-compress-lzma-shell-factory-data/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + + - name: clean out build output (keep tools) + run: rm -rf ./out/telink* + - name: Build example Telink (B92) Light Switch App with OTA (LZMA), Shell, Factory Data # Run test for master and all PRs run: | diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index f465f3999f0f26..a16ad58ee06583 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-tizen:90 + image: ghcr.io/project-chip/chip-build-tizen:92 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 6acc150c03a111..a020b78d7455b3 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-android:90 + image: ghcr.io/project-chip/chip-build-android:92 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml index f36b370448fa66..97da04937e0648 100644 --- a/.github/workflows/fuzzing-build.yaml +++ b/.github/workflows/fuzzing-build.yaml @@ -33,7 +33,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:90 + image: ghcr.io/project-chip/chip-build:92 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/java-tests.yaml b/.github/workflows/java-tests.yaml index f416be3a4d2998..114f406f906e22 100644 --- a/.github/workflows/java-tests.yaml +++ b/.github/workflows/java-tests.yaml @@ -43,7 +43,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-java:90 + image: ghcr.io/project-chip/chip-build-java:92 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 590a2595ee6f96..9273dbe9912ae6 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:90 + image: ghcr.io/project-chip/chip-build:92 steps: - name: Checkout diff --git a/.github/workflows/minimal-build.yaml b/.github/workflows/minimal-build.yaml index da55158cc7c57f..682cf3de208528 100644 --- a/.github/workflows/minimal-build.yaml +++ b/.github/workflows/minimal-build.yaml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-minimal:90 + image: ghcr.io/project-chip/chip-build-minimal:92 steps: - name: Checkout @@ -56,7 +56,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-minimal:90 + image: ghcr.io/project-chip/chip-build-minimal:92 steps: - name: Checkout diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index 07b31eec0ddb11..187d4b8f0c6091 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -41,7 +41,7 @@ jobs: if: github.actor != 'restyled-io[bot]' && github.repository_owner == 'espressif' container: - image: ghcr.io/project-chip/chip-build-esp32-qemu:90 + image: ghcr.io/project-chip/chip-build-esp32-qemu:92 volumes: - "/tmp/log_output:/tmp/test_logs" @@ -79,7 +79,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-tizen-qemu:90 + image: ghcr.io/project-chip/chip-build-tizen-qemu:92 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 14b2c327452194..a50d5260b52107 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-esp32:90 + image: ghcr.io/project-chip/chip-build-esp32:92 steps: - name: Checkout @@ -64,7 +64,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-efr32:90 + image: ghcr.io/project-chip/chip-build-efr32:92 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/smoketest-android.yaml b/.github/workflows/smoketest-android.yaml index 38a614e71246f5..c3293e8eb947cd 100644 --- a/.github/workflows/smoketest-android.yaml +++ b/.github/workflows/smoketest-android.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-android:90 + image: ghcr.io/project-chip/chip-build-android:92 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 9a31e56ca8ef54..384ebc59a93c1c 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -50,7 +50,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:90 + image: ghcr.io/project-chip/chip-build:92 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" @@ -457,7 +457,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:90 + image: ghcr.io/project-chip/chip-build:92 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 b2fc345bda1a9d..9b97c8d54e0ea2 100644 --- a/.github/workflows/unit_integration_test.yaml +++ b/.github/workflows/unit_integration_test.yaml @@ -40,7 +40,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:90 + image: ghcr.io/project-chip/chip-build:92 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 0d6d9b6db70ca8..649b867ba5ac0e 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: ghcr.io/project-chip/chip-build:90 + image: ghcr.io/project-chip/chip-build:92 defaults: run: shell: sh diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml index c4edd57421ba6f..07f1bc4f2f51d0 100644 --- a/.github/workflows/zap_templates.yaml +++ b/.github/workflows/zap_templates.yaml @@ -35,7 +35,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: ghcr.io/project-chip/chip-build:90 + image: ghcr.io/project-chip/chip-build:92 defaults: run: shell: sh diff --git a/config/telink/chip-module/CMakeLists.txt b/config/telink/chip-module/CMakeLists.txt index ade2bd310f8a02..0f925cdeffc904 100644 --- a/config/telink/chip-module/CMakeLists.txt +++ b/config/telink/chip-module/CMakeLists.txt @@ -174,7 +174,7 @@ 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) +if (CONFIG_BOOTLOADER_MCUBOOT AND (CONFIG_SOC_SERIES_RISCV_TELINK_B9X OR CONFIG_SOC_SERIES_RISCV_TELINK_TLX)) add_custom_target(build_mcuboot ALL COMMAND west build -b ${BASE_BOARD} -d build_mcuboot ${ZEPHYR_BASE}/../bootloader/mcuboot/boot/zephyr diff --git a/config/telink/chip-module/Kconfig b/config/telink/chip-module/Kconfig index b06c7c855922d8..2937b2b0c66094 100644 --- a/config/telink/chip-module/Kconfig +++ b/config/telink/chip-module/Kconfig @@ -246,7 +246,8 @@ config CHIP_ENABLE_POWER_ON_FACTORY_RESET config CHIP_TASK_STACK_SIZE int - default 4864 if PM + default 6192 if SOC_RISCV_TELINK_TL321X + default 5352 if PM default 8192 config CHIP_USE_MARS_SENSOR diff --git a/config/telink/chip-module/Kconfig.defaults b/config/telink/chip-module/Kconfig.defaults index bb722e8a3ab8bc..c220b5991f486a 100644 --- a/config/telink/chip-module/Kconfig.defaults +++ b/config/telink/chip-module/Kconfig.defaults @@ -34,6 +34,7 @@ choice LOG_MODE endchoice choice MATTER_LOG_LEVEL_CHOICE + default MATTER_LOG_LEVEL_WRN if SOC_RISCV_TELINK_TL321X default MATTER_LOG_LEVEL_DBG endchoice @@ -61,17 +62,19 @@ config POSIX_MAX_FDS # Application stack size config MAIN_STACK_SIZE - default 3240 if PM + default 3240 if PM || SOC_RISCV_TELINK_TL321X default 4096 config INIT_STACKS default y config IDLE_STACK_SIZE - default 512 if PM + default 512 if PM || SOC_RISCV_TELINK_TL321X + config ISR_STACK_SIZE default 576 if PM + default 528 if SOC_RISCV_TELINK_TL321X config SYSTEM_WORKQUEUE_STACK_SIZE default 616 if PM @@ -79,7 +82,8 @@ config SYSTEM_WORKQUEUE_STACK_SIZE config HEAP_MEM_POOL_SIZE default 256 -config COMMON_LIBC_MALLOC_ARENA_SIZE +config COMMON_LIBC_MALLOC_ARENA_SIZE + default 20716 if SOC_RISCV_TELINK_TL321X default 12288 config NET_IPV6_MLD @@ -92,19 +96,21 @@ config NET_IF_MCAST_IPV6_ADDR_COUNT # Network buffers config NET_PKT_RX_COUNT - default 4 if PM + default 4 if PM || SOC_RISCV_TELINK_TL321X default 8 config NET_PKT_TX_COUNT - default 4 if PM + default 4 if PM || SOC_RISCV_TELINK_TL321X default 8 config NET_BUF_RX_COUNT default 16 if PM + default 12 if SOC_RISCV_TELINK_TL321X default 32 config NET_BUF_TX_COUNT default 16 if PM + default 12 if SOC_RISCV_TELINK_TL321X default 32 config GPIO @@ -133,44 +139,71 @@ config BT_MAX_CONN default 1 config BT_L2CAP_TX_MTU + default 103 if SOC_RISCV_TELINK_TL321X default 247 config BT_BUF_ACL_RX_SIZE + default 107 if SOC_RISCV_TELINK_TL321X default 251 config BT_BUF_ACL_TX_SIZE + default 107 if SOC_RISCV_TELINK_TL321X default 251 + +#ifdef CONFIG_SOC_RISCV_TELINK_TL321X + +config BT_BUF_EVT_RX_COUNT + default 4 + +config BT_BUF_ACL_RX_COUNT + default 4 + +config BT_GATT_CACHING + bool + default n + + +#endif + config BT_RX_STACK_SIZE default 1352 if BT_B9X + default 1010 if BT_TLX default 2048 if BT_W91 config BT_HCI_TX_STACK_SIZE default 640 if BT_B9X + default 640 if BT_TLX default 2048 if BT_W91 config BT_DEVICE_NAME_GATT_WRITABLE bool default n -config B9X_BLE_CTRL_THREAD_STACK_SIZE +if SOC_SERIES_RISCV_TELINK_B9X || SOC_SERIES_RISCV_TELINK_TLX + +config TL_BLE_CTRL_THREAD_STACK_SIZE default 648 -config B9X_BLE_CTRL_MASTER_MAX_NUM +config TL_BLE_CTRL_MASTER_MAX_NUM default 0 -config B9X_BLE_CTRL_SLAVE_MAX_NUM +config TL_BLE_CTRL_SLAVE_MAX_NUM default 1 -config B9X_BLE_CTRL_RF_POWER +config TL_BLE_CTRL_RF_POWER default 3 if PM + default 8 if BT_TLX default 9 -choice B9X_BLE_CTRL_MAC_TYPE - default B9X_BLE_CTRL_MAC_TYPE_RANDOM_STATIC +choice TL_BLE_CTRL_MAC_TYPE + default TL_BLE_CTRL_MAC_TYPE_RANDOM_STATIC endchoice -endif +endif # SOC_SERIES_RISCV_TELINK_B9X || SOC_SERIES_RISCV_TELINK_TLX + + +endif # BT # Board retention config if BOARD_TLSR9528A_RETENTION || BOARD_TLSR9258A_RETENTION || BOARD_TLSR9518ADK80D_RETENTION @@ -182,11 +215,12 @@ config TELINK_B9X_MATTER_RETENTION_LAYOUT config PWM default n + endif # Board non-retention config if BOARD_TLSR9118BDK40D || BOARD_TLSR9118BDK40D_V1 || \ - BOARD_TLSR9528A || BOARD_TLSR9258A || BOARD_TLSR9518ADK80D + BOARD_TLSR9528A || BOARD_TLSR9258A || BOARD_TLSR9518ADK80D || BOARD_TL3218X config PWM default y endif @@ -222,6 +256,7 @@ config NVS_LOOKUP_CACHE default y config NVS_LOOKUP_CACHE_SIZE + default 400 if SOC_RISCV_TELINK_TL321X default 2048 if !PM # Set multiplicator of Name Value Storage (NVS) as 1 to reach NVS sector size 4KB @@ -261,7 +296,7 @@ config CHIP_ENABLE_ICD_SUPPORT default y if CHIP_THREAD_DEVICE_ROLE_SLEEPY_END_DEVICE config OPENTHREAD_THREAD_STACK_SIZE - default 2400 if PM + default 2400 if PM || SOC_RISCV_TELINK_TL321X config OPENTHREAD_RADIO_WORKQUEUE_STACK_SIZE default 432 if PM @@ -284,10 +319,10 @@ config OPENTHREAD_IP6_MAX_EXT_MCAST_ADDRS endif # NET_L2_OPENTHREAD config NET_TX_STACK_SIZE - default 554 if PM + default 554 if PM || SOC_RISCV_TELINK_TL321X config NET_RX_STACK_SIZE - default 554 if PM + default 554 if PM || SOC_RISCV_TELINK_TL321X # Disable certain parts of Zephyr IPv6 stack config NET_IPV6_NBR_CACHE diff --git a/examples/all-clusters-app/ameba/README.md b/examples/all-clusters-app/ameba/README.md index 5cf2c9aab87015..53b4b6ce87db0e 100644 --- a/examples/all-clusters-app/ameba/README.md +++ b/examples/all-clusters-app/ameba/README.md @@ -27,11 +27,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:90 + $ docker pull ghcr.io/project-chip/chip-build-ameba:92 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:90 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:92 - Setup build environment: diff --git a/examples/all-clusters-minimal-app/ameba/README.md b/examples/all-clusters-minimal-app/ameba/README.md index 447d950be39f86..f50cfee5e474cc 100644 --- a/examples/all-clusters-minimal-app/ameba/README.md +++ b/examples/all-clusters-minimal-app/ameba/README.md @@ -27,13 +27,13 @@ The CHIP demo application is supported on - Pull docker image: ``` - $ docker pull ghcr.io/project-chip/chip-build-ameba:90 + $ docker pull ghcr.io/project-chip/chip-build-ameba:92 ``` - Run docker container: ``` - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:90 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:92 ``` - Setup build environment: diff --git a/examples/fabric-admin/README.md b/examples/fabric-admin/README.md index 92fdffda6b830f..d9fb67de46799d 100644 --- a/examples/fabric-admin/README.md +++ b/examples/fabric-admin/README.md @@ -23,13 +23,13 @@ For Raspberry Pi 4 example: ### Pull Docker Images ``` -docker pull ghcr.io/project-chip/chip-build-crosscompile:90 +docker pull ghcr.io/project-chip/chip-build-crosscompile:92 ``` ### Run docker ``` -docker run -it -v ~/connectedhomeip:/var/connectedhomeip ghcr.io/project-chip/chip-build-crosscompile:90 /bin/bash +docker run -it -v ~/connectedhomeip:/var/connectedhomeip ghcr.io/project-chip/chip-build-crosscompile:92 /bin/bash ``` ### Build diff --git a/examples/fabric-bridge-app/linux/README.md b/examples/fabric-bridge-app/linux/README.md index 912bb32c01dafb..75f510da971564 100644 --- a/examples/fabric-bridge-app/linux/README.md +++ b/examples/fabric-bridge-app/linux/README.md @@ -100,13 +100,13 @@ defined: Pull Docker Images ``` - docker pull ghcr.io/project-chip/chip-build-crosscompile:90 + docker pull ghcr.io/project-chip/chip-build-crosscompile:92 ``` Run docker ``` - docker run -it -v ~/connectedhomeip:/var/connectedhomeip ghcr.io/project-chip/chip-build-crosscompile:90 /bin/bash + docker run -it -v ~/connectedhomeip:/var/connectedhomeip ghcr.io/project-chip/chip-build-crosscompile:92 /bin/bash ``` Build diff --git a/examples/fabric-sync/README.md b/examples/fabric-sync/README.md index fd943e461f108c..bf4a3b0627cfbc 100644 --- a/examples/fabric-sync/README.md +++ b/examples/fabric-sync/README.md @@ -92,13 +92,13 @@ defined: Pull Docker Images ```sh - docker pull ghcr.io/project-chip/chip-build-crosscompile:90 + docker pull ghcr.io/project-chip/chip-build-crosscompile:92 ``` Run docker ```sh - docker run -it -v ~/connectedhomeip:/var/connectedhomeip ghcr.io/project-chip/chip-build-crosscompile:90 /bin/bash + docker run -it -v ~/connectedhomeip:/var/connectedhomeip ghcr.io/project-chip/chip-build-crosscompile:92 /bin/bash ``` Build diff --git a/examples/light-switch-app/ameba/README.md b/examples/light-switch-app/ameba/README.md index ea9304fe7ca4a9..a499d29528e2fd 100644 --- a/examples/light-switch-app/ameba/README.md +++ b/examples/light-switch-app/ameba/README.md @@ -26,11 +26,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:90 + $ docker pull ghcr.io/project-chip/chip-build-ameba:92 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:90 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:92 - Setup build environment: diff --git a/examples/lighting-app/ameba/README.md b/examples/lighting-app/ameba/README.md index e91aec075b50c0..ea6092575df808 100644 --- a/examples/lighting-app/ameba/README.md +++ b/examples/lighting-app/ameba/README.md @@ -23,11 +23,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:90 + $ docker pull ghcr.io/project-chip/chip-build-ameba:92 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:90 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:92 - Setup build environment: diff --git a/examples/ota-requestor-app/ameba/README.md b/examples/ota-requestor-app/ameba/README.md index e748f41dc9b090..1f69815a780e0a 100644 --- a/examples/ota-requestor-app/ameba/README.md +++ b/examples/ota-requestor-app/ameba/README.md @@ -6,11 +6,11 @@ A prototype application that demonstrates OTA Requestor capabilities. - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:90 + $ docker pull ghcr.io/project-chip/chip-build-ameba:92 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:90 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:92 - Setup build environment: diff --git a/examples/pigweed-app/ameba/README.md b/examples/pigweed-app/ameba/README.md index 136a37a14caf41..66d7564c2c1420 100644 --- a/examples/pigweed-app/ameba/README.md +++ b/examples/pigweed-app/ameba/README.md @@ -31,11 +31,11 @@ following features are available: - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:90 + $ docker pull ghcr.io/project-chip/chip-build-ameba:92 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:90 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:92 - Setup build environment: diff --git a/examples/platform/telink/common.cmake b/examples/platform/telink/common.cmake index 80050c81b3b641..b8da9a0dc876c8 100644 --- a/examples/platform/telink/common.cmake +++ b/examples/platform/telink/common.cmake @@ -72,7 +72,7 @@ if(NOT EXISTS "${BOOT_CONF_OVERLAY_FILE}") message(FATAL_ERROR "${BOOT_CONF_OVERLAY_FILE} doesn't exist") endif() -if(${CONFIG_USB_TELINK_B9X} MATCHES y) +if((${CONFIG_USB_TELINK_B9X} MATCHES y) OR (${CONFIG_USB_TELINK_TLX} MATCHES y)) set(BOOT_USB_CONF_OVERLAY_FILE "${CHIP_ROOT}/config/telink/app/bootloader_usb.conf") if(NOT EXISTS "${BOOT_USB_CONF_OVERLAY_FILE}") message(FATAL_ERROR "${BOOT_USB_CONF_OVERLAY_FILE} doesn't exist") diff --git a/examples/platform/telink/project_include/OpenThreadConfig.h b/examples/platform/telink/project_include/OpenThreadConfig.h index eabe238820ae7f..0e23617e28e21b 100644 --- a/examples/platform/telink/project_include/OpenThreadConfig.h +++ b/examples/platform/telink/project_include/OpenThreadConfig.h @@ -27,12 +27,17 @@ /* Number of message buffers reduced to save RAM */ #undef OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS -#if CONFIG_PM +#if CONFIG_PM || CONFIG_SOC_RISCV_TELINK_TL321X #define OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS 22 #else #define OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS 44 #endif +#if CONFIG_SOC_RISCV_TELINK_TL321X +#undef OPENTHREAD_CONFIG_MLE_MAX_CHILDREN +#define OPENTHREAD_CONFIG_MLE_MAX_CHILDREN 5 +#endif + #define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_DEBUG_UART #undef OPENTHREAD_CONFIG_LOG_LEVEL diff --git a/integrations/cloudbuild/chef.yaml b/integrations/cloudbuild/chef.yaml index 1eafb85580a072..eba19f43d5f315 100644 --- a/integrations/cloudbuild/chef.yaml +++ b/integrations/cloudbuild/chef.yaml @@ -1,5 +1,5 @@ steps: - - name: "ghcr.io/project-chip/chip-build-vscode:90" + - name: "ghcr.io/project-chip/chip-build-vscode:92" entrypoint: "bash" args: - "-c" @@ -7,7 +7,7 @@ steps: 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:90" + - name: "ghcr.io/project-chip/chip-build-vscode:92" # 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 @@ steps: - name: pwenv path: /pwenv timeout: 900s - - name: "ghcr.io/project-chip/chip-build-vscode:90" + - name: "ghcr.io/project-chip/chip-build-vscode:92" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -38,7 +38,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:90" + - name: "ghcr.io/project-chip/chip-build-vscode:92" env: - PW_ENVIRONMENT_ROOT=/pwenv args: diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index f1ca12766f0d29..22b3d377d8c83a 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:90" + - name: "ghcr.io/project-chip/chip-build-vscode:92" entrypoint: "bash" args: - "-c" @@ -7,7 +7,7 @@ steps: 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:90" + - name: "ghcr.io/project-chip/chip-build-vscode:92" # 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 @@ steps: path: /pwenv timeout: 900s - - name: "ghcr.io/project-chip/chip-build-vscode:90" + - name: "ghcr.io/project-chip/chip-build-vscode:92" id: ESP32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -45,7 +45,7 @@ steps: volumes: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:90" + - name: "ghcr.io/project-chip/chip-build-vscode:92" id: NRFConnect env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -66,7 +66,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:90" + - name: "ghcr.io/project-chip/chip-build-vscode:92" id: EFR32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -88,7 +88,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:90" + - name: "ghcr.io/project-chip/chip-build-vscode:92" id: Linux env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -141,7 +141,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:90" + - name: "ghcr.io/project-chip/chip-build-vscode:92" id: Android env: - PW_ENVIRONMENT_ROOT=/pwenv diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index 0f80756ec49208..0bb25ef9a06b75 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -770,6 +770,7 @@ def BuildTelinkTarget(): TargetPart('tlsr9528a_retention', board=TelinkBoard.TLSR9528A_RETENTION), TargetPart('tlsr9258a', board=TelinkBoard.TLSR9258A), TargetPart('tlsr9258a_retention', board=TelinkBoard.TLSR9258A_RETENTION), + TargetPart('tl3218x', board=TelinkBoard.TL3218X), ]) target.AppendFixedTargets([ diff --git a/scripts/build/builders/telink.py b/scripts/build/builders/telink.py index a4943007161f53..bf2bb1900a5842 100644 --- a/scripts/build/builders/telink.py +++ b/scripts/build/builders/telink.py @@ -121,6 +121,7 @@ class TelinkBoard(Enum): TLSR9528A_RETENTION = auto() TLSR9258A = auto() TLSR9258A_RETENTION = auto() + TL3218X = auto() def GnArgName(self): if self == TelinkBoard.TLRS9118BDK40D: @@ -135,6 +136,8 @@ def GnArgName(self): return 'tlsr9258a' elif self == TelinkBoard.TLSR9258A_RETENTION: return 'tlsr9258a_retention' + elif self == TelinkBoard.TL3218X: + return 'tl3218x' else: raise Exception('Unknown board type: %r' % self) diff --git a/scripts/build/testdata/all_targets_linux_x64.txt b/scripts/build/testdata/all_targets_linux_x64.txt index c473de1aa1d814..f3330ffc3fe090 100644 --- a/scripts/build/testdata/all_targets_linux_x64.txt +++ b/scripts/build/testdata/all_targets_linux_x64.txt @@ -22,5 +22,5 @@ nuttx-x64-light qpg-qpg6105-{lock,light,shell,persistent-storage,light-switch,thermostat}[-updateimage] stm32-stm32wb5mm-dk-light tizen-arm-{all-clusters,chip-tool,light,tests}[-no-ble][-no-thread][-no-wifi][-asan][-ubsan][-coverage][-with-ui] -telink-{tlsr9118bdk40d,tlsr9518adk80d,tlsr9528a,tlsr9528a_retention,tlsr9258a,tlsr9258a_retention}-{air-quality-sensor,all-clusters,all-clusters-minimal,bridge,contact-sensor,light,light-switch,lock,ota-requestor,pump,pump-controller,shell,smoke-co-alarm,temperature-measurement,thermostat,window-covering}[-ota][-dfu][-shell][-rpc][-factory-data][-4mb][-mars][-usb][-compress-lzma][-thread-analyzer] +telink-{tlsr9118bdk40d,tlsr9518adk80d,tlsr9528a,tlsr9528a_retention,tlsr9258a,tlsr9258a_retention,tl3218x}-{air-quality-sensor,all-clusters,all-clusters-minimal,bridge,contact-sensor,light,light-switch,lock,ota-requestor,pump,pump-controller,shell,smoke-co-alarm,temperature-measurement,thermostat,window-covering}[-ota][-dfu][-shell][-rpc][-factory-data][-4mb][-mars][-usb][-compress-lzma][-thread-analyzer] openiotsdk-{shell,lock}[-mbedtls][-psa] diff --git a/src/platform/telink/CHIPDevicePlatformConfig.h b/src/platform/telink/CHIPDevicePlatformConfig.h index 989b9b2aaf3705..3123d1464e3081 100644 --- a/src/platform/telink/CHIPDevicePlatformConfig.h +++ b/src/platform/telink/CHIPDevicePlatformConfig.h @@ -108,6 +108,12 @@ #define CHIP_DEVICE_CONFIG_ENABLE_ETHERNET 0 #endif // CHIP_DEVICE_CONFIG_ENABLE_ETHERNET +#ifdef CONFIG_SOC_RISCV_TELINK_TL321X +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE (256) +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_INFO_BUFFER_SIZE (256) +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (256) +#endif + #ifdef CONFIG_BT #define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE CONFIG_BT #else diff --git a/src/platform/telink/CHIPPlatformConfig.h b/src/platform/telink/CHIPPlatformConfig.h index edd68b95380a84..27b2104c2480c6 100644 --- a/src/platform/telink/CHIPPlatformConfig.h +++ b/src/platform/telink/CHIPPlatformConfig.h @@ -62,7 +62,19 @@ #define CHIP_CONFIG_BDX_MAX_NUM_TRANSFERS 1 #endif // CHIP_CONFIG_BDX_MAX_NUM_TRANSFERS -#ifdef CONFIG_PM +#ifdef CONFIG_SOC_RISCV_TELINK_TL321X + +#ifndef CHIP_CONFIG_MAX_GROUP_DATA_PEERS +#define CHIP_CONFIG_MAX_GROUP_DATA_PEERS 5 +#endif // CHIP_CONFIG_MAX_GROUP_DATA_PEERS + +#ifndef CHIP_CONFIG_EXAMPLE_ACCESS_CONTROL_MAX_ENTRIES_PER_FABRIC +#define CHIP_CONFIG_EXAMPLE_ACCESS_CONTROL_MAX_ENTRIES_PER_FABRIC 4 +#endif // CHIP_CONFIG_EXAMPLE_ACCESS_CONTROL_MAX_ENTRIES_PER_FABRIC + +#endif // CONFIG_SOC_RISCV_TELINK_TL321X + +#if defined CONFIG_PM || defined CONFIG_SOC_RISCV_TELINK_TL321X #ifndef CHIP_CONFIG_MAX_GROUP_DATA_PEERS #define CHIP_CONFIG_MAX_GROUP_DATA_PEERS 7 @@ -96,7 +108,7 @@ #define CHIP_CONFIG_DEVICE_MAX_ACTIVE_DEVICES 2 #endif // CHIP_CONFIG_DEVICE_MAX_ACTIVE_DEVICES -#endif // CONFIG_PM +#endif // CONFIG_PM || CONFIG_SOC_RISCV_TELINK_TL321X #ifndef CHIP_CONFIG_MAX_FABRICS #define CHIP_CONFIG_MAX_FABRICS 5 diff --git a/src/platform/telink/SystemPlatformConfig.h b/src/platform/telink/SystemPlatformConfig.h index 5a7b56e9afb5fd..462260e6d1d0bd 100644 --- a/src/platform/telink/SystemPlatformConfig.h +++ b/src/platform/telink/SystemPlatformConfig.h @@ -44,11 +44,18 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_PLATFORM_PROVIDES_TIME 1 #endif // CHIP_SYSTEM_CONFIG_USE_POSIX_TIME_FUNCTS +#ifdef CONFIG_SOC_RISCV_TELINK_TL321X +#define CHIP_SYSTEM_PACKETBUFFER_FROM_CHIP_HEAP 1 +#define CHIP_SYSTEM_PACKETBUFFER_FROM_CHIP_POOL 0 +#define CHIP_SYSTEM_CONFIG_POOL_USE_HEAP 1 +#define CHIP_SYSTEM_CONFIG_PACKETBUFFER_CAPACITY_MAX 1280 +#endif + #define CHIP_SYSTEM_CONFIG_USE_LWIP 0 #define CHIP_SYSTEM_CONFIG_USE_SOCKETS 1 // Reduce packet buffer pool size (default 15) to reduce ram consumption -#ifdef CONFIG_PM +#if defined CONFIG_PM || defined CONFIG_SOC_RISCV_TELINK_TL321X #define CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE 0 #else #define CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE 8 diff --git a/src/platform/telink/tl3218x.overlay b/src/platform/telink/tl3218x.overlay new file mode 100644 index 00000000000000..4c74bb14ea216c --- /dev/null +++ b/src/platform/telink/tl3218x.overlay @@ -0,0 +1,61 @@ +/ { + /* Short TL_Key3 (J6 pin 21) to ground */ + key_pool { + compatible = "gpio-keys"; + + inp { + gpios = <&gpiob 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&gpiob 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + }; + + key_matrix { + compatible = "gpio-keys"; + + col { + gpios = <&gpiob 6 GPIO_ACTIVE_HIGH>, + <&gpiob 7 GPIO_ACTIVE_HIGH>; + }; + + row { + gpios = <&gpiob 3 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>, + <&gpiob 5 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>; + }; + }; + + led_pool { + compatible = "gpio-leds"; + + out { + gpios = <&gpiod 0 GPIO_ACTIVE_HIGH>; + }; + }; + + pwm_pool { + compatible = "pwm-leds"; + out { + pwms = <&pwm0 2 PWM_MSEC(20) PWM_POLARITY_NORMAL>, + <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>, + <&pwm0 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>; + }; + }; +}; + +&pwm0 { + /* On board RGB LEDs */ + pinctrl-ch0 = <&pwm_ch0_pb1_default>; + pinctrl-ch2 = <&pwm_ch1_pb2_default>; + pinctrl-ch1 = <&pwm_ch2_pb0_default>; +}; + +&pinctrl { + pwm_ch0_pb1_default: pwm_ch0_pb1_default { + pinmux = ; + }; + pwm_ch1_pb2_default: pwm_ch1_pb2_default { + pinmux = ; + }; + pwm_ch2_pb0_default: pwm_ch2_pb0_default { + pinmux = ; + }; +}; diff --git a/src/platform/telink/tl3218x_2m_flash.overlay b/src/platform/telink/tl3218x_2m_flash.overlay new file mode 100644 index 00000000000000..53114e6ac6054d --- /dev/null +++ b/src/platform/telink/tl3218x_2m_flash.overlay @@ -0,0 +1,39 @@ +&flash { + reg = <0x20000000 0x200000>; + + /delete-node/ partitions; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + boot_partition: partition@0 { + label = "mcuboot"; + reg = <0x00000000 0x13000>; + }; + slot0_partition: partition@13000 { + label = "image-0"; + reg = <0x13000 0xef000>; + }; + factory_partition: partition@102000 { + label = "factory-data"; + reg = <0x102000 0x800>; + }; + factory_rfu_partition: partition@102800 { + label = "factory-data-rfu"; + reg = <0x102800 0x800>; + }; + storage_partition: partition@103000 { + label = "storage"; + reg = <0x103000 0xc000>; + }; + slot1_partition: partition@10f000 { + label = "image-1"; + reg = <0x10f000 0xef000>; + }; + vendor_partition: partition@1fe000 { + label = "vendor-data"; + reg = <0x1fe000 0x2000>; + }; + }; +};