Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

riscv: telink: add retention mode for buteo #385

Merged
merged 3 commits into from
Feb 26, 2025

Conversation

fengtai-telink
Copy link
Collaborator

  • Update zephyr commit to cf39341 .

Testing

Verified by CI

@fengtai-telink
Copy link
Collaborator Author

fengtai-telink commented Feb 19, 2025

Because the source of this branch is update_zephyr_3.7 , the PR only fixes buteo PM and does not include the repair of mcuboot . Don't worry, we will rebase it after merge the #384 .
I will merge the PR(zephyr 466, matter 384, fix mcu ram) to PR(zephyr 469, matter 385, add buteo pm) to test CI .


Now, it seems that MCUboot's build failure due to RAM overflow has been resolved. But for buteo pm, it failed due to RAM overflow of 9924 bytes .

@s07641069
Copy link
Owner

But for buteo pm, it failed due to RAM overflow of 9924 bytes .

For now temporary we can exclude buteo pm CI target build for Zephyr 3.7 in GitHub CI yaml file
please do this and update Zephyr hash if needed from telink-semi/zephyr#469

 - adjust the zephyr hash to 9e39d9f .
 - add tl3218x_retention target .

Signed-off-by: Fengtai Xie <fengtai.xie@telink-semi.com>
@fengtai-telink fengtai-telink force-pushed the update_zephyr_3.7_buteo_pm branch from 7ca8e84 to 0e944a9 Compare February 26, 2025 04:41
Signed-off-by: Fengtai Xie <fengtai.xie@telink-semi.com>
@fengtai-telink
Copy link
Collaborator Author

But for buteo pm, it failed due to RAM overflow of 9924 bytes .

For now temporary we can exclude buteo pm CI target build for Zephyr 3.7 in GitHub CI yaml file please do this and update Zephyr hash if needed from telink-semi/zephyr#469

Yes, I have exclude buteo pm CI target . Currently, the CI look like is OK .

@s07641069 s07641069 merged commit c5d1fbb into update_zephyr_3.7 Feb 26, 2025
62 of 64 checks passed
@s07641069 s07641069 deleted the update_zephyr_3.7_buteo_pm branch February 26, 2025 14:52
s07641069 added a commit that referenced this pull request Mar 3, 2025
* [Telink] Zephyr v3.7 update changes

Adopted changes for Telink B9x board series for
upcoming update of Zephyr version.

Fixed err output from InitChipStack in mainCommon.
Tested advertisement tested manually.

* [Telink] Manual Zephyr SDK update to check CI jobs

* [Telink] Fix build errors:
- STREAM_FLASH_ERASE has direct dependencies STREAM_FLASH
- GETOPT_LONG multiple definition error

* [Telink] CONFIG_BOOT_MAX_IMG_SECTORS_AUTO used

* [Telink] Fix build errors

* [Telink] Reduce mcuboot partition size to 60Kb
- Apply change for flash overlays <=2Mb
- Possible after reducing CONFIG_BOOT_MAX_IMG_SECTORS

* [Telink] Reduce NET_BUF_*_COUNT (to be tested)

* [Telink] avoid using NEWLIB_LIBC (use PICOLIB)

* Restyled by whitespace

* Restyled by clang-format

* [Telink] Update Zephyr revision & SDK

* [Telink] Adopt TL3218 to latest Zephyr version

* [Telink] Use 4mb flash for (B92) Light Switch App target build

* [Telink] Fix W91 target build

* [Telink] Fix B91 Mars target build

* [Telink] Use correct if SOC_RISCV_TELINK_TL321X

* [Telink] Fix retention target builds

* [Telink] fixed W91 WiFi interface init

reverted GetWifiInterface in InetUtils changes,
added syntax fixes to Kconfigs.default

* [Telink] Update to latest zephyr (develop_new_matter_fixes) hash

* [Telink] memory layout and default config changes

Reduced mcuboot partition by 0x1000 and removed two other partitions
getting 0x3000 to distribute 0x4000 between slot0 and slot 1.

Kconfig.defaults changes to reduce ROM usage on B92 lighting OTA.
To be improved

[Telink] reduced MCUboot partition for most targets

increase of slot0,1, bootloader config changes

[Telink] Fixed B9x platform startup

Lack of MBEDTLS_ZEPHYR_ENTROPY config in defaults
which led to InitChipStack 172 error.
As result entropy failed in src/platform/Zephyr/PlatformManagerImpl.cpp

[Telink] fixed B9x commissioning

Reverted network buffers configs

[Telink] TL3218 commissioning fixes

Changes to fix TLx commissioning on new Zephyr

[Telink] Zephyr revision update

After merge updates.
Kconfig change to fix TL3218 commissioning
Reduced RAM usage to build TL3218 by
COMMON_LIBC_MALLOC_ARENA_SIZE changing

[Telink] zephyr version change, cleanup

Changed MCUBOOT logs config, same for LZMA

* [Telink] W91 OTA, Factory data commissioning fix

Fixes full config target commissioning for W91.
Been failing on `SendAttestationRequest` step,
finished with `general error 0x01`.

Tested manually with chip-tool on RPi on tlsr9118bdk40d

* [Telink] W91 stacks increase

Increased NET_MGMT_EVENT_STACK_SIZE by 122 B
and IPC_SERVICE_BACKEND_ICMSG_WQ_STACK_SIZE by 256 B
so that net_mgmt and icmsg_workq stack were used <90%.
Jenkins reported thread analyzer warnings on that.

* [Telink] review changes draft

Reverted NET_BUF_RX/TX_COUNT

* [Telink] Add tl7218 board.

* [Telink] Fix compilation warnings.

* [Telink] Fix config option.

* [Telink] Cleanup MbedTLS configuration.

* [Telink] Update tl721x default Kconfig

- update the default values for BT_RX_STACK_SIZE and COMMON_LIBC_MALLOC_ARENA_SIZE for TL721X

Signed-off-by: Jinmiao Yu <jinmiao.yu@telink-semi.com>

* [Telink] Remove unused files

* [Telink] Update Zephyr revision

* [Telink] Clean config types

* [Telink] Update Zephyr revision

* [Telink] Increase BLE_CTRL_THREAD_STACK_SIZE (B92 SoC retention test)

* [Telink] Fix compilation warninig

* [Telink] TL7218 upgrade to support version A2

* [Telink] Remove unused file after resolve merge conflict

* [Telink] Add tl7218_retention target

* riscv: telink: seperate ram for tl3218x .

- use retention mode to seperate ram.
- reserve more ram for ilm.

Signed-off-by: Haiwen Xia <haiwen.xia@telink-semi.com>

* [Telink] Fix broken GitHub CI after adding tl721x target

* [Telink] remove temporary LZMA for tl321x due to bug

* [Telink] Fix TELINK_TLX_MATTER_RETENTION_LAYOUT typo for BOARD_TL3218

* [Telink] Add GPIO/PWM required for TL721X
telink-semi/hal_telink@62edeab

* [Telink] Temporary disable B95 OTA failed build
B95 will be removed fully in next commits

* [Telink] Add missed clean out build output step

* [Telink] adopt WiFi driver

* [Telink] remove b95 SoC / TLSR9258a board (replaced by TL721x)

* [Telink] Revert InetUtils.cpp Telink dependency

* [Telink] zephyr versions compatibility changes (#382)

* [Telink] zephyr versions compatibility changes

* [Telink] Change Window Covering App default SoC
W91 doesn't support PM

* [Telink] Update Zephyr revision

* [Telink] sync B92 flash layout

* [Telink] Remove temp b92 4mb change

* [Telink] Avoid main stack owerflow for w91

* [Telink] Update Zephyr revision

* [Telink] manual sync after merge master

* [Telink] Increase Main Stack size for W91
Update Zephyr revision

* [Telink] Zephyr 3.3 backward compatibility support

* riscv: telink: fix insufficient RAM when config LZMA (#384)

 - adjust the zephyr hash to 930b6d4 .

Signed-off-by: Fengtai Xie <fengtai.xie@telink-semi.com>

* riscv: telink: add retention mode for buteo (#385)

* riscv: telink: Update Zephyr hash

 - adjust the zephyr hash to 9e39d9f .
 - add tl3218x_retention target .

Signed-off-by: Fengtai Xie <fengtai.xie@telink-semi.com>

* riscv: telink: remove retention build target for buteo

Signed-off-by: Fengtai Xie <fengtai.xie@telink-semi.com>

* [Telink] Add comment

---------

Signed-off-by: Fengtai Xie <fengtai.xie@telink-semi.com>
Co-authored-by: Alex Tsitsiura <s07641069@gmail.com>

* [Telink] Fix commisioning issue due to missed MbedTLS module
TODO: fix compilation warnings

* telink: tl7218x: fix tercel retention (Update Zephyr hash)

* [Telink] Optimize add MbedTLS definitions for Zephyr 3.3 without warnings

* [Telink] Use latest hash for Zephyr 3.3

* [Telink] Disable debug part

---------

Signed-off-by: Jinmiao Yu <jinmiao.yu@telink-semi.com>
Signed-off-by: Haiwen Xia <haiwen.xia@telink-semi.com>
Signed-off-by: Fengtai Xie <fengtai.xie@telink-semi.com>
Co-authored-by: interfer <diman1436@gmail.com>
Co-authored-by: Restyled.io <commits@restyled.io>
Co-authored-by: Dmytro Huz <75682372+interfer@users.noreply.github.com>
Co-authored-by: Andrii Bilynskyi <andrii.bilynskyi@telink-semi.com>
Co-authored-by: Haiwen Xia <haiwen.xia@telink-semi.com>
Co-authored-by: Serhii Salamakha <serhii.salamakha@gmail.com>
Co-authored-by: fengtai-telink <fengtai.xie@telink-semi.com>
charlie-ai pushed a commit that referenced this pull request Apr 9, 2025
…lds to docker version 125 (project-chip#36691)

* [Telink] Zephyr v3.7 update changes

Adopted changes for Telink B9x board series for
upcoming update of Zephyr version.

Fixed err output from InitChipStack in mainCommon.
Tested advertisement tested manually.

* [Telink] Manual Zephyr SDK update to check CI jobs

* [Telink] Fix build errors:
- STREAM_FLASH_ERASE has direct dependencies STREAM_FLASH
- GETOPT_LONG multiple definition error

* [Telink] CONFIG_BOOT_MAX_IMG_SECTORS_AUTO used

* [Telink] Fix build errors

* [Telink] Reduce mcuboot partition size to 60Kb
- Apply change for flash overlays <=2Mb
- Possible after reducing CONFIG_BOOT_MAX_IMG_SECTORS

* [Telink] Reduce NET_BUF_*_COUNT (to be tested)

* [Telink] avoid using NEWLIB_LIBC (use PICOLIB)

* Restyled by whitespace

* Restyled by clang-format

* [Telink] Update Zephyr revision & SDK

* [Telink] Adopt TL3218 to latest Zephyr version

* [Telink] Use 4mb flash for (B92) Light Switch App target build

* [Telink] Fix W91 target build

* [Telink] Fix B91 Mars target build

* [Telink] Use correct if SOC_RISCV_TELINK_TL321X

* [Telink] Fix retention target builds

* [Telink] fixed W91 WiFi interface init

reverted GetWifiInterface in InetUtils changes,
added syntax fixes to Kconfigs.default

* [Telink] Update to latest zephyr (develop_new_matter_fixes) hash

* [Telink] memory layout and default config changes

Reduced mcuboot partition by 0x1000 and removed two other partitions
getting 0x3000 to distribute 0x4000 between slot0 and slot 1.

Kconfig.defaults changes to reduce ROM usage on B92 lighting OTA.
To be improved

[Telink] reduced MCUboot partition for most targets

increase of slot0,1, bootloader config changes

[Telink] Fixed B9x platform startup

Lack of MBEDTLS_ZEPHYR_ENTROPY config in defaults
which led to InitChipStack 172 error.
As result entropy failed in src/platform/Zephyr/PlatformManagerImpl.cpp

[Telink] fixed B9x commissioning

Reverted network buffers configs

[Telink] TL3218 commissioning fixes

Changes to fix TLx commissioning on new Zephyr

[Telink] Zephyr revision update

After merge updates.
Kconfig change to fix TL3218 commissioning
Reduced RAM usage to build TL3218 by
COMMON_LIBC_MALLOC_ARENA_SIZE changing

[Telink] zephyr version change, cleanup

Changed MCUBOOT logs config, same for LZMA

* [Telink] W91 OTA, Factory data commissioning fix

Fixes full config target commissioning for W91.
Been failing on `SendAttestationRequest` step,
finished with `general error 0x01`.

Tested manually with chip-tool on RPi on tlsr9118bdk40d

* [Telink] W91 stacks increase

Increased NET_MGMT_EVENT_STACK_SIZE by 122 B
and IPC_SERVICE_BACKEND_ICMSG_WQ_STACK_SIZE by 256 B
so that net_mgmt and icmsg_workq stack were used <90%.
Jenkins reported thread analyzer warnings on that.

* [Telink] review changes draft

Reverted NET_BUF_RX/TX_COUNT

* [Telink] Add tl7218 board.

* [Telink] Fix compilation warnings.

* [Telink] Fix config option.

* [Telink] Cleanup MbedTLS configuration.

* [Telink] Update tl721x default Kconfig

- update the default values for BT_RX_STACK_SIZE and COMMON_LIBC_MALLOC_ARENA_SIZE for TL721X

Signed-off-by: Jinmiao Yu <jinmiao.yu@telink-semi.com>

* [Telink] Remove unused files

* [Telink] Update Zephyr revision

* [Telink] Clean config types

* [Telink] Update Zephyr revision

* [Telink] Increase BLE_CTRL_THREAD_STACK_SIZE (B92 SoC retention test)

* [Telink] Fix compilation warninig

* [Telink] TL7218 upgrade to support version A2

* [Telink] Remove unused file after resolve merge conflict

* [Telink] Add tl7218_retention target

* riscv: telink: seperate ram for tl3218x .

- use retention mode to seperate ram.
- reserve more ram for ilm.

Signed-off-by: Haiwen Xia <haiwen.xia@telink-semi.com>

* [Telink] Fix broken GitHub CI after adding tl721x target

* [Telink] remove temporary LZMA for tl321x due to bug

* [Telink] Fix TELINK_TLX_MATTER_RETENTION_LAYOUT typo for BOARD_TL3218

* [Telink] Add GPIO/PWM required for TL721X
telink-semi/hal_telink@62edeab

* [Telink] Temporary disable B95 OTA failed build
B95 will be removed fully in next commits

* [Telink] Add missed clean out build output step

* [Telink] adopt WiFi driver

* [Telink] remove b95 SoC / TLSR9258a board (replaced by TL721x)

* [Telink] Revert InetUtils.cpp Telink dependency

* [Telink] zephyr versions compatibility changes (#382)

* [Telink] zephyr versions compatibility changes

* [Telink] Change Window Covering App default SoC
W91 doesn't support PM

* [Telink] Update Zephyr revision

* [Telink] sync B92 flash layout

* [Telink] Remove temp b92 4mb change

* [Telink] Avoid main stack owerflow for w91

* [Telink] Update Zephyr revision

* [Telink] manual sync after merge master

* [Telink] Increase Main Stack size for W91
Update Zephyr revision

* [Telink] Zephyr 3.3 backward compatibility support

* riscv: telink: fix insufficient RAM when config LZMA (#384)

 - adjust the zephyr hash to 930b6d4 .

Signed-off-by: Fengtai Xie <fengtai.xie@telink-semi.com>

* riscv: telink: add retention mode for buteo (#385)

* riscv: telink: Update Zephyr hash

 - adjust the zephyr hash to 9e39d9f .
 - add tl3218x_retention target .

Signed-off-by: Fengtai Xie <fengtai.xie@telink-semi.com>

* riscv: telink: remove retention build target for buteo

Signed-off-by: Fengtai Xie <fengtai.xie@telink-semi.com>

* [Telink] Add comment

---------

Signed-off-by: Fengtai Xie <fengtai.xie@telink-semi.com>
Co-authored-by: Alex Tsitsiura <s07641069@gmail.com>

* [Telink] Fix commisioning issue due to missed MbedTLS module
TODO: fix compilation warnings

* telink: tl7218x: fix tercel retention (Update Zephyr hash)

* [Telink] Optimize add MbedTLS definitions for Zephyr 3.3 without warnings

* [Telink]  Add zephyr_3.3 job

* [Telink] Fix job name

* [Telink] test same job name to avoid settings changes

* [Telink] Use Shell for tl321x lighting build (Zephyr 3.3)

* [Telink] Decrease number of CI builds for all PRs

* [Telink] Update readme files

* Update builds to docker version 121

* Restyled by prettier-markdown

* Revert TI CC32XX image

* Update builds to docker version 122

* [Telink] Add Thread Optimization Configs

- OPENTHREAD_CSMABACKOFF_OPTIMIZATION
- IEEE802154_TLX_OPTIMIZATION
- set COMMON_LIBC_MALLOC_ARENA_SIZE to
20kb if tl7218x_retention for power consumption optimization
based on d6882ec.

* [Telink] Fix duplicated name of Size Reports

* Update builds to docker version 123

* keep Tizen on 122

* Update builds to docker version 125

* revert cc32xx

---------

Signed-off-by: Jinmiao Yu <jinmiao.yu@telink-semi.com>
Signed-off-by: Haiwen Xia <haiwen.xia@telink-semi.com>
Signed-off-by: Fengtai Xie <fengtai.xie@telink-semi.com>
Co-authored-by: interfer <diman1436@gmail.com>
Co-authored-by: Restyled.io <commits@restyled.io>
Co-authored-by: Dmytro Huz <75682372+interfer@users.noreply.github.com>
Co-authored-by: Andrii Bilynskyi <andrii.bilynskyi@telink-semi.com>
Co-authored-by: Haiwen Xia <haiwen.xia@telink-semi.com>
Co-authored-by: Serhii Salamakha <serhii.salamakha@gmail.com>
Co-authored-by: fengtai-telink <fengtai.xie@telink-semi.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants