From e47e0e6069f9b2b57a79e434bd7bdcecc57dce9b Mon Sep 17 00:00:00 2001 From: Mateusz Michalek Date: Wed, 27 May 2026 15:37:07 +0200 Subject: [PATCH 1/4] mgmt: mcumgr: transport: move serial_util moves files from zephyr Signed-off-by: Mateusz Michalek --- scripts/ci/license_allow_list.yaml | 2 + subsys/mgmt/mcumgr/transport/CMakeLists.txt | 2 +- subsys/mgmt/mcumgr/transport/include/serial.h | 113 +++++ .../mgmt/mcumgr/transport/src/serial_util.c | 389 ++++++++++++++++++ 4 files changed, 505 insertions(+), 1 deletion(-) create mode 100644 subsys/mgmt/mcumgr/transport/include/serial.h create mode 100644 subsys/mgmt/mcumgr/transport/src/serial_util.c diff --git a/scripts/ci/license_allow_list.yaml b/scripts/ci/license_allow_list.yaml index de822aa755..d0360b838a 100644 --- a/scripts/ci/license_allow_list.yaml +++ b/scripts/ci/license_allow_list.yaml @@ -61,8 +61,10 @@ Apache-2.0: | ^nrf-bm/subsys/mgmt/mcumgr/smp/CMakeLists.txt ^nrf-bm/subsys/mgmt/mcumgr/smp/Kconfig ^nrf-bm/subsys/mgmt/mcumgr/transport/CMakeLists.txt + ^nrf-bm/subsys/mgmt/mcumgr/transport/include/serial.h ^nrf-bm/subsys/mgmt/mcumgr/transport/Kconfig ^nrf-bm/subsys/mgmt/mcumgr/transport/src/bm_uart_mcumgr.c + ^nrf-bm/subsys/mgmt/mcumgr/transport/src/serial_util.c ^nrf-bm/subsys/mgmt/mcumgr/transport/src/smp_uart.c ^nrf-bm/subsys/mgmt/mcumgr/transport/src/smp.c ^nrf-bm/subsys/mgmt/mcumgr/util/CMakeLists.txt diff --git a/subsys/mgmt/mcumgr/transport/CMakeLists.txt b/subsys/mgmt/mcumgr/transport/CMakeLists.txt index bbcea05eda..b2f854c35a 100644 --- a/subsys/mgmt/mcumgr/transport/CMakeLists.txt +++ b/subsys/mgmt/mcumgr/transport/CMakeLists.txt @@ -17,7 +17,7 @@ zephyr_library_sources_ifdef(CONFIG_MCUMGR_TRANSPORT_REASSEMBLY zephyr_library_sources_ifdef(CONFIG_MCUMGR_TRANSPORT_BM_UART src/smp_uart.c src/bm_uart_mcumgr.c - ${ZEPHYR_BASE}/subsys/mgmt/mcumgr/transport/src/serial_util.c + src/serial_util.c ) zephyr_include_directories(${ZEPHYR_BASE}/subsys/mgmt/mcumgr/transport/include include) diff --git a/subsys/mgmt/mcumgr/transport/include/serial.h b/subsys/mgmt/mcumgr/transport/include/serial.h new file mode 100644 index 0000000000..b0a7a52241 --- /dev/null +++ b/subsys/mgmt/mcumgr/transport/include/serial.h @@ -0,0 +1,113 @@ +/* + * Copyright Runtime.io 2018. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#ifndef ZEPHYR_INCLUDE_MGMT_SERIAL_H_ +#define ZEPHYR_INCLUDE_MGMT_SERIAL_H_ + +/** + * @brief This allows to use the MCUmgr SMP protocol over serial. + * @defgroup mcumgr_transport_serial Serial transport + * @ingroup mcumgr_transport + * @{ + */ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** Serial packet header */ +#define MCUMGR_SERIAL_HDR_PKT 0x0609 +/** Serial fragment header */ +#define MCUMGR_SERIAL_HDR_FRAG 0x0414 +/** Maximum frame size */ +#define MCUMGR_SERIAL_MAX_FRAME 127 + +/** First byte of packet header */ +#define MCUMGR_SERIAL_HDR_PKT_1 (MCUMGR_SERIAL_HDR_PKT >> 8) +/** Second byte of packet header */ +#define MCUMGR_SERIAL_HDR_PKT_2 (MCUMGR_SERIAL_HDR_PKT & 0xff) +/** First byte of fragment header */ +#define MCUMGR_SERIAL_HDR_FRAG_1 (MCUMGR_SERIAL_HDR_FRAG >> 8) +/** Second byte of fragment header */ +#define MCUMGR_SERIAL_HDR_FRAG_2 (MCUMGR_SERIAL_HDR_FRAG & 0xff) + +/** + * @brief Maintains state for an incoming mcumgr request packet. + */ +struct mcumgr_serial_rx_ctxt { + /** Contains the partially- or fully-received mcumgr request. Data + * stored in this buffer has already been base64-decoded. + */ + struct net_buf *nb; + + /** Length of full packet, as read from header. */ + uint16_t pkt_len; + +#if defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_SMP_OVER_CONSOLE) && \ + defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_RAW_BINARY_NON_SMP_OVER_CONSOLE) + /** + * Set to true by transports which use raw MCUmgr over UART (not SMP over console) to know + * not to deal with the extra base64 etc. processing. + */ + const bool raw_transport; +#endif +}; + +/** @typedef mcumgr_serial_tx_cb + * @brief Transmits a chunk of raw response data. + * + * @param data The data to transmit. + * @param len The number of bytes to transmit. + * + * @return 0 on success; negative error code on failure. + */ +typedef int (*mcumgr_serial_tx_cb)(const void *data, int len); + +/** + * @brief Processes an mcumgr request fragment received over a serial + * transport. + * + * Processes an mcumgr request fragment received over a serial transport. If + * the fragment is the end of a valid mcumgr request, this function returns a + * net_buf containing the decoded request. It is the caller's responsibility + * to free the net_buf after it has been processed. + * + * @param rx_ctxt The receive context associated with the serial + * transport being used. + * @param frag The incoming fragment to process. + * @param frag_len The length of the fragment, in bytes. + * + * @return A net_buf containing the decoded request if a + * complete and valid request has been + * received. + * NULL if the packet is incomplete or invalid. + */ +struct net_buf *mcumgr_serial_process_frag( + struct mcumgr_serial_rx_ctxt *rx_ctxt, + const uint8_t *frag, int frag_len); + +/** + * @brief Encodes and transmits an mcumgr packet over serial. + * + * @param data The mcumgr packet data to send. + * @param len The length of the unencoded mcumgr packet. + * @param cb A callback used to transmit raw bytes. + * + * @return 0 on success; negative error code on failure. + */ +int mcumgr_serial_tx_pkt(const uint8_t *data, int len, mcumgr_serial_tx_cb cb); + +#ifdef __cplusplus +} +#endif + +/** + * @} + */ + +#endif diff --git a/subsys/mgmt/mcumgr/transport/src/serial_util.c b/subsys/mgmt/mcumgr/transport/src/serial_util.c new file mode 100644 index 0000000000..14dfa62d59 --- /dev/null +++ b/subsys/mgmt/mcumgr/transport/src/serial_util.c @@ -0,0 +1,389 @@ +/* + * Copyright Runtime.io 2018. All rights reserved. + * Copyright (c) 2021-2026 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_RAW_BINARY_NON_SMP_OVER_CONSOLE) +#include +#endif + +static void mcumgr_serial_free_rx_ctxt(struct mcumgr_serial_rx_ctxt *rx_ctxt) +{ + if (rx_ctxt->nb != NULL) { + smp_packet_free(rx_ctxt->nb); + rx_ctxt->nb = NULL; + } +} + +#if defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_SMP_OVER_CONSOLE) +static uint16_t mcumgr_serial_calc_crc(const uint8_t *data, int len) +{ + return crc16_itu_t(0x0000, data, len); +} + +static int mcumgr_serial_extract_len(struct mcumgr_serial_rx_ctxt *rx_ctxt) +{ + if (rx_ctxt->nb->len < 2) { + return -EINVAL; + } + + rx_ctxt->pkt_len = net_buf_pull_be16(rx_ctxt->nb); + return 0; +} + +static int mcumgr_serial_decode_frag(struct mcumgr_serial_rx_ctxt *rx_ctxt, + const uint8_t *frag, int frag_len) +{ + size_t dec_len; + int rc; + + rc = base64_decode(rx_ctxt->nb->data + rx_ctxt->nb->len, + net_buf_tailroom(rx_ctxt->nb), &dec_len, + frag, frag_len); + if (rc != 0) { + return -EINVAL; + } + + rx_ctxt->nb->len += dec_len; + + return 0; +} +#endif + +#if defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_RAW_BINARY_NON_SMP_OVER_CONSOLE) +static inline bool mcumgr_serial_process_frag_raw(struct mcumgr_serial_rx_ctxt *rx_ctxt, + const uint8_t *frag, int frag_len, + struct smp_hdr *rec_hdr) +{ + uint16_t total_size; + + net_buf_add_mem(rx_ctxt->nb, frag, frag_len); + + if (rx_ctxt->nb->len < sizeof(struct smp_hdr)) { + /* Missing header */ + return false; + } + + /* + * Perform some basic cursory checks to ensure some fields of the packet are + * actually valid. + */ + rec_hdr = (struct smp_hdr *)rx_ctxt->nb->data; + total_size = sys_be16_to_cpu(rec_hdr->nh_len) + sizeof(struct smp_hdr); + + if (total_size > CONFIG_MCUMGR_TRANSPORT_NETBUF_SIZE) { + /* Payload is longer than the maximum supported MTU. */ + mcumgr_serial_free_rx_ctxt(rx_ctxt); + return false; + } else if (rec_hdr->nh_op >= MGMT_OP_COUNT) { + /* Unknown op-code, likely not a valid MCUmgr message. */ + mcumgr_serial_free_rx_ctxt(rx_ctxt); + return false; + } else if (rx_ctxt->nb->len < total_size) { + /* More fragments expected. */ + return false; + } else if (rx_ctxt->nb->len > total_size) { + /* Payload longer than indicated in header. */ + mcumgr_serial_free_rx_ctxt(rx_ctxt); + return false; + } + + return true; +} +#endif + +/** + * Processes a received mcumgr frame. + * + * @return true if a complete packet was received; + * false if the frame is invalid or if additional + * fragments are expected. + */ +struct net_buf *mcumgr_serial_process_frag(struct mcumgr_serial_rx_ctxt *rx_ctxt, + const uint8_t *frag, int frag_len) +{ + struct net_buf *nb; + +#if defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_SMP_OVER_CONSOLE) + int rc; + uint16_t crc; + uint16_t op; +#endif +#if defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_RAW_BINARY_NON_SMP_OVER_CONSOLE) + struct smp_hdr *rec_hdr; +#endif + + if (rx_ctxt->nb == NULL) { + rx_ctxt->nb = smp_packet_alloc(); + net_buf_reset(rx_ctxt->nb); + if (rx_ctxt->nb == NULL) { + return NULL; + } + } + +#if defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_SMP_OVER_CONSOLE) && \ + defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_RAW_BINARY_NON_SMP_OVER_CONSOLE) + if (rx_ctxt->raw_transport == true) { +#endif +#if defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_RAW_BINARY_NON_SMP_OVER_CONSOLE) + if (mcumgr_serial_process_frag_raw(rx_ctxt, frag, frag_len, rec_hdr) == false) { + return NULL; + } +#endif +#if defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_SMP_OVER_CONSOLE) && \ + defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_RAW_BINARY_NON_SMP_OVER_CONSOLE) + } else { +#endif +#if defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_SMP_OVER_CONSOLE) + if (frag_len < sizeof(op)) { + return NULL; + } + + op = sys_be16_to_cpu(*(uint16_t *)frag); + switch (op) { + case MCUMGR_SERIAL_HDR_PKT: + net_buf_reset(rx_ctxt->nb); + break; + + case MCUMGR_SERIAL_HDR_FRAG: + if (rx_ctxt->nb->len == 0U) { + mcumgr_serial_free_rx_ctxt(rx_ctxt); + return NULL; + } + break; + + default: + return NULL; + } + + rc = mcumgr_serial_decode_frag(rx_ctxt, + frag + sizeof(op), + frag_len - sizeof(op)); + if (rc != 0) { + mcumgr_serial_free_rx_ctxt(rx_ctxt); + return NULL; + } + + if (op == MCUMGR_SERIAL_HDR_PKT) { + rc = mcumgr_serial_extract_len(rx_ctxt); + if (rc < 0) { + mcumgr_serial_free_rx_ctxt(rx_ctxt); + return NULL; + } + } + + if (rx_ctxt->nb->len < rx_ctxt->pkt_len) { + /* More fragments expected. */ + return NULL; + } else if (rx_ctxt->nb->len > rx_ctxt->pkt_len) { + /* Payload longer than indicated in header. */ + mcumgr_serial_free_rx_ctxt(rx_ctxt); + return NULL; + } + + crc = mcumgr_serial_calc_crc(rx_ctxt->nb->data, rx_ctxt->nb->len); + if (crc != 0U) { + mcumgr_serial_free_rx_ctxt(rx_ctxt); + return NULL; + } + + /* Packet is complete; strip the CRC. */ + rx_ctxt->nb->len -= 2U; +#endif +#if defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_SMP_OVER_CONSOLE) && \ + defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_RAW_BINARY_NON_SMP_OVER_CONSOLE) + } +#endif + + nb = rx_ctxt->nb; + rx_ctxt->nb = NULL; + return nb; +} + +#if defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_SMP_OVER_CONSOLE) +/** + * Base64-encodes a small chunk of data and transmits it. The data must be no larger than three + * bytes. + */ +static int mcumgr_serial_tx_small(const void *data, int len, mcumgr_serial_tx_cb cb) +{ + uint8_t b64[4 + 1]; /* +1 required for null terminator. */ + size_t dst_len; + int rc; + + rc = base64_encode(b64, sizeof(b64), &dst_len, data, len); + __ASSERT_NO_MSG(rc == 0); + __ASSERT_NO_MSG(dst_len == 4); + + return cb(b64, 4); +} + +/** + * @brief Transmits a single mcumgr packet over serial, splits into multiple frames as needed. + * + * @param data The packet payload to transmit. This does not include a header or + * CRC. + * @param len The size of the packet payload. + * @param cb A callback used for transmitting raw data. + * + * @return 0 on success; negative error code on failure. + */ +int mcumgr_serial_tx_pkt(const uint8_t *data, int len, mcumgr_serial_tx_cb cb) +{ + bool first = true; + bool last = false; + uint8_t raw[3]; + uint16_t u16; + uint16_t crc; + int src_off = 0; + int rc = 0; + int to_process; + int reminder; + + /* + * This is max input bytes that can be taken to the frame before encoding with Base64; + * Base64 has three-to-four ratio, which means that for each three input bytes there are + * going to be four bytes of output used. The frame starts with two byte marker and ends + * with newline character, which are not encoded (this is the "-3" in calculation). + */ + int max_input = (((MCUMGR_SERIAL_MAX_FRAME - 3) >> 2) * 3); + + /* Calculate the CRC16 checksum of the whole packet, prior to splitting it into frames */ + crc = mcumgr_serial_calc_crc(data, len); + + /* First frame marker */ + u16 = sys_cpu_to_be16(MCUMGR_SERIAL_HDR_PKT); + + while (src_off < len) { + /* Send first frame or continuation frame marker */ + rc = cb(&u16, sizeof(u16)); + if (rc != 0) { + return rc; + } + + /* + * Only the first fragment contains the packet length; the packet length, which is + * two byte long is paired with first byte of input buffer to form triplet for + * Base64 encoding. + */ + if (first) { + /* The size of the CRC16 should be added to packet length */ + u16 = sys_cpu_to_be16(len + 2); + memcpy(raw, &u16, sizeof(u16)); + raw[2] = data[0]; + + rc = mcumgr_serial_tx_small(raw, 3, cb); + if (rc != 0) { + return rc; + } + + ++src_off; + /* One triple of allowed input already used */ + max_input -= 3; + } + + /* + * Only as much as fits into the frame can be processed, but we also need to fit + * in the two byte CRC. The frame can not be stretched and current logic does not + * allow to send CRC separately so if CRC would not fit as a whole, shrink + * to_process by one byte forcing one byte to the next frame, with the CRC. + */ + to_process = MIN(max_input, len - src_off); + reminder = max_input - (len - src_off); + + if (reminder == 0 || reminder == 1) { + to_process -= 1; + + /* This is the last frame but the checksum cannot be added, remove the + * last packet flag until the function runs again with the final piece of + * data and place the checksum there + */ + last = false; + } else if (reminder >= 2) { + last = true; + } + + /* + * Try to process input buffer by chunks of three bytes that will be output as + * four byte chunks, due to Base64 encoding; the number of chunks that can be + * processed is calculated from number of three byte, complete, chunks in input + * buffer, but can not be greater than the number of four byte, complete, chunks + * that the frame can accept. + */ + while (to_process >= 3) { + memcpy(raw, data + src_off, 3); + rc = mcumgr_serial_tx_small(raw, 3, cb); + if (rc != 0) { + return rc; + } + src_off += 3; + to_process -= 3; + } + + if (last) { + /* + * Process the reminder bytes of the input buffer, after sending it in + * three byte chunks, and CRC. + */ + switch (len - src_off) { + case 0: + raw[0] = (crc & 0xff00) >> 8; + raw[1] = crc & 0x00ff; + rc = mcumgr_serial_tx_small(raw, 2, cb); + break; + + case 1: + raw[0] = data[src_off++]; + + raw[1] = (crc & 0xff00) >> 8; + raw[2] = crc & 0x00ff; + rc = mcumgr_serial_tx_small(raw, 3, cb); + break; + + case 2: + raw[0] = data[src_off++]; + raw[1] = data[src_off++]; + + raw[2] = (crc & 0xff00) >> 8; + rc = mcumgr_serial_tx_small(raw, 3, cb); + if (rc != 0) { + return rc; + } + + raw[0] = crc & 0x00ff; + rc = mcumgr_serial_tx_small(raw, 1, cb); + break; + } + + if (rc != 0) { + return rc; + } + } + + rc = cb("\n", 1); + if (rc != 0) { + return rc; + } + + /* Use a continuation frame marker for the next packet */ + u16 = sys_cpu_to_be16(MCUMGR_SERIAL_HDR_FRAG); + first = false; + } + + return 0; +} +#endif From de13ba58b308a3383d47a35360c4938e9d08d83f Mon Sep 17 00:00:00 2001 From: Mateusz Michalek Date: Thu, 28 May 2026 11:47:36 +0200 Subject: [PATCH 2/4] mgmt: mcumgr: serial transport rework cuts down some unused Kconfigs Signed-off-by: Mateusz Michalek --- subsys/mgmt/mcumgr/transport/include/serial.h | 8 - .../mgmt/mcumgr/transport/src/serial_util.c | 155 +++++------------- 2 files changed, 41 insertions(+), 122 deletions(-) diff --git a/subsys/mgmt/mcumgr/transport/include/serial.h b/subsys/mgmt/mcumgr/transport/include/serial.h index b0a7a52241..e85501712b 100644 --- a/subsys/mgmt/mcumgr/transport/include/serial.h +++ b/subsys/mgmt/mcumgr/transport/include/serial.h @@ -48,14 +48,6 @@ struct mcumgr_serial_rx_ctxt { /** Length of full packet, as read from header. */ uint16_t pkt_len; -#if defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_SMP_OVER_CONSOLE) && \ - defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_RAW_BINARY_NON_SMP_OVER_CONSOLE) - /** - * Set to true by transports which use raw MCUmgr over UART (not SMP over console) to know - * not to deal with the extra base64 etc. processing. - */ - const bool raw_transport; -#endif }; /** @typedef mcumgr_serial_tx_cb diff --git a/subsys/mgmt/mcumgr/transport/src/serial_util.c b/subsys/mgmt/mcumgr/transport/src/serial_util.c index 14dfa62d59..7fb2a65ac8 100644 --- a/subsys/mgmt/mcumgr/transport/src/serial_util.c +++ b/subsys/mgmt/mcumgr/transport/src/serial_util.c @@ -15,11 +15,7 @@ #include #include #include -#include - -#if defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_RAW_BINARY_NON_SMP_OVER_CONSOLE) -#include -#endif +#include static void mcumgr_serial_free_rx_ctxt(struct mcumgr_serial_rx_ctxt *rx_ctxt) { @@ -29,7 +25,6 @@ static void mcumgr_serial_free_rx_ctxt(struct mcumgr_serial_rx_ctxt *rx_ctxt) } } -#if defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_SMP_OVER_CONSOLE) static uint16_t mcumgr_serial_calc_crc(const uint8_t *data, int len) { return crc16_itu_t(0x0000, data, len); @@ -62,49 +57,7 @@ static int mcumgr_serial_decode_frag(struct mcumgr_serial_rx_ctxt *rx_ctxt, return 0; } -#endif - -#if defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_RAW_BINARY_NON_SMP_OVER_CONSOLE) -static inline bool mcumgr_serial_process_frag_raw(struct mcumgr_serial_rx_ctxt *rx_ctxt, - const uint8_t *frag, int frag_len, - struct smp_hdr *rec_hdr) -{ - uint16_t total_size; - net_buf_add_mem(rx_ctxt->nb, frag, frag_len); - - if (rx_ctxt->nb->len < sizeof(struct smp_hdr)) { - /* Missing header */ - return false; - } - - /* - * Perform some basic cursory checks to ensure some fields of the packet are - * actually valid. - */ - rec_hdr = (struct smp_hdr *)rx_ctxt->nb->data; - total_size = sys_be16_to_cpu(rec_hdr->nh_len) + sizeof(struct smp_hdr); - - if (total_size > CONFIG_MCUMGR_TRANSPORT_NETBUF_SIZE) { - /* Payload is longer than the maximum supported MTU. */ - mcumgr_serial_free_rx_ctxt(rx_ctxt); - return false; - } else if (rec_hdr->nh_op >= MGMT_OP_COUNT) { - /* Unknown op-code, likely not a valid MCUmgr message. */ - mcumgr_serial_free_rx_ctxt(rx_ctxt); - return false; - } else if (rx_ctxt->nb->len < total_size) { - /* More fragments expected. */ - return false; - } else if (rx_ctxt->nb->len > total_size) { - /* Payload longer than indicated in header. */ - mcumgr_serial_free_rx_ctxt(rx_ctxt); - return false; - } - - return true; -} -#endif /** * Processes a received mcumgr frame. @@ -118,14 +71,9 @@ struct net_buf *mcumgr_serial_process_frag(struct mcumgr_serial_rx_ctxt *rx_ctxt { struct net_buf *nb; -#if defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_SMP_OVER_CONSOLE) int rc; uint16_t crc; uint16_t op; -#endif -#if defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_RAW_BINARY_NON_SMP_OVER_CONSOLE) - struct smp_hdr *rec_hdr; -#endif if (rx_ctxt->nb == NULL) { rx_ctxt->nb = smp_packet_alloc(); @@ -135,86 +83,66 @@ struct net_buf *mcumgr_serial_process_frag(struct mcumgr_serial_rx_ctxt *rx_ctxt } } -#if defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_SMP_OVER_CONSOLE) && \ - defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_RAW_BINARY_NON_SMP_OVER_CONSOLE) - if (rx_ctxt->raw_transport == true) { -#endif -#if defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_RAW_BINARY_NON_SMP_OVER_CONSOLE) - if (mcumgr_serial_process_frag_raw(rx_ctxt, frag, frag_len, rec_hdr) == false) { - return NULL; - } -#endif -#if defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_SMP_OVER_CONSOLE) && \ - defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_RAW_BINARY_NON_SMP_OVER_CONSOLE) - } else { -#endif -#if defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_SMP_OVER_CONSOLE) - if (frag_len < sizeof(op)) { - return NULL; - } - - op = sys_be16_to_cpu(*(uint16_t *)frag); - switch (op) { - case MCUMGR_SERIAL_HDR_PKT: - net_buf_reset(rx_ctxt->nb); - break; - - case MCUMGR_SERIAL_HDR_FRAG: - if (rx_ctxt->nb->len == 0U) { - mcumgr_serial_free_rx_ctxt(rx_ctxt); - return NULL; - } - break; + if (frag_len < sizeof(op)) { + return NULL; + } - default: - return NULL; - } + op = sys_be16_to_cpu(*(uint16_t *)frag); + switch (op) { + case MCUMGR_SERIAL_HDR_PKT: + net_buf_reset(rx_ctxt->nb); + break; - rc = mcumgr_serial_decode_frag(rx_ctxt, - frag + sizeof(op), - frag_len - sizeof(op)); - if (rc != 0) { + case MCUMGR_SERIAL_HDR_FRAG: + if (rx_ctxt->nb->len == 0U) { mcumgr_serial_free_rx_ctxt(rx_ctxt); return NULL; } + break; - if (op == MCUMGR_SERIAL_HDR_PKT) { - rc = mcumgr_serial_extract_len(rx_ctxt); - if (rc < 0) { - mcumgr_serial_free_rx_ctxt(rx_ctxt); - return NULL; - } - } + default: + return NULL; + } - if (rx_ctxt->nb->len < rx_ctxt->pkt_len) { - /* More fragments expected. */ - return NULL; - } else if (rx_ctxt->nb->len > rx_ctxt->pkt_len) { - /* Payload longer than indicated in header. */ - mcumgr_serial_free_rx_ctxt(rx_ctxt); - return NULL; - } + rc = mcumgr_serial_decode_frag(rx_ctxt, + frag + sizeof(op), + frag_len - sizeof(op)); + if (rc != 0) { + mcumgr_serial_free_rx_ctxt(rx_ctxt); + return NULL; + } - crc = mcumgr_serial_calc_crc(rx_ctxt->nb->data, rx_ctxt->nb->len); - if (crc != 0U) { + if (op == MCUMGR_SERIAL_HDR_PKT) { + rc = mcumgr_serial_extract_len(rx_ctxt); + if (rc < 0) { mcumgr_serial_free_rx_ctxt(rx_ctxt); return NULL; } + } + + if (rx_ctxt->nb->len < rx_ctxt->pkt_len) { + /* More fragments expected. */ + return NULL; + } else if (rx_ctxt->nb->len > rx_ctxt->pkt_len) { + /* Payload longer than indicated in header. */ + mcumgr_serial_free_rx_ctxt(rx_ctxt); + return NULL; + } + + crc = mcumgr_serial_calc_crc(rx_ctxt->nb->data, rx_ctxt->nb->len); + if (crc != 0U) { + mcumgr_serial_free_rx_ctxt(rx_ctxt); + return NULL; + } /* Packet is complete; strip the CRC. */ rx_ctxt->nb->len -= 2U; -#endif -#if defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_SMP_OVER_CONSOLE) && \ - defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_RAW_BINARY_NON_SMP_OVER_CONSOLE) - } -#endif nb = rx_ctxt->nb; rx_ctxt->nb = NULL; return nb; } -#if defined(CONFIG_MCUMGR_TRANSPORT_SERIAL_HAS_SMP_OVER_CONSOLE) /** * Base64-encodes a small chunk of data and transmits it. The data must be no larger than three * bytes. @@ -386,4 +314,3 @@ int mcumgr_serial_tx_pkt(const uint8_t *data, int len, mcumgr_serial_tx_cb cb) return 0; } -#endif From 735da08b73e572cd471b2c1366d0c57f6e38d5fd Mon Sep 17 00:00:00 2001 From: Mateusz Michalek Date: Wed, 3 Jun 2026 12:38:27 +0200 Subject: [PATCH 3/4] application: installer: add flash padding allignes writes to CONFIG_DT_FLASH_WRITE_BLOCK_SIZE Signed-off-by: Mateusz Michalek --- applications/installer/src/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/applications/installer/src/main.c b/applications/installer/src/main.c index 4ba038f990..44baf3e6b8 100644 --- a/applications/installer/src/main.c +++ b/applications/installer/src/main.c @@ -198,6 +198,10 @@ int main(void) } #endif + int pad = CONFIG_DT_FLASH_WRITE_BLOCK_SIZE - (process_size % CONFIG_DT_FLASH_WRITE_BLOCK_SIZE); + + process_size += pad; + rc = flash_area_write(&fa, pos, (void *)read_pos, process_size); if (rc) { @@ -218,7 +222,7 @@ int main(void) "V_DELAY_IMAGE_CHUNK_COPY"); } - ++i; + i-=-1; if (i < CONFIG_BM_INSTALL_IMAGES) { VERIFICATION_DELAY(CONFIG_APP_BM_INSTALLER_NEXT_IMAGE_COPY_DELAY_MS, From 334b15d84566caf15db02749a5632e661541b67d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eivind=20J=C3=B8lsgard?= Date: Tue, 19 May 2026 13:17:56 +0200 Subject: [PATCH 4/4] manifest: update sdk-nrf to v3.4.0-rc1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update sdk-nrf to v3.4.0-rc1. Replace CONFIG_NRF_SECUROTY with CONFIG_PSA_CRYPTO. Updated number of required board qualifiers to 3. Update to use mapped-partition in DTS. Workaround for SHELL_STACK_SIZE. Signed-off-by: Eivind Jølsgard --- .github/workflows/build_samples.yml | 2 +- .github/workflows/twister.yml | 2 +- applications/firmware_loader/ble_mcumgr/prj.conf | 2 +- applications/installer/src/main.c | 6 ++++-- ...rf54l15dk_nrf54l05_cpuapp_s115_softdevice.dts | 8 ++++++-- ...k_nrf54l05_cpuapp_s115_softdevice_mcuboot.dts | 11 +++++++++-- ...rf54l15dk_nrf54l05_cpuapp_s145_softdevice.dts | 8 ++++++-- ...k_nrf54l05_cpuapp_s145_softdevice_mcuboot.dts | 11 +++++++++-- ...rf54l15dk_nrf54l10_cpuapp_s115_softdevice.dts | 8 ++++++-- ...k_nrf54l10_cpuapp_s115_softdevice_mcuboot.dts | 11 +++++++++-- ...rf54l15dk_nrf54l10_cpuapp_s145_softdevice.dts | 8 ++++++-- ...k_nrf54l10_cpuapp_s145_softdevice_mcuboot.dts | 11 +++++++++-- ...rf54l15dk_nrf54l15_cpuapp_s115_softdevice.dts | 7 +++++-- ...k_nrf54l15_cpuapp_s115_softdevice_mcuboot.dts | 11 +++++++++-- ...rf54l15dk_nrf54l15_cpuapp_s145_softdevice.dts | 8 ++++++-- ...k_nrf54l15_cpuapp_s145_softdevice_mcuboot.dts | 11 +++++++++-- boards/nordic/bm_nrf54l15dk/sysbuild.cmake | 3 +-- ...4lm20dk_nrf54lm20a_cpuapp_s115_softdevice.dts | 8 ++++++-- ...nrf54lm20a_cpuapp_s115_softdevice_mcuboot.dts | 11 +++++++++-- ...4lm20dk_nrf54lm20a_cpuapp_s145_softdevice.dts | 8 ++++++-- ...nrf54lm20a_cpuapp_s145_softdevice_mcuboot.dts | 11 +++++++++-- boards/nordic/bm_nrf54lm20dk/sysbuild.cmake | 2 +- ...4ls05dk_nrf54ls05b_cpuapp_s115_softdevice.dts | 8 ++++++-- ...nrf54ls05b_cpuapp_s115_softdevice_mcuboot.dts | 11 +++++++++-- ...4ls05dk_nrf54ls05b_cpuapp_s145_softdevice.dts | 8 ++++++-- ...nrf54ls05b_cpuapp_s145_softdevice_mcuboot.dts | 11 +++++++++-- boards/nordic/bm_nrf54ls05dk/sysbuild.cmake | 2 +- ...4lv10dk_nrf54lv10a_cpuapp_s115_softdevice.dts | 8 ++++++-- ...nrf54lv10a_cpuapp_s115_softdevice_mcuboot.dts | 11 +++++++++-- ...nrf54lv10a_cpuapp_s145_softdevice_mcuboot.dts | 11 +++++++++-- boards/nordic/bm_nrf54lv10dk/sysbuild.cmake | 2 +- cmake/sysbuild/image_signing_installer.cmake | 8 ++++++-- doc/nrf-bm/app_dev/dfu/ug_dfu.rst | 11 +++++++++-- doc/nrf-bm/libraries/bluetooth/peer_manager.rst | 2 +- .../peer_manager/modules/peer_data_storage.c | 6 +++--- samples/bluetooth/ble_bms/prj.conf | 2 +- samples/bluetooth/ble_cgms/prj.conf | 2 +- samples/bluetooth/ble_hids_keyboard/prj.conf | 2 +- samples/bluetooth/ble_hids_mouse/prj.conf | 2 +- samples/bluetooth/ble_hrs/prj.conf | 2 +- samples/bluetooth/ble_hrs_central/prj.conf | 2 +- samples/bluetooth/ble_lbs/prj.conf | 2 +- samples/bluetooth/ble_nus/prj.conf | 2 +- samples/bluetooth/ble_nus_central/prj.conf | 2 +- samples/bluetooth/ble_pwr_profiling/prj.conf | 2 +- .../bluetooth/ble_radio_notification/prj.conf | 2 +- samples/bluetooth/hello_softdevice/prj.conf | 2 +- .../bluetooth/peripheral_nfc_pairing/prj.conf | 2 +- samples/boot/mcuboot_recovery_entry/prj.conf | 2 +- samples/subsys/fs/bm_zms/prj.conf | 2 +- samples/subsys/fs/bm_zms/src/main.c | 6 +++--- samples/subsys/storage/bm_storage/prj.conf | 2 +- samples/subsys/storage/bm_storage/src/main.c | 6 +++--- subsys/bm_installs/src/bm_installs.c | 16 ++++++++-------- .../mgmt/mcumgr/grp/img_mgmt/src/bm_img_mgmt.c | 8 ++++---- subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c | 10 ++++++---- subsys/shell/backends/Kconfig.bm_uarte | 8 ++++++++ subsys/softdevice_handler/Kconfig | 2 +- subsys/softdevice_handler/irq_connect.c | 2 +- subsys/softdevice_handler/nrf_sdh.c | 2 +- subsys/storage/flash_map/flash_map_mcumgr.c | 8 ++++---- sysbuild/CMakeLists.txt | 4 ++-- tests/subsys/fs/bm_zms/src/main.c | 4 ++-- west.yml | 2 +- 64 files changed, 263 insertions(+), 114 deletions(-) diff --git a/.github/workflows/build_samples.yml b/.github/workflows/build_samples.yml index fb24d0332c..410d1b6af7 100644 --- a/.github/workflows/build_samples.yml +++ b/.github/workflows/build_samples.yml @@ -16,7 +16,7 @@ jobs: - runs-on=${{ github.run_id }} - runner=64cpu-linux-x64 # Keep aligned with target NCS version - container: ghcr.io/nrfconnect/sdk-nrf-toolchain:v3.2.0 + container: ghcr.io/nrfconnect/sdk-nrf-toolchain:v3.4.0-rc1 defaults: run: # Bash shell is needed to set toolchain related environment variables in docker container diff --git a/.github/workflows/twister.yml b/.github/workflows/twister.yml index 650b466585..78be898851 100644 --- a/.github/workflows/twister.yml +++ b/.github/workflows/twister.yml @@ -13,7 +13,7 @@ jobs: - runs-on=${{ github.run_id }} - runner=64cpu-linux-x64 # Keep aligned with target NCS version - container: ghcr.io/nrfconnect/sdk-nrf-toolchain:v3.3.0 + container: ghcr.io/nrfconnect/sdk-nrf-toolchain:v3.4.0-rc1 defaults: run: # Bash shell is needed to set toolchain related environment variables in docker container diff --git a/applications/firmware_loader/ble_mcumgr/prj.conf b/applications/firmware_loader/ble_mcumgr/prj.conf index 54de856684..b043256294 100644 --- a/applications/firmware_loader/ble_mcumgr/prj.conf +++ b/applications/firmware_loader/ble_mcumgr/prj.conf @@ -39,7 +39,7 @@ CONFIG_MCUMGR_GRP_OS_ECHO=y CONFIG_MCUMGR_GRP_OS_MCUMGR_PARAMS=y CONFIG_MCUMGR_GRP_OS_BOOTLOADER_INFO=y CONFIG_NRF_SDH_BLE=y -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y CONFIG_BLE_MCUMGR=y diff --git a/applications/installer/src/main.c b/applications/installer/src/main.c index 44baf3e6b8..925b381df8 100644 --- a/applications/installer/src/main.c +++ b/applications/installer/src/main.c @@ -30,6 +30,8 @@ LOG_MODULE_REGISTER(installer, CONFIG_INSTALLER_LOG_LEVEL); #define EXPECTED_HEADER { 0x92, 0x11, 0xf2, 0xe9 } #define PROCESS_SECTOR_SIZE 4096 +#define LOAD_OFFSET PARTITION_NODE_ADDRESS(DT_CHOSEN(zephyr_code_partition)) + extern uintptr_t _flash_used; static const uint8_t expected_header[] = EXPECTED_HEADER; @@ -63,7 +65,7 @@ int main(void) struct bm_installs replacement_metadata; struct flash_area fa_installer = { .fa_id = 1, - .fa_off = CONFIG_FLASH_LOAD_OFFSET, + .fa_off = LOAD_OFFSET, .fa_size = PROCESS_SECTOR_SIZE, .fa_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_flash_controller)), }; @@ -74,7 +76,7 @@ int main(void) static uint8_t write_buffer[CONFIG_ROM_START_OFFSET] = { 0x00 }; #endif - update_data = (struct bm_installs_update *)((int)&_flash_used + CONFIG_FLASH_LOAD_OFFSET); + update_data = (struct bm_installs_update *)((int)&_flash_used + LOAD_OFFSET); if (update_data == NULL) { LOG_ERR("Installer data is NULL"); diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s115_softdevice.dts b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s115_softdevice.dts index eb8c578e7f..07d70655be 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s115_softdevice.dts +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s115_softdevice.dts @@ -21,17 +21,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; slot0_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x00000000 DT_SIZE_K(390)>; }; storage_partition: partition@61800 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00061800 DT_SIZE_K(8)>; ranges = <0x0 0x61800 DT_SIZE_K(8)>; @@ -39,17 +40,20 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; }; softdevice_partition: partition@63800 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x00063800 DT_SIZE_K(101)>; }; diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s115_softdevice_mcuboot.dts b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s115_softdevice_mcuboot.dts index 1964588e9b..c9a06a61b0 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s115_softdevice_mcuboot.dts +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s115_softdevice_mcuboot.dts @@ -29,17 +29,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; boot_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "boot"; reg = <0x00000000 DT_SIZE_K(31)>; }; storage_partition: partition@7c00 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00007c00 DT_SIZE_K(8)>; ranges = <0x0 0x7c00 DT_SIZE_K(8)>; @@ -47,11 +48,13 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; @@ -60,21 +63,25 @@ /* Area from 0x9c00 to 0xa000 is unused due to alignment */ slot0_partition: partition@a000 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x0000a000 DT_SIZE_K(292)>; }; slot1_partition: partition@53000 { + compatible = "zephyr,mapped-partition"; label = "slot1"; reg = <0x00053000 DT_SIZE_K(64)>; }; softdevice_partition: partition@63000 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x00063000 (DT_SIZE_K(103) + 0x200)>; }; metadata_partition: partition@7ce00 { + compatible = "zephyr,mapped-partition"; label = "metadata"; reg = <0x0007ce00 0x200>; }; diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s145_softdevice.dts b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s145_softdevice.dts index 7f8e926d1d..7744da3baa 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s145_softdevice.dts +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s145_softdevice.dts @@ -21,17 +21,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; slot0_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x00000000 DT_SIZE_K(354)>; }; storage_partition: partition@58800 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00058800 DT_SIZE_K(8)>; ranges = <0x0 0x58800 DT_SIZE_K(8)>; @@ -39,17 +40,20 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; }; softdevice_partition: partition@5a800 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x0005a800 DT_SIZE_K(137)>; }; diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s145_softdevice_mcuboot.dts b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s145_softdevice_mcuboot.dts index 6e3272bb2a..bd2cacbc56 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s145_softdevice_mcuboot.dts +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s145_softdevice_mcuboot.dts @@ -29,17 +29,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; boot_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "boot"; reg = <0x00000000 DT_SIZE_K(31)>; }; storage_partition: partition@7c00 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00007c00 DT_SIZE_K(8)>; ranges = <0x0 0x7c00 DT_SIZE_K(8)>; @@ -47,11 +48,13 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; @@ -60,21 +63,25 @@ /* Area from 0x9c00 to 0xa000 is unused due to alignment */ slot0_partition: partition@a000 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x0000a000 DT_SIZE_K(256)>; }; slot1_partition: partition@4a000 { + compatible = "zephyr,mapped-partition"; label = "slot1"; reg = <0x0004a000 DT_SIZE_K(64)>; }; softdevice_partition: partition@5a000 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x0005a000 (DT_SIZE_K(139) + 0x200)>; }; metadata_partition: partition@7ce00 { + compatible = "zephyr,mapped-partition"; label = "metadata"; reg = <0x0007ce00 0x200>; }; diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s115_softdevice.dts b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s115_softdevice.dts index a842c0d585..48629d4e20 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s115_softdevice.dts +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s115_softdevice.dts @@ -21,17 +21,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; slot0_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x00000000 DT_SIZE_K(902)>; }; storage_partition: partition@e1800 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x000e1800 DT_SIZE_K(8)>; ranges = <0x0 0xe1800 DT_SIZE_K(8)>; @@ -39,17 +40,20 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; }; softdevice_partition: partition@e3800 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x000e3800 DT_SIZE_K(101)>; }; diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s115_softdevice_mcuboot.dts b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s115_softdevice_mcuboot.dts index f0faf33786..ce931ae861 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s115_softdevice_mcuboot.dts +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s115_softdevice_mcuboot.dts @@ -29,17 +29,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; boot_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "boot"; reg = <0x00000000 DT_SIZE_K(31)>; }; storage_partition: partition@7c00 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00007c00 DT_SIZE_K(8)>; ranges = <0x0 0x7c00 DT_SIZE_K(8)>; @@ -47,11 +48,13 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; @@ -60,21 +63,25 @@ /* Area from 0x9c00 to 0xa000 is unused due to alignment */ slot0_partition: partition@a000 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x0000a000 DT_SIZE_K(804)>; }; slot1_partition: partition@d3000 { + compatible = "zephyr,mapped-partition"; label = "slot1"; reg = <0x000d3000 DT_SIZE_K(64)>; }; softdevice_partition: partition@e3000 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x000e3000 (DT_SIZE_K(103) + 0x200)>; }; metadata_partition: partition@fce00 { + compatible = "zephyr,mapped-partition"; label = "metadata"; reg = <0x000fce00 0x200>; }; diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s145_softdevice.dts b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s145_softdevice.dts index ff504d7610..2612944690 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s145_softdevice.dts +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s145_softdevice.dts @@ -21,17 +21,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; slot0_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x00000000 DT_SIZE_K(866)>; }; storage_partition: partition@d8800 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x000d8800 DT_SIZE_K(8)>; ranges = <0x0 0xd8800 DT_SIZE_K(8)>; @@ -39,17 +40,20 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; }; softdevice_partition: partition@da800 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x000da800 DT_SIZE_K(137)>; }; diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s145_softdevice_mcuboot.dts b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s145_softdevice_mcuboot.dts index 88159c5b7b..9839fe8b48 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s145_softdevice_mcuboot.dts +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s145_softdevice_mcuboot.dts @@ -29,17 +29,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; boot_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "boot"; reg = <0x00000000 DT_SIZE_K(31)>; }; storage_partition: partition@7c00 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00007c00 DT_SIZE_K(8)>; ranges = <0x0 0x7c00 DT_SIZE_K(8)>; @@ -47,11 +48,13 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; @@ -60,21 +63,25 @@ /* Area from 0x9c00 to 0xa000 is unused due to alignment */ slot0_partition: partition@a000 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x0000a000 DT_SIZE_K(768)>; }; slot1_partition: partition@ca000 { + compatible = "zephyr,mapped-partition"; label = "slot1"; reg = <0x000ca000 DT_SIZE_K(64)>; }; softdevice_partition: partition@da000 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x000da000 (DT_SIZE_K(139) + 0x200)>; }; metadata_partition: partition@fce00 { + compatible = "zephyr,mapped-partition"; label = "metadata"; reg = <0x000fce00 0x200>; }; diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s115_softdevice.dts b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s115_softdevice.dts index 08bd89e82b..4002ec926b 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s115_softdevice.dts +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s115_softdevice.dts @@ -21,9 +21,9 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; slot0_partition: partition@0 { label = "slot0"; @@ -31,7 +31,7 @@ }; storage_partition: partition@161800 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00161800 DT_SIZE_K(8)>; ranges = <0x0 0x161800 DT_SIZE_K(8)>; @@ -39,17 +39,20 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; }; softdevice_partition: partition@163800 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x00163800 DT_SIZE_K(101)>; }; diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s115_softdevice_mcuboot.dts b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s115_softdevice_mcuboot.dts index 6c0de44fdf..07083f0270 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s115_softdevice_mcuboot.dts +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s115_softdevice_mcuboot.dts @@ -32,17 +32,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; boot_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "boot"; reg = <0x00000000 DT_SIZE_K(31)>; }; storage_partition: partition@7c00 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00007c00 DT_SIZE_K(8)>; ranges = <0x0 0x7c00 DT_SIZE_K(8)>; @@ -50,11 +51,13 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; @@ -63,21 +66,25 @@ /* Area from 0x9c00 to 0xa000 is unused due to alignment */ slot0_partition: partition@a000 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x0000a000 DT_SIZE_K(1316)>; }; slot1_partition: partition@153000 { + compatible = "zephyr,mapped-partition"; label = "slot1"; reg = <0x00153000 DT_SIZE_K(64)>; }; softdevice_partition: partition@163000 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x00163000 (DT_SIZE_K(103) + 0x200)>; }; metadata_partition: partition@17ce00 { + compatible = "zephyr,mapped-partition"; label = "metadata"; reg = <0x0017ce00 0x200>; }; diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s145_softdevice.dts b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s145_softdevice.dts index 9e3cffe053..2153f6f119 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s145_softdevice.dts +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s145_softdevice.dts @@ -21,17 +21,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; slot0_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x00000000 DT_SIZE_K(1378)>; }; storage_partition: partition@158800 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00158800 DT_SIZE_K(8)>; ranges = <0x0 0x158800 DT_SIZE_K(8)>; @@ -39,17 +40,20 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; }; softdevice_partition: partition@15a800 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x0015a800 DT_SIZE_K(137)>; }; diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s145_softdevice_mcuboot.dts b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s145_softdevice_mcuboot.dts index ca4de682f1..ac14db4049 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s145_softdevice_mcuboot.dts +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s145_softdevice_mcuboot.dts @@ -29,17 +29,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; boot_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "boot"; reg = <0x00000000 DT_SIZE_K(31)>; }; storage_partition: partition@7c00 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00007c00 DT_SIZE_K(8)>; ranges = <0x0 0x7c00 DT_SIZE_K(8)>; @@ -47,11 +48,13 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; @@ -60,21 +63,25 @@ /* Area from 0x9c00 to 0xa000 is unused due to alignment */ slot0_partition: partition@a000 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x0000a000 DT_SIZE_K(1280)>; }; slot1_partition: partition@14a000 { + compatible = "zephyr,mapped-partition"; label = "slot1"; reg = <0x0014a000 DT_SIZE_K(64)>; }; softdevice_partition: partition@15a000 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x0015a000 (DT_SIZE_K(139) + 0x200)>; }; metadata_partition: partition@17ce00 { + compatible = "zephyr,mapped-partition"; label = "metadata"; reg = <0x0017ce00 0x200>; }; diff --git a/boards/nordic/bm_nrf54l15dk/sysbuild.cmake b/boards/nordic/bm_nrf54l15dk/sysbuild.cmake index b308610b59..1359ae9150 100644 --- a/boards/nordic/bm_nrf54l15dk/sysbuild.cmake +++ b/boards/nordic/bm_nrf54l15dk/sysbuild.cmake @@ -1,10 +1,9 @@ string(REPLACE "/" ";" board_qualifer_list "${BOARD_QUALIFIERS}") list(LENGTH board_qualifer_list board_qualifer_list_len) -if(${board_qualifer_list_len} LESS 4) +if(${board_qualifer_list_len} LESS 3) message(FATAL_ERROR "A board target must be supplied") endif() set(board_qualifer_list) set(board_qualifer_list_len) - diff --git a/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s115_softdevice.dts b/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s115_softdevice.dts index 0dcbdd5b04..0740aa244f 100644 --- a/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s115_softdevice.dts +++ b/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s115_softdevice.dts @@ -21,17 +21,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; slot0_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x00000000 DT_SIZE_K(1926)>; }; storage_partition: partition@1e1800 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x001e1800 DT_SIZE_K(8)>; ranges = <0x0 0x1e1800 DT_SIZE_K(8)>; @@ -39,17 +40,20 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; }; softdevice_partition: partition@1e3800 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x001e3800 DT_SIZE_K(101)>; }; diff --git a/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s115_softdevice_mcuboot.dts b/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s115_softdevice_mcuboot.dts index cf587e7978..1006ae525a 100644 --- a/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s115_softdevice_mcuboot.dts +++ b/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s115_softdevice_mcuboot.dts @@ -32,17 +32,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; boot_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "boot"; reg = <0x00000000 DT_SIZE_K(31)>; }; storage_partition: partition@7c00 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00007c00 DT_SIZE_K(8)>; ranges = <0x0 0x7c00 DT_SIZE_K(8)>; @@ -50,11 +51,13 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; @@ -63,21 +66,25 @@ /* Area from 0x9c00 to 0xa000 is unused due to alignment */ slot0_partition: partition@a000 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x0000a000 DT_SIZE_K(1828)>; }; slot1_partition: partition@1d3000 { + compatible = "zephyr,mapped-partition"; label = "slot1"; reg = <0x001d3000 DT_SIZE_K(64)>; }; softdevice_partition: partition@1e3000 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x001e3000 (DT_SIZE_K(103) + 0x200)>; }; metadata_partition: partition@1fce00 { + compatible = "zephyr,mapped-partition"; label = "metadata"; reg = <0x001fce00 0x200>; }; diff --git a/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s145_softdevice.dts b/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s145_softdevice.dts index 682e8c5cf6..d08c8a07fe 100644 --- a/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s145_softdevice.dts +++ b/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s145_softdevice.dts @@ -21,17 +21,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; slot0_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x00000000 DT_SIZE_K(1890)>; }; storage_partition: partition@1d8800 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x001d8800 DT_SIZE_K(8)>; ranges = <0x0 0x1d8800 DT_SIZE_K(8)>; @@ -39,17 +40,20 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; }; softdevice_partition: partition@1da800 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x001da800 DT_SIZE_K(137)>; }; diff --git a/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s145_softdevice_mcuboot.dts b/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s145_softdevice_mcuboot.dts index b8edfb8642..56b4b41202 100644 --- a/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s145_softdevice_mcuboot.dts +++ b/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s145_softdevice_mcuboot.dts @@ -32,17 +32,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; boot_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "boot"; reg = <0x00000000 DT_SIZE_K(31)>; }; storage_partition: partition@7c00 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00007c00 DT_SIZE_K(8)>; ranges = <0x0 0x7c00 DT_SIZE_K(8)>; @@ -50,11 +51,13 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; @@ -63,21 +66,25 @@ /* Area from 0x9c00 to 0xa000 is unused due to alignment */ slot0_partition: partition@a000 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x0000a000 DT_SIZE_K(1792)>; }; slot1_partition: partition@1ca000 { + compatible = "zephyr,mapped-partition"; label = "slot1"; reg = <0x001ca000 DT_SIZE_K(64)>; }; softdevice_partition: partition@1da000 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x001da000 (DT_SIZE_K(139) + 0x200)>; }; metadata_partition: partition@1fce00 { + compatible = "zephyr,mapped-partition"; label = "metadata"; reg = <0x001fce00 0x200>; }; diff --git a/boards/nordic/bm_nrf54lm20dk/sysbuild.cmake b/boards/nordic/bm_nrf54lm20dk/sysbuild.cmake index e718c4eaab..1359ae9150 100644 --- a/boards/nordic/bm_nrf54lm20dk/sysbuild.cmake +++ b/boards/nordic/bm_nrf54lm20dk/sysbuild.cmake @@ -1,7 +1,7 @@ string(REPLACE "/" ";" board_qualifer_list "${BOARD_QUALIFIERS}") list(LENGTH board_qualifer_list board_qualifer_list_len) -if(${board_qualifer_list_len} LESS 4) +if(${board_qualifer_list_len} LESS 3) message(FATAL_ERROR "A board target must be supplied") endif() diff --git a/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s115_softdevice.dts b/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s115_softdevice.dts index 27059b12d7..d171408fcc 100644 --- a/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s115_softdevice.dts +++ b/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s115_softdevice.dts @@ -21,17 +21,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; slot0_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x00000000 DT_SIZE_K(398)>; }; storage_partition: partition@63800 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00063800 DT_SIZE_K(8)>; ranges = <0x0 0x63800 DT_SIZE_K(8)>; @@ -39,17 +40,20 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; }; softdevice_partition: partition@65800 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x00065800 DT_SIZE_K(101)>; }; diff --git a/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s115_softdevice_mcuboot.dts b/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s115_softdevice_mcuboot.dts index c262b9d708..3cf46abe8b 100644 --- a/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s115_softdevice_mcuboot.dts +++ b/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s115_softdevice_mcuboot.dts @@ -29,17 +29,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; boot_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "boot"; reg = <0x00000000 DT_SIZE_K(31)>; }; storage_partition: partition@7c00 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00007c00 DT_SIZE_K(8)>; ranges = <0x0 0x7c00 DT_SIZE_K(8)>; @@ -47,11 +48,13 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; @@ -60,21 +63,25 @@ /* Area from 0x9c00 to 0xa000 is unused due to alignment */ slot0_partition: partition@a000 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x0000a000 DT_SIZE_K(300)>; }; slot1_partition: partition@55000 { + compatible = "zephyr,mapped-partition"; label = "slot1"; reg = <0x00055000 DT_SIZE_K(64)>; }; softdevice_partition: partition@65000 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x00065000 (DT_SIZE_K(103) + 0x200)>; }; metadata_partition: partition@7ee00 { + compatible = "zephyr,mapped-partition"; label = "metadata"; reg = <0x0007ee00 0x200>; }; diff --git a/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s145_softdevice.dts b/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s145_softdevice.dts index 7a0077bb46..37764ae39e 100644 --- a/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s145_softdevice.dts +++ b/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s145_softdevice.dts @@ -21,17 +21,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; slot0_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x00000000 DT_SIZE_K(362)>; }; storage_partition: partition@5a800 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x0005a800 DT_SIZE_K(8)>; ranges = <0x0 0x5a800 DT_SIZE_K(8)>; @@ -39,17 +40,20 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; }; softdevice_partition: partition@5c800 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x0005c800 DT_SIZE_K(137)>; }; diff --git a/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s145_softdevice_mcuboot.dts b/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s145_softdevice_mcuboot.dts index 1a19cb38d5..1ad6fb342c 100644 --- a/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s145_softdevice_mcuboot.dts +++ b/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s145_softdevice_mcuboot.dts @@ -29,17 +29,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; boot_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "boot"; reg = <0x00000000 DT_SIZE_K(31)>; }; storage_partition: partition@7c00 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00007c00 DT_SIZE_K(8)>; ranges = <0x0 0x7c00 DT_SIZE_K(8)>; @@ -47,11 +48,13 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; @@ -60,21 +63,25 @@ /* Area from 0x9c00 to 0xa000 is unused due to alignment */ slot0_partition: partition@a000 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x0000a000 DT_SIZE_K(264)>; }; slot1_partition: partition@4c000 { + compatible = "zephyr,mapped-partition"; label = "slot1"; reg = <0x0004c000 DT_SIZE_K(64)>; }; softdevice_partition: partition@5c000 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x0005c000 (DT_SIZE_K(139) + 0x200)>; }; metadata_partition: partition@7ee00 { + compatible = "zephyr,mapped-partition"; label = "metadata"; reg = <0x0007ee00 0x200>; }; diff --git a/boards/nordic/bm_nrf54ls05dk/sysbuild.cmake b/boards/nordic/bm_nrf54ls05dk/sysbuild.cmake index e718c4eaab..1359ae9150 100644 --- a/boards/nordic/bm_nrf54ls05dk/sysbuild.cmake +++ b/boards/nordic/bm_nrf54ls05dk/sysbuild.cmake @@ -1,7 +1,7 @@ string(REPLACE "/" ";" board_qualifer_list "${BOARD_QUALIFIERS}") list(LENGTH board_qualifer_list board_qualifer_list_len) -if(${board_qualifer_list_len} LESS 4) +if(${board_qualifer_list_len} LESS 3) message(FATAL_ERROR "A board target must be supplied") endif() diff --git a/boards/nordic/bm_nrf54lv10dk/bm_nrf54lv10dk_nrf54lv10a_cpuapp_s115_softdevice.dts b/boards/nordic/bm_nrf54lv10dk/bm_nrf54lv10dk_nrf54lv10a_cpuapp_s115_softdevice.dts index baf10ddffc..3a71db3f8b 100644 --- a/boards/nordic/bm_nrf54lv10dk/bm_nrf54lv10dk_nrf54lv10a_cpuapp_s115_softdevice.dts +++ b/boards/nordic/bm_nrf54lv10dk/bm_nrf54lv10dk_nrf54lv10a_cpuapp_s115_softdevice.dts @@ -21,17 +21,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; slot0_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x00000000 DT_SIZE_K(902)>; }; storage_partition: partition@e1800 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x000e1800 DT_SIZE_K(8)>; ranges = <0x0 0xe1800 DT_SIZE_K(8)>; @@ -39,17 +40,20 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; }; softdevice_partition: partition@e3800 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x000e3800 DT_SIZE_K(101)>; }; diff --git a/boards/nordic/bm_nrf54lv10dk/bm_nrf54lv10dk_nrf54lv10a_cpuapp_s115_softdevice_mcuboot.dts b/boards/nordic/bm_nrf54lv10dk/bm_nrf54lv10dk_nrf54lv10a_cpuapp_s115_softdevice_mcuboot.dts index ec469f9bf2..86063146f6 100644 --- a/boards/nordic/bm_nrf54lv10dk/bm_nrf54lv10dk_nrf54lv10a_cpuapp_s115_softdevice_mcuboot.dts +++ b/boards/nordic/bm_nrf54lv10dk/bm_nrf54lv10dk_nrf54lv10a_cpuapp_s115_softdevice_mcuboot.dts @@ -32,17 +32,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; boot_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "boot"; reg = <0x00000000 DT_SIZE_K(31)>; }; storage_partition: partition@7c00 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00007c00 DT_SIZE_K(8)>; ranges = <0x0 0x7c00 DT_SIZE_K(8)>; @@ -50,11 +51,13 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; @@ -63,21 +66,25 @@ /* Area from 0x9c00 to 0xa000 is unused due to alignment */ slot0_partition: partition@a000 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x0000a000 DT_SIZE_K(804)>; }; slot1_partition: partition@d3000 { + compatible = "zephyr,mapped-partition"; label = "slot1"; reg = <0x000d3000 DT_SIZE_K(64)>; }; softdevice_partition: partition@e3000 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x000e3000 (DT_SIZE_K(103) + 0x200)>; }; metadata_partition: partition@fce00 { + compatible = "zephyr,mapped-partition"; label = "metadata"; reg = <0x000fce00 0x200>; }; diff --git a/boards/nordic/bm_nrf54lv10dk/bm_nrf54lv10dk_nrf54lv10a_cpuapp_s145_softdevice_mcuboot.dts b/boards/nordic/bm_nrf54lv10dk/bm_nrf54lv10dk_nrf54lv10a_cpuapp_s145_softdevice_mcuboot.dts index a4c55f5814..5f5ff47443 100644 --- a/boards/nordic/bm_nrf54lv10dk/bm_nrf54lv10dk_nrf54lv10a_cpuapp_s145_softdevice_mcuboot.dts +++ b/boards/nordic/bm_nrf54lv10dk/bm_nrf54lv10dk_nrf54lv10a_cpuapp_s145_softdevice_mcuboot.dts @@ -32,17 +32,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; boot_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "boot"; reg = <0x00000000 DT_SIZE_K(31)>; }; storage_partition: partition@7c00 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00007c00 DT_SIZE_K(8)>; ranges = <0x0 0x7c00 DT_SIZE_K(8)>; @@ -50,11 +51,13 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; @@ -63,21 +66,25 @@ /* Area from 0x9c00 to 0xa000 is unused due to alignment */ slot0_partition: partition@a000 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x0000a000 DT_SIZE_K(768)>; }; slot1_partition: partition@ca000 { + compatible = "zephyr,mapped-partition"; label = "slot1"; reg = <0x000ca000 DT_SIZE_K(64)>; }; softdevice_partition: partition@da000 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x000da000 (DT_SIZE_K(139) + 0x200)>; }; metadata_partition: partition@fce00 { + compatible = "zephyr,mapped-partition"; label = "metadata"; reg = <0x000fce00 0x200>; }; diff --git a/boards/nordic/bm_nrf54lv10dk/sysbuild.cmake b/boards/nordic/bm_nrf54lv10dk/sysbuild.cmake index e718c4eaab..1359ae9150 100644 --- a/boards/nordic/bm_nrf54lv10dk/sysbuild.cmake +++ b/boards/nordic/bm_nrf54lv10dk/sysbuild.cmake @@ -1,7 +1,7 @@ string(REPLACE "/" ";" board_qualifer_list "${BOARD_QUALIFIERS}") list(LENGTH board_qualifer_list board_qualifer_list_len) -if(${board_qualifer_list_len} LESS 4) +if(${board_qualifer_list_len} LESS 3) message(FATAL_ERROR "A board target must be supplied") endif() diff --git a/cmake/sysbuild/image_signing_installer.cmake b/cmake/sysbuild/image_signing_installer.cmake index 1aa22881c9..afcd121152 100644 --- a/cmake/sysbuild/image_signing_installer.cmake +++ b/cmake/sysbuild/image_signing_installer.cmake @@ -1,6 +1,8 @@ # Copyright (c) 2025 Nordic Semiconductor ASA # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +include(${ZEPHYR_NRF_MODULE_DIR}/cmake/sysbuild/bootloader_dts_utils.cmake) + function(bm_install_tasks output_hex output_bin) set(dependencies ${PROJECT_BINARY_DIR}/.config) @@ -51,6 +53,9 @@ function(bm_install_tasks output_hex output_bin) dt_chosen(flash_node TARGET ${DEFAULT_IMAGE} PROPERTY "zephyr,flash") dt_prop(write_block_size TARGET ${DEFAULT_IMAGE} PATH "${flash_node}" PROPERTY "write-block-size") + dt_chosen(code_node_path TARGET ${DEFAULT_IMAGE} PROPERTY "zephyr,code-partition") + dt_reg_size(code_node_size PATH "${code_node_path}" TARGET ${DEFAULT_IMAGE}) + if(NOT write_block_size) set(write_block_size 4) message(WARNING "slot0_partition write block size devicetree parameter is missing, assuming write block size is 4") @@ -58,11 +63,10 @@ function(bm_install_tasks output_hex output_bin) sysbuild_get(CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION IMAGE ${DEFAULT_IMAGE} VAR CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION KCONFIG) sysbuild_get(CONFIG_ROM_START_OFFSET IMAGE ${DEFAULT_IMAGE} VAR CONFIG_ROM_START_OFFSET KCONFIG) - sysbuild_get(CONFIG_FLASH_LOAD_SIZE IMAGE ${DEFAULT_IMAGE} VAR CONFIG_FLASH_LOAD_SIZE KCONFIG) # sysbuild_get(CONFIG_MCUBOOT_HARDWARE_DOWNGRADE_PREVENTION IMAGE ${DEFAULT_IMAGE} VAR CONFIG_MCUBOOT_HARDWARE_DOWNGRADE_PREVENTION KCONFIG) # Custom TLV 0x0a is set to 0x01 to indicate that this is an installer image - set(imgtool_sign ${PYTHON_EXECUTABLE} ${IMGTOOL} sign --version ${CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION} --align ${write_block_size} --slot-size ${CONFIG_FLASH_LOAD_SIZE} --header-size ${CONFIG_ROM_START_OFFSET} --overwrite-only --custom-tlv 0xa0 0x01) + set(imgtool_sign ${PYTHON_EXECUTABLE} ${IMGTOOL} sign --version ${CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION} --align ${write_block_size} --slot-size ${code_node_size} --header-size ${CONFIG_ROM_START_OFFSET} --overwrite-only --custom-tlv 0xa0 0x01) # if(CONFIG_MCUBOOT_HARDWARE_DOWNGRADE_PREVENTION) # set(imgtool_args --security-counter ${CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_VALUE}) diff --git a/doc/nrf-bm/app_dev/dfu/ug_dfu.rst b/doc/nrf-bm/app_dev/dfu/ug_dfu.rst index c487f24e83..fb77a94b80 100644 --- a/doc/nrf-bm/app_dev/dfu/ug_dfu.rst +++ b/doc/nrf-bm/app_dev/dfu/ug_dfu.rst @@ -171,17 +171,18 @@ This board target will always enable DFU support when it is used to build the ap status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; boot_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "boot"; reg = <0x00000000 DT_SIZE_K(32)>; }; storage_partition: partition@8000 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00008000 DT_SIZE_K(8)>; ranges = <0x0 0x8000 DT_SIZE_K(8)>; @@ -189,32 +190,38 @@ This board target will always enable DFU support when it is used to build the ap #size-cells = <1>; storage0_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage1_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage1"; reg = <0x00001000 DT_SIZE_K(4)>; }; }; slot0_partition: partition@a000 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x0000a000 DT_SIZE_K(1290)>; }; slot1_partition: partition@14c800 { + compatible = "zephyr,mapped-partition"; label = "slot1"; reg = <0x0014c800 DT_SIZE_K(64)>; }; softdevice_partition: partition@15c800 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x0015c800 (DT_SIZE_K(129) + 0x200)>; }; metadata_partition: partition@17ce00 { + compatible = "zephyr,mapped-partition"; label = "metadata"; reg = <0x0017ce00 0x200>; }; diff --git a/doc/nrf-bm/libraries/bluetooth/peer_manager.rst b/doc/nrf-bm/libraries/bluetooth/peer_manager.rst index 8258035e01..ec2f12b1ff 100644 --- a/doc/nrf-bm/libraries/bluetooth/peer_manager.rst +++ b/doc/nrf-bm/libraries/bluetooth/peer_manager.rst @@ -453,7 +453,7 @@ LE Secure Connections is an optional functionality of the Peer Manager and is di However, if you want to use it, keep in mind that it depends on nRF Security to generate the Diffie-Helman key pair. The following Kconfig options must be enabled to support LE Secure Connections: -* :kconfig:option:`CONFIG_NRF_SECURITY` +* :kconfig:option:`CONFIG_PSA_CRYPTO` * :kconfig:option:`CONFIG_PSA_WANT_ALG_ECDH` * :kconfig:option:`CONFIG_PSA_WANT_GENERATE_RANDOM` * :kconfig:option:`CONFIG_PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_GENERATE` diff --git a/lib/bluetooth/peer_manager/modules/peer_data_storage.c b/lib/bluetooth/peer_manager/modules/peer_data_storage.c index a72bf4ca83..2ef90b23ca 100644 --- a/lib/bluetooth/peer_manager/modules/peer_data_storage.c +++ b/lib/bluetooth/peer_manager/modules/peer_data_storage.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -19,9 +20,8 @@ #include #include -#define PEER_MANAGER_NODE DT_NODELABEL(peer_manager_partition) -#define PEER_MANAGER_PARTITION_OFFSET DT_REG_ADDR(PEER_MANAGER_NODE) -#define PEER_MANAGER_PARTITION_SIZE DT_REG_SIZE(PEER_MANAGER_NODE) +#define PEER_MANAGER_PARTITION_OFFSET PARTITION_ADDRESS(peer_manager_partition) +#define PEER_MANAGER_PARTITION_SIZE PARTITION_SIZE(peer_manager_partition) LOG_MODULE_DECLARE(peer_manager, CONFIG_PEER_MANAGER_LOG_LEVEL); diff --git a/samples/bluetooth/ble_bms/prj.conf b/samples/bluetooth/ble_bms/prj.conf index 28c88fcd29..96de5e2f46 100644 --- a/samples/bluetooth/ble_bms/prj.conf +++ b/samples/bluetooth/ble_bms/prj.conf @@ -6,7 +6,7 @@ CONFIG_LOG_BACKEND_BM_UARTE=y CONFIG_SOFTDEVICE=y # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/bluetooth/ble_cgms/prj.conf b/samples/bluetooth/ble_cgms/prj.conf index 73633f4be1..8bceb4db94 100644 --- a/samples/bluetooth/ble_cgms/prj.conf +++ b/samples/bluetooth/ble_cgms/prj.conf @@ -6,7 +6,7 @@ CONFIG_LOG_BACKEND_BM_UARTE=y CONFIG_SOFTDEVICE=y # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/bluetooth/ble_hids_keyboard/prj.conf b/samples/bluetooth/ble_hids_keyboard/prj.conf index 8ee6dd1481..ebf62d26f6 100644 --- a/samples/bluetooth/ble_hids_keyboard/prj.conf +++ b/samples/bluetooth/ble_hids_keyboard/prj.conf @@ -6,7 +6,7 @@ CONFIG_LOG_BACKEND_BM_UARTE=y CONFIG_SOFTDEVICE=y # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/bluetooth/ble_hids_mouse/prj.conf b/samples/bluetooth/ble_hids_mouse/prj.conf index 9053141026..1e5000ae6f 100644 --- a/samples/bluetooth/ble_hids_mouse/prj.conf +++ b/samples/bluetooth/ble_hids_mouse/prj.conf @@ -6,7 +6,7 @@ CONFIG_LOG_BACKEND_BM_UARTE=y CONFIG_SOFTDEVICE=y # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/bluetooth/ble_hrs/prj.conf b/samples/bluetooth/ble_hrs/prj.conf index dc2f08be16..46cbf3b546 100644 --- a/samples/bluetooth/ble_hrs/prj.conf +++ b/samples/bluetooth/ble_hrs/prj.conf @@ -6,7 +6,7 @@ CONFIG_LOG_BACKEND_BM_UARTE=y CONFIG_SOFTDEVICE=y # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/bluetooth/ble_hrs_central/prj.conf b/samples/bluetooth/ble_hrs_central/prj.conf index a1384c1e79..fccba1490a 100644 --- a/samples/bluetooth/ble_hrs_central/prj.conf +++ b/samples/bluetooth/ble_hrs_central/prj.conf @@ -10,7 +10,7 @@ CONFIG_NRF_SDH_BLE_CENTRAL_LINK_COUNT=1 CONFIG_NRF_SDH_BLE_PERIPHERAL_LINK_COUNT=0 # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/bluetooth/ble_lbs/prj.conf b/samples/bluetooth/ble_lbs/prj.conf index c30ac82b08..a5331eaaa8 100644 --- a/samples/bluetooth/ble_lbs/prj.conf +++ b/samples/bluetooth/ble_lbs/prj.conf @@ -9,7 +9,7 @@ CONFIG_SOFTDEVICE=y CONFIG_NRF_SDH_BLE_VS_UUID_COUNT=1 # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/bluetooth/ble_nus/prj.conf b/samples/bluetooth/ble_nus/prj.conf index ef02d7f04e..75becfde4e 100644 --- a/samples/bluetooth/ble_nus/prj.conf +++ b/samples/bluetooth/ble_nus/prj.conf @@ -9,7 +9,7 @@ CONFIG_SOFTDEVICE=y CONFIG_NRF_SDH_BLE_VS_UUID_COUNT=1 # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/bluetooth/ble_nus_central/prj.conf b/samples/bluetooth/ble_nus_central/prj.conf index 1a14879da3..2155e23f8e 100644 --- a/samples/bluetooth/ble_nus_central/prj.conf +++ b/samples/bluetooth/ble_nus_central/prj.conf @@ -10,7 +10,7 @@ CONFIG_BM_GPIOTE=y CONFIG_BM_TIMER=y # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/bluetooth/ble_pwr_profiling/prj.conf b/samples/bluetooth/ble_pwr_profiling/prj.conf index 057ab399d1..904b76b57f 100644 --- a/samples/bluetooth/ble_pwr_profiling/prj.conf +++ b/samples/bluetooth/ble_pwr_profiling/prj.conf @@ -9,7 +9,7 @@ CONFIG_SOFTDEVICE=y CONFIG_NRF_SDH_BLE_VS_UUID_COUNT=1 # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/bluetooth/ble_radio_notification/prj.conf b/samples/bluetooth/ble_radio_notification/prj.conf index 20a3ef6697..01697565e7 100644 --- a/samples/bluetooth/ble_radio_notification/prj.conf +++ b/samples/bluetooth/ble_radio_notification/prj.conf @@ -6,7 +6,7 @@ CONFIG_LOG_BACKEND_BM_UARTE=y CONFIG_SOFTDEVICE=y # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/bluetooth/hello_softdevice/prj.conf b/samples/bluetooth/hello_softdevice/prj.conf index 6f717569c0..b467862c60 100644 --- a/samples/bluetooth/hello_softdevice/prj.conf +++ b/samples/bluetooth/hello_softdevice/prj.conf @@ -6,6 +6,6 @@ CONFIG_LOG_BACKEND_BM_UARTE=y CONFIG_SOFTDEVICE=y # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/bluetooth/peripheral_nfc_pairing/prj.conf b/samples/bluetooth/peripheral_nfc_pairing/prj.conf index 72b28fa295..316e965d1b 100644 --- a/samples/bluetooth/peripheral_nfc_pairing/prj.conf +++ b/samples/bluetooth/peripheral_nfc_pairing/prj.conf @@ -6,7 +6,7 @@ CONFIG_SOFTDEVICE=y CONFIG_NRF_SDH_BLE=y # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/boot/mcuboot_recovery_entry/prj.conf b/samples/boot/mcuboot_recovery_entry/prj.conf index 7ed988a663..4d17447c77 100644 --- a/samples/boot/mcuboot_recovery_entry/prj.conf +++ b/samples/boot/mcuboot_recovery_entry/prj.conf @@ -16,7 +16,7 @@ CONFIG_NRF_SDH_BLE_GAP_EVENT_LENGTH=10 CONFIG_NRF_SDH_BLE_GATT_MAX_MTU_SIZE=498 # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/subsys/fs/bm_zms/prj.conf b/samples/subsys/fs/bm_zms/prj.conf index f33b5e1355..203d5f5053 100644 --- a/samples/subsys/fs/bm_zms/prj.conf +++ b/samples/subsys/fs/bm_zms/prj.conf @@ -7,7 +7,7 @@ CONFIG_LOG_BUFFER_SIZE=2048 CONFIG_SOFTDEVICE=y # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/subsys/fs/bm_zms/src/main.c b/samples/subsys/fs/bm_zms/src/main.c index af656da6d6..545acad607 100644 --- a/samples/subsys/fs/bm_zms/src/main.c +++ b/samples/subsys/fs/bm_zms/src/main.c @@ -7,12 +7,12 @@ #include #include #include +#include #include #include -#define STORAGE_NODE DT_NODELABEL(storage0_partition) -#define BM_ZMS_PARTITION_OFFSET DT_REG_ADDR(STORAGE_NODE) -#define BM_ZMS_PARTITION_SIZE DT_REG_SIZE(STORAGE_NODE) +#define BM_ZMS_PARTITION_OFFSET PARTITION_ADDRESS(storage0_partition) +#define BM_ZMS_PARTITION_SIZE PARTITION_SIZE(storage0_partition) #define IP_ADDRESS_ID 1 #define KEY_VALUE_ID 0xbeefdead diff --git a/samples/subsys/storage/bm_storage/prj.conf b/samples/subsys/storage/bm_storage/prj.conf index 646fa6e663..195905a3cf 100644 --- a/samples/subsys/storage/bm_storage/prj.conf +++ b/samples/subsys/storage/bm_storage/prj.conf @@ -6,7 +6,7 @@ CONFIG_LOG_BACKEND_BM_UARTE=y CONFIG_SOFTDEVICE=y # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/subsys/storage/bm_storage/src/main.c b/samples/subsys/storage/bm_storage/src/main.c index dd096a2110..54371654d3 100644 --- a/samples/subsys/storage/bm_storage/src/main.c +++ b/samples/subsys/storage/bm_storage/src/main.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -21,9 +22,8 @@ LOG_MODULE_REGISTER(sample, CONFIG_SAMPLE_BM_STORAGE_LOG_LEVEL); -#define STORAGE0_PARTITION DT_NODELABEL(storage0_partition) -#define STORAGE0_START DT_REG_ADDR(STORAGE0_PARTITION) -#define STORAGE0_SIZE DT_REG_SIZE(STORAGE0_PARTITION) +#define STORAGE0_START PARTITION_ADDRESS(storage0_partition) +#define STORAGE0_SIZE PARTITION_SIZE(storage0_partition) /* Write buffer size must be a multiple of the program unit. * To support both RRAM (16 bytes) and SoftDevice (4 bytes) backends, diff --git a/subsys/bm_installs/src/bm_installs.c b/subsys/bm_installs/src/bm_installs.c index d9aaf376cc..51247a0ee7 100644 --- a/subsys/bm_installs/src/bm_installs.c +++ b/subsys/bm_installs/src/bm_installs.c @@ -69,7 +69,7 @@ static bool bm_installs_validate(struct bm_installs *data) void bm_installs_init(void) { - uint32_t read_position = FIXED_PARTITION_OFFSET(metadata_partition); + uint32_t read_position = PARTITION_OFFSET(metadata_partition); bm_installs_index = 0; bm_installs_valid = false; @@ -103,7 +103,7 @@ void bm_installs_init(void) const struct flash_area *fap; int rc; - rc = flash_area_open(FIXED_PARTITION_ID(slot0_partition), &fap); + rc = flash_area_open(PARTITION_ID(slot0_partition), &fap); if (rc) { return; @@ -111,8 +111,8 @@ void bm_installs_init(void) metadata_slot.fa_id = fap->fa_id; metadata_slot.fa_dev = fap->fa_dev; - metadata_slot.fa_off = FIXED_PARTITION_OFFSET(metadata_partition); - metadata_slot.fa_size = FIXED_PARTITION_SIZE(metadata_partition); + metadata_slot.fa_off = PARTITION_OFFSET(metadata_partition); + metadata_slot.fa_size = PARTITION_SIZE(metadata_partition); #if CONFIG_FLASH_MAP_LABELS metadata_slot.fa_label = fap->fa_label; #endif @@ -172,7 +172,7 @@ int bm_installs_write(struct bm_installs *data) while (index < CONFIG_BM_INSTALL_ENTRIES) { uint32_t current_index_offset = index * sizeof(struct bm_installs); - uint32_t current_flash_offset = FIXED_PARTITION_OFFSET(metadata_partition) + + uint32_t current_flash_offset = PARTITION_OFFSET(metadata_partition) + current_index_offset; if (memcmp((void *)current_flash_offset, unerased_data, @@ -196,7 +196,7 @@ int bm_installs_write(struct bm_installs *data) if (index == CONFIG_BM_INSTALL_ENTRIES) { /* No free spaces, erase whole sector and start again */ index = 0; - rc = flash_area_erase(&metadata_slot, 0, FIXED_PARTITION_SIZE( + rc = flash_area_erase(&metadata_slot, 0, PARTITION_SIZE( metadata_partition)); if (rc) { @@ -226,7 +226,7 @@ int bm_installs_invalidate(void) } #if defined(CONFIG_FLASH_HAS_EXPLICIT_ERASE) - if ((index_offset + sizeof(bm_installs_data)) >= FIXED_PARTITION_SIZE( + if ((index_offset + sizeof(bm_installs_data)) >= PARTITION_SIZE( metadata_partition)) { /* Since this is at end of sector, it would be better to just erase the whole * sector @@ -235,7 +235,7 @@ int bm_installs_invalidate(void) metadata_slot.fa_dev); if (flash_params_get_erase_cap(fparams) & FLASH_ERASE_C_EXPLICIT) { - rc = flash_area_erase(&metadata_slot, 0, FIXED_PARTITION_SIZE( + rc = flash_area_erase(&metadata_slot, 0, PARTITION_SIZE( metadata_partition)); performed_erase = true; } diff --git a/subsys/mgmt/mcumgr/grp/img_mgmt/src/bm_img_mgmt.c b/subsys/mgmt/mcumgr/grp/img_mgmt/src/bm_img_mgmt.c index 2a1ccae936..c81da1f139 100644 --- a/subsys/mgmt/mcumgr/grp/img_mgmt/src/bm_img_mgmt.c +++ b/subsys/mgmt/mcumgr/grp/img_mgmt/src/bm_img_mgmt.c @@ -26,11 +26,11 @@ LOG_MODULE_DECLARE(mcumgr_img_grp_data, CONFIG_MCUMGR_GRP_IMG_LOG_LEVEL); -#define S0_START FIXED_PARTITION_ADDRESS(slot0_partition) -#define S0_SIZE FIXED_PARTITION_SIZE(slot0_partition) +#define S0_START PARTITION_ADDRESS(slot0_partition) +#define S0_SIZE PARTITION_SIZE(slot0_partition) -#define S1_START FIXED_PARTITION_ADDRESS(slot1_partition) -#define S1_SIZE FIXED_PARTITION_SIZE(slot1_partition) +#define S1_START PARTITION_ADDRESS(slot1_partition) +#define S1_SIZE PARTITION_SIZE(slot1_partition) #define RRAMC_WRITE_BLOCK_SIZE 16 static struct bm_storage s0_storage; diff --git a/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c b/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c index 660237da7f..31a7ed1505 100644 --- a/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c +++ b/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c @@ -27,9 +27,11 @@ #include #include -#define FIXED_PARTITION_IS_RUNNING_APP_PARTITION(label) \ - (FIXED_PARTITION_OFFSET(label) <= CONFIG_FLASH_LOAD_OFFSET && \ - FIXED_PARTITION_OFFSET(label) + FIXED_PARTITION_SIZE(label) > CONFIG_FLASH_LOAD_OFFSET) +#define LOAD_OFFSET PARTITION_NODE_ADDRESS(DT_CHOSEN(zephyr_code_partition)) + +#define PARTITION_IS_RUNNING_APP_PARTITION(label) \ + (PARTITION_OFFSET(label) <= LOAD_OFFSET && \ + PARTITION_OFFSET(label) + PARTITION_SIZE(label) > LOAD_OFFSET) LOG_MODULE_REGISTER(mcumgr_img_grp, CONFIG_MCUMGR_GRP_IMG_LOG_LEVEL); @@ -79,7 +81,7 @@ int img_mgmt_active_slot(int image) { int slot = 0; /* This covers single image, including DirectXiP */ - if (FIXED_PARTITION_IS_RUNNING_APP_PARTITION(slot1_partition)) { + if (PARTITION_IS_RUNNING_APP_PARTITION(slot1_partition)) { slot = 1; } LOG_DBG("(%d) => %d", image, slot); diff --git a/subsys/shell/backends/Kconfig.bm_uarte b/subsys/shell/backends/Kconfig.bm_uarte index a825c07bac..464005313e 100644 --- a/subsys/shell/backends/Kconfig.bm_uarte +++ b/subsys/shell/backends/Kconfig.bm_uarte @@ -51,4 +51,12 @@ config SHELL_BACKEND_SERIAL config SHELL_MINIMAL default y +# Workaround for added build assert in zephyr that should only be checked when multithreading is +# enabled. Kconfig is not used with multithreading disabled. +config SHELL_STACK_SIZE + int "Shell thread stack size" + default 32 + help + Stack size for thread created for each instance. + endif diff --git a/subsys/softdevice_handler/Kconfig b/subsys/softdevice_handler/Kconfig index 0f445aa374..e27736a7ee 100644 --- a/subsys/softdevice_handler/Kconfig +++ b/subsys/softdevice_handler/Kconfig @@ -237,7 +237,7 @@ endif # NRF_SDH_BLE config NRF_SDH_SOC_RAND_SEED bool "Automatically seed SoftDevice random" - depends on NRF_SECURITY + depends on PSA_CRYPTO depends on MBEDTLS_PSA_CRYPTO_C default y help diff --git a/subsys/softdevice_handler/irq_connect.c b/subsys/softdevice_handler/irq_connect.c index 7b1ad13d49..54e54e49af 100644 --- a/subsys/softdevice_handler/irq_connect.c +++ b/subsys/softdevice_handler/irq_connect.c @@ -34,7 +34,7 @@ uint32_t softdevice_vector_forward_address; static void sd_enable_irq_forwarding(void) { - softdevice_vector_forward_address = FIXED_PARTITION_OFFSET(softdevice_partition); + softdevice_vector_forward_address = PARTITION_OFFSET(softdevice_partition); #ifdef CONFIG_BOOTLOADER_MCUBOOT softdevice_vector_forward_address += CONFIG_ROM_START_OFFSET; #endif diff --git a/subsys/softdevice_handler/nrf_sdh.c b/subsys/softdevice_handler/nrf_sdh.c index fb997273ea..903545357d 100644 --- a/subsys/softdevice_handler/nrf_sdh.c +++ b/subsys/softdevice_handler/nrf_sdh.c @@ -132,7 +132,7 @@ static int nrf_sdh_enable(void) }; if (IS_ENABLED(CONFIG_NRF_SDH_LOG_SD_INFO)) { - const uint32_t base = FIXED_PARTITION_OFFSET(softdevice_partition); + const uint32_t base = PARTITION_OFFSET(softdevice_partition); const struct nrf_sdh_info_version sd_ver = nrf_sdh_info_version_get(base); const struct nrf_sdh_info_unique_str sd_unique = nrf_sdh_info_unique_str_get(base); diff --git a/subsys/storage/flash_map/flash_map_mcumgr.c b/subsys/storage/flash_map/flash_map_mcumgr.c index 4cb17578e9..b08746665e 100644 --- a/subsys/storage/flash_map/flash_map_mcumgr.c +++ b/subsys/storage/flash_map/flash_map_mcumgr.c @@ -11,14 +11,14 @@ const struct flash_area default_flash_map[] = { { .fa_id = 1, - .fa_off = FIXED_PARTITION_OFFSET(slot0_partition), - .fa_size = FIXED_PARTITION_SIZE(slot0_partition), + .fa_off = PARTITION_OFFSET(slot0_partition), + .fa_size = PARTITION_SIZE(slot0_partition), .fa_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_flash_controller)), }, { .fa_id = 2, - .fa_off = FIXED_PARTITION_OFFSET(slot1_partition), - .fa_size = FIXED_PARTITION_SIZE(slot1_partition), + .fa_off = PARTITION_OFFSET(slot1_partition), + .fa_size = PARTITION_SIZE(slot1_partition), .fa_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_flash_controller)), }, }; diff --git a/sysbuild/CMakeLists.txt b/sysbuild/CMakeLists.txt index 751b372d1e..8d80db8427 100644 --- a/sysbuild/CMakeLists.txt +++ b/sysbuild/CMakeLists.txt @@ -66,9 +66,9 @@ function(bm_install_setup) if(SB_CONFIG_SOC_SERIES_NRF54L) if(SB_CONFIG_BM_BOOTLOADER_MCUBOOT_SIGNATURE_TYPE_NONE) - set_config_bool(mcuboot CONFIG_NRF_SECURITY y) + set_config_bool(mcuboot CONFIG_PSA_CRYPTO y) elseif(SB_CONFIG_BM_BOOTLOADER_MCUBOOT_SIGNATURE_TYPE_ED25519) - set_config_bool(mcuboot CONFIG_NRF_SECURITY y) + set_config_bool(mcuboot CONFIG_PSA_CRYPTO y) # We are sure that ED25519 signature on MCUboot does not need these set_config_bool(mcuboot CONFIG_PSA_USE_CRACEN_AEAD_DRIVER n) diff --git a/tests/subsys/fs/bm_zms/src/main.c b/tests/subsys/fs/bm_zms/src/main.c index 1d9f37b6f4..f6ae13eafc 100644 --- a/tests/subsys/fs/bm_zms/src/main.c +++ b/tests/subsys/fs/bm_zms/src/main.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -34,8 +35,7 @@ K_SEM_DEFINE(mount_sem, 0, 1); K_SEM_DEFINE(clear_sem, 0, 1); K_SEM_DEFINE(write_sem, 0, 1); #else -#define STORAGE_NODE DT_NODELABEL(storage_partition) -#define TEST_PARTITION_START DT_REG_ADDR(STORAGE_NODE) +#define TEST_PARTITION_START PARTITION_ADDRESS(storage_partition) #endif #if defined(CONFIG_SOFTDEVICE) diff --git a/west.yml b/west.yml index 463b672fb8..d88490d124 100644 --- a/west.yml +++ b/west.yml @@ -14,7 +14,7 @@ manifest: projects: - name: nrf repo-path: sdk-nrf - revision: v3.3.0 + revision: v3.4.0-rc1 import: name-allowlist: - cmsis