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

Upmerge 2025.03.12 #20895

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
3 changes: 0 additions & 3 deletions Kconfig.nrf
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@ config NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE
chosen Zephyr flash devicetree node to ensure that swapping can be
performed.

config GETOPT
default n

# Temporary hack to be able to build samples and tests on the nRF51L15/nRF54L20 Eng A/nRF7120 FLPR core
config FLASH_BASE_ADDRESS
hex
Expand Down
77 changes: 18 additions & 59 deletions cmake/extensions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,8 @@ endfunction()
#
# DTS <list>: List to populate with DTS overlay files
# KCONF <list>: List to populate with Kconfig fragment files
# PM <list>: List to populate with board / build / domain specific
# PM <list>: List to populate with board / domain specific
# static partition manager files
# BUILD <type>: Build type to include for search.
# For example:
# BUILD debug, will look for <board>_debug.conf
# and <board>_debug.overlay, instead of <board>.conf
# DOMAIN <domain>: Domain to use. This argument is only effective
# for partition manager configuration files.
#
Expand All @@ -157,12 +153,10 @@ Please provide one of following: CONF_FILES")
endif()

set(single_args CONF_FILES PM DOMAIN)
set(zephyr_conf_single_args BOARD BOARD_REVISION BUILD DTS KCONF SUFFIX)
set(zephyr_conf_single_args BOARD BOARD_REVISION DTS KCONF SUFFIX)

cmake_parse_arguments(PREPROCESS_ARGS "" "${single_args};${zephyr_conf_single_args}" "" ${ARGN})
# Remove any argument that is missing value to ensure proper behavior in situations like:
# ncs_file(CONF_FILES <path> PM <list> DOMAIN BUILD <type>)
# where value of DOMAIN could wrongly become BUILD which is another keyword.
# Remove any argument that is missing value to ensure proper behavior
if(DEFINED PREPROCESS_ARGS_KEYWORDS_MISSING_VALUES)
list(REMOVE_ITEM ARGN ${PREPROCESS_ARGS_KEYWORDS_MISSING_VALUES})
endif()
Expand All @@ -173,9 +167,7 @@ Please provide one of following: CONF_FILES")
if(ZEPHYR_FILE_KCONF)
if(ZEPHYR_FILE_SUFFIX AND EXISTS ${NCS_FILE_CONF_FILES}/prj_${ZEPHYR_FILE_SUFFIX}.conf)
set(${ZEPHYR_FILE_KCONF} ${NCS_FILE_CONF_FILES}/prj_${ZEPHYR_FILE_SUFFIX}.conf)
elseif(ZEPHYR_FILE_BUILD AND EXISTS ${NCS_FILE_CONF_FILES}/prj_${ZEPHYR_FILE_BUILD}.conf)
set(${ZEPHYR_FILE_KCONF} ${NCS_FILE_CONF_FILES}/prj_${ZEPHYR_FILE_BUILD}.conf)
elseif(NOT ZEPHYR_FILE_BUILD AND EXISTS ${NCS_FILE_CONF_FILES}/prj.conf)
elseif(EXISTS ${NCS_FILE_CONF_FILES}/prj.conf)
set(${ZEPHYR_FILE_KCONF} ${NCS_FILE_CONF_FILES}/prj.conf)
endif()
endif()
Expand Down Expand Up @@ -212,54 +204,21 @@ Please provide one of following: CONF_FILES")
if(NCS_FILE_PM)
set(PM_FILE_PREFIX pm_static)

if(DEFINED FILE_SUFFIX)
# Prepare search for pm_static_board@ver_suffix.yml
zephyr_build_string(filename
BOARD ${board_name}
BOARD_REVISION ${board_revision}
BOARD_QUALIFIERS ${board_qualifiers}
)
set(filename_list ${PM_FILE_PREFIX}_${filename})

# Prepare search for pm_static_board_suffix.yml
zephyr_build_string(filename
BOARD ${board_name}
BOARD_QUALIFIERS ${board_qualifiers}
)
list(APPEND filename_list ${PM_FILE_PREFIX}_${filename})

list(APPEND filename_list ${PM_FILE_PREFIX})
else()
# Prepare search for pm_static_board@ver_build.yml
zephyr_build_string(filename
BOARD ${board_name}
BOARD_REVISION ${board_revision}
BOARD_QUALIFIERS ${board_qualifiers}
BUILD ${ZEPHYR_FILE_BUILD}
)
set(filename_list ${PM_FILE_PREFIX}_${filename})

# Prepare search for pm_static_board_build.yml
zephyr_build_string(filename
BOARD ${board_name}
BOARD_QUALIFIERS ${board_qualifiers}
BUILD ${ZEPHYR_FILE_BUILD}
)
list(APPEND filename_list ${PM_FILE_PREFIX}_${filename})

if(DEFINED ZEPHYR_FILE_BUILD)
# Prepare search for pm_static_build.yml
# Note that BOARD argument is used to position suffix accordingly
zephyr_build_string(filename
BOARD ${ZEPHYR_FILE_BUILD}
)
list(APPEND filename_list ${PM_FILE_PREFIX}_${filename})
endif()

# Prepare search for pm_static.yml
list(APPEND filename_list ${PM_FILE_PREFIX})
endif()
# Prepare search for pm_static_board@ver_suffix.yml
zephyr_build_string(filename
BOARD ${board_name}
BOARD_REVISION ${board_revision}
BOARD_QUALIFIERS ${board_qualifiers}
)
set(filename_list ${PM_FILE_PREFIX}_${filename})

# Prepare search for pm_static_board_suffix.yml
zephyr_build_string(filename
BOARD ${board_name}
BOARD_QUALIFIERS ${board_qualifiers}
)
list(APPEND filename_list ${PM_FILE_PREFIX}_${filename})
list(APPEND filename_list ${PM_FILE_PREFIX})
list(REMOVE_DUPLICATES filename_list)

foreach(filename ${filename_list})
Expand Down
2 changes: 0 additions & 2 deletions cmake/partition_manager.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ foreach(config_dir ${APPLICATION_CONFIG_DIR} ${COMMON_CHILD_IMAGE_CONFIG_DIR})
ncs_file(CONF_FILES ${config_dir}
PM conf_dir_pm_static
DOMAIN ${DOMAIN}
BUILD ${CONF_FILE_BUILD_TYPE}
)
if(EXISTS ${conf_dir_pm_static})
break()
Expand All @@ -48,7 +47,6 @@ endforeach()
ncs_file(CONF_FILES ${BOARD_DIR}
PM board_dir_pm_static
DOMAIN ${DOMAIN}
BUILD ${CONF_FILE_BUILD_TYPE}
)

ncs_file(CONF_FILES ${BOARD_DIR}
Expand Down
2 changes: 0 additions & 2 deletions cmake/sysbuild/partition_manager.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,12 @@ function(partition_manager)
ncs_file(CONF_FILES ${${image_name}_APPLICATION_CONFIG_DIR}
PM conf_dir_pm_static
DOMAIN ${PM_DOMAIN}
BUILD ${CONF_FILE_BUILD_TYPE}
${ncs_file_board}
)

ncs_file(CONF_FILES ${BOARD_DIR}
PM board_dir_pm_static
DOMAIN ${PM_DOMAIN}
BUILD ${CONF_FILE_BUILD_TYPE}
${ncs_file_board}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <string.h>

#include <zephyr/shell/shell.h>
#ifdef CONFIG_GETOPT
#ifdef CONFIG_POSIX_C_LIB_EXT
#include <zephyr/posix/unistd.h>
#endif
#include <getopt.h>
Expand Down
2 changes: 1 addition & 1 deletion samples/cellular/modem_shell/src/ping/icmp_ping_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <zephyr/kernel.h>

#include <zephyr/shell/shell.h>
#ifdef CONFIG_GETOPT
#ifdef CONFIG_POSIX_C_LIB_EXT
#include <zephyr/posix/unistd.h>
#endif
#include <getopt.h>
Expand Down
2 changes: 1 addition & 1 deletion samples/cellular/modem_shell/src/rest/rest_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <assert.h>

#include <zephyr/shell/shell.h>
#ifdef CONFIG_GETOPT
#ifdef CONFIG_POSIX_C_LIB_EXT
#include <zephyr/posix/unistd.h>
#endif
#include <getopt.h>
Expand Down
2 changes: 1 addition & 1 deletion samples/cellular/modem_shell/src/sms/sms_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <assert.h>
#include <string.h>
#include <stdio.h>
#ifdef CONFIG_GETOPT
#ifdef CONFIG_POSIX_C_LIB_EXT
#include <zephyr/posix/unistd.h>
#endif
#include <getopt.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/bluetooth/iso/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ CONFIG_MINIMAL_LIBC=n
CONFIG_NEWLIB_LIBC=y
# Need to disable devmem shell since it enforces Zephyr's internal version of getopt
CONFIG_DEVMEM_SHELL=n
CONFIG_GETOPT=y
CONFIG_POSIX_C_LIB_EXT=y
CONFIG_GETOPT_LONG=y
CONFIG_SHELL_GETOPT=y

Expand Down
4 changes: 2 additions & 2 deletions west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ manifest:
# https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/modules.html
- name: zephyr
repo-path: sdk-zephyr
revision: 3dc343520373f844e5ec3da607111f149589c9c4
revision: pull/2612/head
import:
# In addition to the zephyr repository itself, NCS also
# imports the contents of zephyr/west.yml at the above
Expand Down Expand Up @@ -128,7 +128,7 @@ manifest:
compare-by-default: true
- name: mcuboot
repo-path: sdk-mcuboot
revision: 148712e7b4618aadbedd04e8d3ce5c3847d3be4f
revision: pull/403/head
path: bootloader/mcuboot
- name: qcbor
url: https://github.com/laurencelundblade/QCBOR
Expand Down
Loading