Skip to content

Commit a085a45

Browse files
Martin-NXPyeaissarestyled-commits
authored
[NXP] Upstream nxp zephyr 4.1.0 support (#38990)
* [nxp][zephyr] Migrate to Zephyr 4.1 Config and code update to migrate to 4.1 Zephyr + Memory footprint optimization + Revert Zephyr 4.0 workarounds Adding build release configuration for zephyr examples. Removing KCONFIG no more applicable in Zephyr 4.1 Signed-off-by: Gatien Chapon <[email protected]> * [nxp][zephyr][doc] Update Zephyr nxp downstream tag to 4.1.0 version Signed-off-by: Martin Girardot <[email protected]> * Restyled by clang-format * add zephyr version check for 4.1.0 wifi feature Signed-off-by: Martin Girardot <[email protected]> * update nxp zephyr docker image version Signed-off-by: Martin Girardot <[email protected]> --------- Signed-off-by: Gatien Chapon <[email protected]> Signed-off-by: Martin Girardot <[email protected]> Co-authored-by: Yassine El Aissaoui <[email protected]> Co-authored-by: Restyled.io <[email protected]>
1 parent a86ec95 commit a085a45

File tree

14 files changed

+169
-98
lines changed

14 files changed

+169
-98
lines changed

.github/workflows/examples-nxp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ jobs:
219219
if: github.actor != 'restyled-io[bot]'
220220

221221
container:
222-
image: ghcr.io/project-chip/chip-build-nxp-zephyr:129
222+
image: ghcr.io/project-chip/chip-build-nxp-zephyr:132
223223

224224
steps:
225225
- name: Checkout

config/nxp/chip-module/Kconfig.defaults

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2024 Project CHIP Authors
2+
# Copyright (c) 2024-2025 Project CHIP Authors
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -136,7 +136,7 @@ config NET_TC_TX_THREAD_BASE_PRIO
136136
config NET_TC_RX_THREAD_BASE_PRIO
137137
default 3
138138

139-
config NET_TC_SKIP_FOR_HIGH_PRIO
139+
config NET_TC_TX_SKIP_FOR_HIGH_PRIO
140140
default y
141141

142142
config NET_CONTEXT_PRIORITY
@@ -214,7 +214,7 @@ config BT_RX_STACK_SIZE
214214
default 1700
215215

216216
config BT_LONG_WQ_STACK_SIZE
217-
default 1024
217+
default 2560
218218

219219
config BT_DEVICE_NAME_GATT_WRITABLE
220220
bool
@@ -245,6 +245,31 @@ choice NXP_WIFI_PART
245245
default NXP_RW610 if SOC_SERIES_RW6XX
246246
endchoice
247247

248+
# Disable unnecessary features to save code size
249+
# Saves 365kB of flash
250+
config NXP_WIFI_SOFTAP_SUPPORT
251+
default n
252+
253+
# Saves 61kB of flash
254+
config NXP_WIFI_CSI
255+
default n
256+
257+
# Saves 45kB of flash
258+
config WIFI_NM_WPA_SUPPLICANT_ADVANCED_FEATURES
259+
default n
260+
261+
config NXP_WIFI_MON_TASK_STACK_SIZE
262+
default 1024
263+
264+
config NXP_WIFI_WLCMGR_TASK_STACK_SIZE
265+
default 2048
266+
267+
config NXP_WIFI_TX_TASK_STACK_SIZE
268+
default 1024
269+
270+
config NXP_WIFI_SCAN_TASK_STACK_SIZE
271+
default 1024
272+
248273
config ZVFS_OPEN_MAX
249274
default 30
250275

@@ -321,7 +346,7 @@ config NET_MAX_CONN
321346
default 10
322347

323348
config SHELL_STACK_SIZE
324-
default 2616
349+
default 1536
325350

326351
config HEAP_MEM_POOL_SIZE
327352
default 122880
@@ -344,10 +369,6 @@ endif
344369

345370
if CHIP_ETHERNET
346371

347-
choice NXP_ENET_DRIVER
348-
default ETH_NXP_ENET
349-
endchoice
350-
351372
config NET_SOCKETS_POLL_MAX
352373
default 7
353374

@@ -360,6 +381,9 @@ config MBEDTLS
360381
config MBEDTLS_CFG_FILE
361382
default "config-tls-generic.h"
362383

384+
config MBEDTLS_PSA_KEY_SLOT_COUNT
385+
default 64
386+
363387
config MBEDTLS_USER_CONFIG_ENABLE
364388
default y
365389

@@ -431,16 +455,22 @@ endif # MCUX_ELS_PKC
431455

432456
if SHELL
433457

434-
config KERNEL_SHELL
458+
config SHELL_MINIMAL
435459
default y
436460

437-
config DEVICE_SHELL
461+
config SHELL_HELP
462+
default y
463+
464+
config KERNEL_SHELL
438465
default y
439466

440467
config REBOOT
441468
default y
442469

443470
# Disable not used shell modules
471+
config DEVICE_SHELL
472+
default n
473+
444474
config SHELL_WILDCARD
445475
default n
446476

config/nxp/chip-module/Kconfig.features

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2024 Project CHIP Authors
2+
# Copyright (c) 2024-2025 Project CHIP Authors
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -25,10 +25,6 @@ config CHIP_WIFI
2525
select WIFI
2626
select WIFI_NXP
2727
select WIFI_NM_WPA_SUPPLICANT
28-
select WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE
29-
select WIFI_NM_WPA_SUPPLICANT_DPP
30-
select WIFI_NM_WPA_SUPPLICANT_EAPOL
31-
select WIFI_NM_WPA_SUPPLICANT_WPS
3228
select NET_L2_ETHERNET
3329
select NET_IPV4
3430
select NET_DHCPV4

docs/platforms/nxp/nxp_zephyr_guide.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,20 @@ Prerequisites:
5252
- Follow instruction from [BUILDING.md](../../guides/BUILDING.md) to setup the
5353
Matter environment
5454
- Follow instruction from
55-
[Getting Started Guide](https://docs.zephyrproject.org/4.0.0/develop/getting_started/index.html)
55+
[Getting Started Guide](https://docs.zephyrproject.org/4.1.0/develop/getting_started/index.html)
5656
to setup a Zephyr workspace, however, the west init command to use is as
5757
follows:
5858

5959
```shell
60-
$ west init zephyrproject -m https://github.com/nxp-zephyr/nxp-zsdk.git --mr nxp-v4.0.0
60+
$ west init zephyrproject -m https://github.com/nxp-zephyr/nxp-zsdk.git --mr nxp-v4.1.0
6161
```
6262

6363
> **Note**: While some of NXP platforms are supported in Zephyr upstream, we
6464
> recommend using nxp-zsdk downstream to get access to all NXP features that are
6565
> not upstream yet. While you can decide to use nxp-zsdk top of tree, we
6666
> recommend using a proper release tag delivered by NXP. This will ensure a
6767
> certain level of quality of the nxp-zsdk in use. Currently, we highly
68-
> recommend using the `nxp-v4.0.0` tag, based on Zephyr 4.0 release. Reach to
68+
> recommend using the `nxp-v4.1.0` tag, based on Zephyr 4.1 release. Reach to
6969
> your NXP contact for more details.
7070
7171
Steps to build the example:
@@ -212,6 +212,17 @@ See
212212

213213
<a name="ota-software-update"></a>
214214

215+
### Build in release mode
216+
217+
To build the example in release mode, you can add
218+
`-DEXTRA_CONF_FILE=prj_release.conf` in the west build command line.
219+
220+
Example:
221+
222+
```bash
223+
west build -b <board> -p <path to example folder> -- -DEXTRA_CONF_FILE=prj_release.conf
224+
```
225+
215226
## OTA Software Update
216227

217228
See

examples/all-clusters-app/nxp/zephyr/boards/frdm_rw612_fdata.conf

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2024 Project CHIP Authors
2+
# Copyright (c) 2024-2025 Project CHIP Authors
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -21,6 +21,3 @@ CONFIG_CHIP_DEVICE_PRODUCT_ID=41510
2121
CONFIG_CHIP_DEVICE_PRODUCT_URL="https://www.nxp.com/design/design-center/development-boards-and-designs/general-purpose-mcus/frdm-development-board-for-rw612-wi-fi-6-plus-bluetooth-low-energy-plus-802-15-4-tri-radio-wireless-mcu:FRDM-RW612"
2222
CONFIG_CHIP_DEVICE_PRODUCT_LABEL="RW612"
2323
CONFIG_CHIP_DEVICE_PART_NUMBER="RW612"
24-
25-
# Workaround for nxp-zsdk v4.0.0 release
26-
CONFIG_FLASH_LOAD_SIZE=0

examples/all-clusters-app/nxp/zephyr/boards/frdm_rw612.conf renamed to examples/all-clusters-app/nxp/zephyr/prj_release.conf

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2024 Project CHIP Authors
2+
# Copyright (c) 2025 Project CHIP Authors
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -14,5 +14,27 @@
1414
# limitations under the License.
1515
#
1616

17-
# Workaround for nxp-zsdk v4.0.0 release
18-
CONFIG_FLASH_LOAD_SIZE=0
17+
CONFIG_BOOT_BANNER=n
18+
19+
CONFIG_THREAD_NAME=n
20+
CONFIG_MPU_STACK_GUARD=n
21+
22+
CONFIG_ASSERT=n
23+
24+
CONFIG_DEBUG=n
25+
CONFIG_DEBUG_INFO=n
26+
CONFIG_DEBUG_THREAD_INFO=n
27+
28+
CONFIG_CHIP_STATISTICS=n
29+
CONFIG_SIZE_OPTIMIZATIONS_AGGRESSIVE=y
30+
# Additional debug features, user may want to disable some of them
31+
32+
# Shell
33+
# CONFIG_CHIP_LIB_SHELL=n
34+
# CONFIG_SHELL=n
35+
36+
# Console & Logs
37+
# CONFIG_SERIAL=n
38+
# CONFIG_LOG=n
39+
# CONFIG_CONSOLE=n
40+
# CONFIG_UART_CONSOLE=n

examples/laundry-washer-app/nxp/zephyr/boards/frdm_rw612_fdata.conf

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2024 Project CHIP Authors
2+
# Copyright (c) 2024-2025 Project CHIP Authors
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -21,6 +21,3 @@ CONFIG_CHIP_DEVICE_PRODUCT_ID=41510
2121
CONFIG_CHIP_DEVICE_PRODUCT_URL="https://www.nxp.com/design/design-center/development-boards-and-designs/general-purpose-mcus/frdm-development-board-for-rw612-wi-fi-6-plus-bluetooth-low-energy-plus-802-15-4-tri-radio-wireless-mcu:FRDM-RW612"
2222
CONFIG_CHIP_DEVICE_PRODUCT_LABEL="RW612"
2323
CONFIG_CHIP_DEVICE_PART_NUMBER="RW612"
24-
25-
# Workaround for nxp-zsdk v4.0.0 release
26-
CONFIG_FLASH_LOAD_SIZE=0

examples/laundry-washer-app/nxp/zephyr/boards/frdm_rw612.conf renamed to examples/laundry-washer-app/nxp/zephyr/prj_release.conf

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2024 Project CHIP Authors
2+
# Copyright (c) 2025 Project CHIP Authors
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -14,5 +14,27 @@
1414
# limitations under the License.
1515
#
1616

17-
# Workaround for nxp-zsdk v4.0.0 release
18-
CONFIG_FLASH_LOAD_SIZE=0
17+
CONFIG_BOOT_BANNER=n
18+
19+
CONFIG_THREAD_NAME=n
20+
CONFIG_MPU_STACK_GUARD=n
21+
22+
CONFIG_ASSERT=n
23+
24+
CONFIG_DEBUG=n
25+
CONFIG_DEBUG_INFO=n
26+
CONFIG_DEBUG_THREAD_INFO=n
27+
28+
CONFIG_CHIP_STATISTICS=n
29+
CONFIG_SIZE_OPTIMIZATIONS_AGGRESSIVE=y
30+
# Additional debug features, user may want to disable some of them
31+
32+
# Shell
33+
# CONFIG_CHIP_LIB_SHELL=n
34+
# CONFIG_SHELL=n
35+
36+
# Console & Logs
37+
# CONFIG_SERIAL=n
38+
# CONFIG_LOG=n
39+
# CONFIG_CONSOLE=n
40+
# CONFIG_UART_CONSOLE=n

examples/thermostat/nxp/zephyr/boards/frdm_rw612_fdata.conf

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2024 Project CHIP Authors
2+
# Copyright (c) 2024-2025 Project CHIP Authors
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -21,6 +21,3 @@ CONFIG_CHIP_DEVICE_PRODUCT_ID=41510
2121
CONFIG_CHIP_DEVICE_PRODUCT_URL="https://www.nxp.com/design/design-center/development-boards-and-designs/general-purpose-mcus/frdm-development-board-for-rw612-wi-fi-6-plus-bluetooth-low-energy-plus-802-15-4-tri-radio-wireless-mcu:FRDM-RW612"
2222
CONFIG_CHIP_DEVICE_PRODUCT_LABEL="RW612"
2323
CONFIG_CHIP_DEVICE_PART_NUMBER="RW612"
24-
25-
# Workaround for nxp-zsdk v4.0.0 release
26-
CONFIG_FLASH_LOAD_SIZE=0

examples/thermostat/nxp/zephyr/boards/frdm_rw612.conf renamed to examples/thermostat/nxp/zephyr/prj_release.conf

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2024 Project CHIP Authors
2+
# Copyright (c) 2025 Project CHIP Authors
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -14,5 +14,27 @@
1414
# limitations under the License.
1515
#
1616

17-
# Workaround for nxp-zsdk v4.0.0 release
18-
CONFIG_FLASH_LOAD_SIZE=0
17+
CONFIG_BOOT_BANNER=n
18+
19+
CONFIG_THREAD_NAME=n
20+
CONFIG_MPU_STACK_GUARD=n
21+
22+
CONFIG_ASSERT=n
23+
24+
CONFIG_DEBUG=n
25+
CONFIG_DEBUG_INFO=n
26+
CONFIG_DEBUG_THREAD_INFO=n
27+
28+
CONFIG_CHIP_STATISTICS=n
29+
CONFIG_SIZE_OPTIMIZATIONS_AGGRESSIVE=y
30+
# Additional debug features, user may want to disable some of them
31+
32+
# Shell
33+
# CONFIG_CHIP_LIB_SHELL=n
34+
# CONFIG_SHELL=n
35+
36+
# Console & Logs
37+
# CONFIG_SERIAL=n
38+
# CONFIG_LOG=n
39+
# CONFIG_CONSOLE=n
40+
# CONFIG_UART_CONSOLE=n

0 commit comments

Comments
 (0)