Skip to content

Commit ccc27ed

Browse files
[Telink] RAM/ROM optimization & Update Telink image to 12 (#29373)
* [Telink] Disabled MBEDTLS_TEST and MBEDTLS_ERROR_C (saved 7Kb of flash) * [Telink] Disabled debug logs (saved 11.5Kb of flash) * [Telink] Disable all unused buttons * [Telink] Enable all buttons by default * [Telink] Disable Interaction model Event support in server * [Telink] Reduce number of message buffers in the buffer pool * [Telink] Set packet buffer pool size into 0 * [Telink] Decrease stack and buffer size * [Telink] Update Stack sizes * [Telink] Use B9X * [Telink] Use LAMBDA_EVENT_SIZE minimal value to build OTA * [Telink] Use Kconfigs and make PM dependency * [Telink] Set BLE device name via config * [Telink] Fix after tests * [Telink] decrease some values for FTD as well * [Telink]: Added public BLE MAC readout from vendor flash section The BLE MAC can be generated randomly or read from flash area. * [Telink] Increase BLE_CTRL_THREAD_STACK after B92 BLE stack update * [Telink] Update Telink image to 12 * [Telink] Enable NL_ASSERT_USE_FLAGS by default * [Telink] Increase stack size after OTA tests * [Telink] minor chnages * Restyled by clang-format --------- Co-authored-by: Restyled.io <commits@restyled.io>
1 parent a6d21ad commit ccc27ed

File tree

134 files changed

+1084
-1116
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+1084
-1116
lines changed

.github/workflows/chef.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
if: github.actor != 'restyled-io[bot]'
9797

9898
container:
99-
image: ghcr.io/project-chip/chip-build-telink:10
99+
image: ghcr.io/project-chip/chip-build-telink:12
100100
options: --user root
101101

102102
steps:

.github/workflows/examples-telink.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
if: github.actor != 'restyled-io[bot]'
3737

3838
container:
39-
image: ghcr.io/project-chip/chip-build-telink:10
39+
image: ghcr.io/project-chip/chip-build-telink:12
4040
volumes:
4141
- "/tmp/bloat_reports:/tmp/bloat_reports"
4242

config/telink/app/zephyr.conf

-147
This file was deleted.

config/telink/chip-gn/args.gni

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ chip_device_platform = "telink"
2020

2121
chip_build_tests = false
2222

23-
chip_project_config_include = ""
24-
chip_system_project_config_include = ""
23+
chip_project_config_include = "<CHIPProjectConfig.h>"
24+
chip_system_project_config_include = "<CHIPProjectConfig.h>"
2525
chip_ble_project_config_include = ""
2626

2727
chip_crypto = "mbedtls"

config/telink/chip-module/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ if (CONFIG_POSIX_API)
5252
matter_add_flags(-isystem${ZEPHYR_BASE}/include/zephyr/posix)
5353
endif()
5454

55+
matter_add_flags(-DNL_ASSERT_USE_FLAGS_DEFAULT=1)
56+
5557
zephyr_include_directories(${CHIP_ROOT}/src/platform/telink/)
5658

5759
zephyr_get_compile_flags(ZEPHYR_CFLAGS_C C)
@@ -61,6 +63,8 @@ matter_add_cxxflags("${ZEPHYR_CFLAGS_CC}")
6163
zephyr_get_gnu_cpp_standard(ZEPHYR_GNU_CPP_STD)
6264
matter_add_cxxflags(${ZEPHYR_GNU_CPP_STD})
6365

66+
matter_add_flags(-DMBEDTLS_USER_CONFIG_FILE=<telink-mbedtls-config.h>)
67+
6468
# Set up custom OpenThread configuration
6569

6670
if (CONFIG_CHIP_OPENTHREAD_CONFIG)

config/telink/chip-module/Kconfig

+14-10
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616

1717
rsource "../../zephyr/Kconfig"
1818

19+
if CHIP
20+
1921
# See config/zephyr/Kconfig for full definition
2022
config CHIP_DEVICE_VENDOR_NAME
21-
default "Telink semiconductor"
23+
default "Telink Semiconductor"
2224

2325
config CHIP_APP_LOG_LEVEL
2426
int "Logging level in application"
@@ -33,27 +35,28 @@ config CHIP_APP_LOG_LEVEL
3335
# See config/zephyr/Kconfig for full definition
3436
config CHIP_OTA_REQUESTOR
3537
bool
36-
default y
37-
imply BOOTLOADER_MCUBOOT
38-
imply IMG_MANAGER
38+
select BOOTLOADER_MCUBOOT
39+
select IMG_MANAGER
40+
select STREAM_FLASH
41+
select STREAM_FLASH_ERASE
3942

4043
config CHIP_OTA_REQUESTOR_BUFFER_SIZE
4144
int "OTA Requestor image buffer size"
4245
default 256
4346
depends on CHIP_OTA_REQUESTOR
4447
help
45-
Configures size of the buffer used by OTA Requestor when downloading and
46-
writing a new firmware image to flash.
48+
Configures the size of the buffer used by OTA Requestor when downloading
49+
and writing a new firmware image to flash.
4750

4851
config CHIP_OTA_REQUESTOR_REBOOT_ON_APPLY
4952
bool "Auto-reboot when firmware update is applied"
5053
default y
5154
depends on CHIP_OTA_REQUESTOR
5255
imply REBOOT
5356
help
54-
When a user consents to apply a firmware update, and the update package is
55-
downloaded, reboot the device automatically to swap the old and the new
56-
firmware images.
57+
Reboots the device automatically after downloading a new firmware update
58+
to swap the old and the new firmware images. The reboot happens only when
59+
a user consents to apply the firmware update.
5760

5861
# See config/zephyr/Kconfig for full definition
5962
config CHIP_OTA_IMAGE_BUILD
@@ -149,9 +152,10 @@ config CHIP_FACTORY_RESET_ERASE_NVS
149152
bool
150153
default n
151154

155+
endif
156+
152157
config CHIP_LOG_SIZE_OPTIMIZATION
153158
bool "Disable some detailed logs to decrease flash usage"
154-
default y
155159
help
156160
Disables some log levels for specific Matter log modules that provide
157161
information that is too detailed to be used in most cases. You can find

0 commit comments

Comments
 (0)