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

[nrfconnect] Update nRF Connect SDK version to 2.4.0 #27010

Merged
merged 12 commits into from
Jun 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/chef.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build:0.7.3
image: connectedhomeip/chip-build:0.7.16
options: --user root

steps:
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-esp32:0.7.3
image: connectedhomeip/chip-build-esp32:0.7.16
options: --user root

steps:
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-nrf-platform:0.7.3
image: connectedhomeip/chip-build-nrf-platform:0.7.16
options: --user root

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-nrfconnect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-nrf-platform:0.7.3
image: connectedhomeip/chip-build-nrf-platform:0.7.16
kkasperczyk-no marked this conversation as resolved.
Show resolved Hide resolved
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"

Expand Down
2 changes: 1 addition & 1 deletion config/nrfconnect/.nrfconnect-recommended-revision
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.3.0
v2.4.0
15 changes: 7 additions & 8 deletions config/nrfconnect/chip-module/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,16 @@ include(${COMMON_CMAKE_SOURCE_DIR}/chip_gn_args.cmake)
include(${COMMON_CMAKE_SOURCE_DIR}/chip_gn.cmake)

# Prepare compiler flags
matter_add_flags(-D_DEFAULT_SOURCE)

if (CHIP_CFLAGS)
kkasperczyk-no marked this conversation as resolved.
Show resolved Hide resolved
matter_add_flags("${CHIP_CFLAGS}")
endif()

matter_add_flags(-D_POSIX_C_SOURCE=200809)

if (CONFIG_ARM)
matter_add_cflags(--specs=nosys.specs)
endif()

if (CONFIG_POSIX_API)
matter_add_flags(-D_SYS__PTHREADTYPES_H_)
matter_add_flags(-isystem${ZEPHYR_BASE}/include/zephyr/posix)
endif()

if (CONFIG_NORDIC_SECURITY_BACKEND)
zephyr_include_directories($<TARGET_PROPERTY:mbedtls_external,INTERFACE_INCLUDE_DIRECTORIES>)
zephyr_include_directories($<TARGET_PROPERTY:mbedcrypto_common,INTERFACE_INCLUDE_DIRECTORIES>)
Expand Down Expand Up @@ -197,8 +192,12 @@ matter_build(chip
DEVICE_INFO_EXAMPLE_PROVIDER ${CONFIG_CHIP_EXAMPLE_DEVICE_INFO_PROVIDER}
GN_DEPENDENCIES kernel
)

set_property(GLOBAL APPEND PROPERTY ZEPHYR_INTERFACE_LIBS chip)
target_compile_definitions(chip INTERFACE _DEFAULT_SOURCE)
# Enable visibility of POSIX.1-2008 functions, such as strnlen
target_compile_definitions(chip INTERFACE _POSIX_C_SOURCE=200809)
# Make sure that kernel symbols that are only referenced by the Matter libraries are resolved.
target_link_libraries(chip INTERFACE $<TARGET_FILE:kernel>)

if (CONFIG_CHIP_MALLOC_SYS_HEAP_OVERRIDE)
target_link_options(chip INTERFACE
Expand Down
24 changes: 23 additions & 1 deletion config/nrfconnect/chip-module/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ rsource "../../zephyr/Kconfig"

if CHIP

config CHIP_NRF_PLATFORM
bool
default y
help
States that the configuration uses Matter nRF platform,
what can be used to conditionally deviate from Zephyr generic configuration
for nRF platform related purposes.

# See config/zephyr/Kconfig for full definition
config CHIP_DEVICE_VENDOR_NAME
default "Nordic Semiconductor ASA"
Expand Down Expand Up @@ -94,7 +102,7 @@ config CHIP_MALLOC_SYS_HEAP
config CHIP_FACTORY_DATA
bool "Factory data provider"
select ZCBOR
select FPROTECT
imply FPROTECT
help
Enables the default nRF Connect factory data provider implementation that
supports reading the factory data encoded in the CBOR format from the
Expand Down Expand Up @@ -134,6 +142,20 @@ config CHIP_FACTORY_DATA_ROTATING_DEVICE_UID_MAX_LEN
help
Maximum acceptable length of rotating device ID unique ID in bytes.

config CHIP_FACTORY_DATA_WRITE_PROTECT
bool "Enable Factory Data write protection"
select FPROTECT
depends on CHIP_FACTORY_DATA
default y if CHIP_FACTORY_DATA
help
Enables the write protection of the Factory Data partition in the flash memory.
This is a recommended feature, but it requires the Settings partition size to be
a multiple of FPROTECT_BLOCK_SIZE and the Factory Data partition to be placed
right after the application partition in the address space (the Factory Data
partition offset must be equal to the last address of the application partition).
The second requirement is valid only when the FPROTECT_BLOCK_SIZE is bigger than
the flash memory page size.

if CHIP_FACTORY_DATA_BUILD

# Factory data definitions
Expand Down
26 changes: 18 additions & 8 deletions config/nrfconnect/chip-module/Kconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ config CHIP_APP_LOG_LEVEL
default 4 # debug

config LOG_DEFAULT_LEVEL
default 2 # warning
default 1 # error

config CHIP_LOG_SIZE_OPTIMIZATION
default y
Expand All @@ -50,6 +50,12 @@ config PRINTK_SYNC
config ASSERT
default y

config ASSERT_NO_COND_INFO
default y

config ASSERT_NO_MSG_INFO
default y

config HW_STACK_PROTECTION
default y

Expand All @@ -63,9 +69,9 @@ config PTHREAD_IPC
bool
default n

# Generic networking options
config NET_SOCKETS_POSIX_NAMES
default n
config POSIX_MAX_FDS
int
default 16

# Application stack size
config MAIN_STACK_SIZE
Expand Down Expand Up @@ -216,14 +222,18 @@ endif

if CHIP_WIFI

choice WPA_SUPP_LOG_LEVEL_CHOICE
default WPA_SUPP_LOG_LEVEL_ERR
endchoice

config NRF_WIFI_LOW_POWER
default n

config MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG
default n

config SYSTEM_WORKQUEUE_STACK_SIZE
default 2048
default 2560

# align these numbers to match the OpenThread config
config NET_IF_UNICAST_IPV6_ADDR_COUNT
Expand All @@ -232,9 +242,6 @@ config NET_IF_UNICAST_IPV6_ADDR_COUNT
config NET_IF_MCAST_IPV6_ADDR_COUNT
default 8

config NET_SOCKETS_POSIX_NAMES
default n

config NET_SOCKETS_POLL_MAX
default 4

Expand Down Expand Up @@ -436,6 +443,9 @@ endif # SOC_SERIES_NRF52X

if SOC_SERIES_NRF53X

config BOOT_IMAGE_ACCESS_HOOKS
default y

config UPDATEABLE_IMAGE_NUMBER
default 2

Expand Down
83 changes: 71 additions & 12 deletions config/nrfconnect/chip-module/Kconfig.features
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if CHIP

config CHIP_WIFI
bool "Enable nrfconnect Wi-Fi support"
default y if SHIELD_NRF7002_EK || BOARD_NRF7002DK_NRF5340_CPUAPP
default y if SHIELD_NRF7002EK || BOARD_NRF7002DK_NRF5340_CPUAPP
select WIFI_NRF700X
select WIFI
select WPA_SUPP
Expand Down Expand Up @@ -73,29 +73,88 @@ config SPI_NOR_FLASH_LAYOUT_PAGE_SIZE

endif # CHIP_SPI_NOR

config CHIP_NUS
bool "Enable Nordic UART service for Matter purposes"
select BT_NUS
select BT_SMP
select BT_NUS_AUTHEN
help
Enables Nordic UART service (NUS) for Matter samples.
Using NUS service you can control a Matter sample using pre-defined BLE commands
and do defined operations. The CHIP NUS service can be useful to keep communication
with a smart home device when a connection within Matter network is lost.

if CHIP_NUS

# Requires providing a PIN for each pair request
config BT_BONDABLE
default n

config BT_RX_STACK_SIZE
default 1536

config SYSTEM_WORKQUEUE_STACK_SIZE
default 2048

config BT_DEVICE_APPEARANCE
default 833

if !LOG

config BT_FIXED_PASSKEY
default y

endif

config CHIP_NUS_MAX_COMMAND_LEN
int "Maximum length of single command in Bytes"
default 10
help
Maximum length of single command. This command will be send via Bluetooth LE to
a paired smart home device.

config CHIP_NUS_FIXED_PASSKEY
int "Define the default passkey for NUS"
depends on BT_FIXED_PASSKEY
default 123456
help
Define the default password for pairing with the Bluetooth LE device.

config CHIP_NUS_MAX_COMMANDS
int "Define maximum NUS commands amount"
default 2
help
Define the maximum number of NUS commands to declare by user.

endif


config CHIP_DFU_OVER_BT_SMP
bool "Enable DFU over Bluetooth LE SMP feature set"
imply CHIP_QSPI_NOR if BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF52840DK_NRF52840
imply CHIP_SPI_NOR if BOARD_NRF7002DK_NRF5340_CPUAPP
imply BOOTLOADER_MCUBOOT
select MCUMGR
select MCUMGR_SMP_BT
select MCUMGR_CMD_IMG_MGMT
select MCUMGR_CMD_OS_MGMT
select MCUMGR_TRANSPORT_BT
select IMG_MANAGER
select STREAM_FLASH
select ZCBOR
select MCUMGR_GRP_IMG
select MCUMGR_GRP_OS
# Enable custom SMP request to erase settings partition.
select MCUMGR_GRP_ZEPHYR_BASIC
select MCUMGR_GRP_BASIC_CMD_STORAGE_ERASE
select MCUMGR_GRP_ZBASIC
select MCUMGR_GRP_ZBASIC_STORAGE_ERASE
help
Enables Device Firmware Upgrade over Bluetooth LE with SMP and configures
the set of options related to that feature.

if CHIP_DFU_OVER_BT_SMP

# MCU Manager and SMP configuration
config MCUMGR_SMP_BT_AUTHEN
config MCUMGR_TRANSPORT_BT_AUTHEN
default n

config MCUMGR_BUF_COUNT
config MCUMGR_TRANSPORT_NETBUF_COUNT
default 6

config MCUMGR_MGMT_NOTIFICATION_HOOKS
Expand All @@ -117,8 +176,8 @@ config BT_L2CAP_TX_MTU
config BT_BUF_ACL_RX_SIZE
default 502

# Increase MCUMGR_BUF_SIZE, as it must be big enough to fit MAX MTU + overhead and for single-image DFU default is 384 B
config MCUMGR_BUF_SIZE
# Increase MCUMGR_TRANSPORT_NETBUF_SIZE, as it must be big enough to fit MAX MTU + overhead and for single-image DFU default is 384 B
config MCUMGR_TRANSPORT_NETBUF_SIZE
default 1024

# Increase system workqueue size, as SMP is processed within it
Expand All @@ -128,10 +187,10 @@ config SYSTEM_WORKQUEUE_STACK_SIZE
if SOC_SERIES_NRF53X

# Enable custom SMP request to erase settings partition.
config MCUMGR_GRP_ZEPHYR_BASIC
config MCUMGR_GRP_ZBASIC
default y

config MCUMGR_GRP_BASIC_CMD_STORAGE_ERASE
config MCUMGR_GRP_ZBASIC_STORAGE_ERASE
default y

endif # SOC_SERIES_NRF53X
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,5 @@ config EXCEPTION_STACK_TRACE
config NRF_802154_SER_RADIO
default y

config NRF_RTC_TIMER_USER_CHAN_COUNT
default 2

config NRF_802154_ENCRYPTION
default y
3 changes: 2 additions & 1 deletion config/zephyr/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ menuconfig CHIP
imply REQUIRES_FULL_LIBC
imply NEWLIB_LIBC_NANO
imply CBPRINTF_LIBC_SUBSTS
imply POSIX_API if !ARCH_POSIX
Damian-Nordic marked this conversation as resolved.
Show resolved Hide resolved
imply POSIX_API if !ARCH_POSIX && !CHIP_NRF_PLATFORM
imply EVENTFD if !ARCH_POSIX
imply REBOOT
imply ENTROPY_GENERATOR
imply NET_UDP
imply NET_IPV6
imply NET_CONFIG_NEED_IPV6
imply NET_SOCKETS
imply NET_SOCKETS_POSIX_NAMES if !ARCH_POSIX && CHIP_NRF_PLATFORM
imply NETWORKING
imply HWINFO
imply FLASH
Expand Down
14 changes: 7 additions & 7 deletions config/zephyr/chip-module/Kconfig.features
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,23 @@ config MCUMGR
bool
default y

config MCUMGR_CMD_IMG_MGMT
config MCUMGR_GRP_IMG
bool
default y

config MCUMGR_CMD_OS_MGMT
config MCUMGR_GRP_OS
bool
default y

config MCUMGR_SMP_BT
config MCUMGR_TRANSPORT_BT
bool
default y

config MCUMGR_SMP_BT_AUTHEN
config MCUMGR_TRANSPORT_BT_AUTHEN
bool
default n

config MCUMGR_BUF_COUNT
config MCUMGR_TRANSPORT_NETBUF_COUNT
int
default 6

Expand All @@ -53,8 +53,8 @@ config BT_BUF_ACL_RX_SIZE
int
default 502

# Increase MCUMGR_BUF_SIZE, as it must be big enough to fit MAX MTU + overhead and for single-image DFU default is 384 B
config MCUMGR_BUF_SIZE
# Increase MCUMGR_TRANSPORT_NETBUF_SIZE, as it must be big enough to fit MAX MTU + overhead and for single-image DFU default is 384 B
config MCUMGR_TRANSPORT_NETBUF_SIZE
int
default 1024

Expand Down
Loading