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

bttester: Reduce BUF_ACL_RX_SIZE to 100 for nrf53 #1196

Draft
wants to merge 154 commits into
base: main
Choose a base branch
from

Conversation

laxiLang
Copy link
Contributor

In order to pass the l2cap pts tests.

tejlmand and others added 30 commits May 26, 2023 11:29
This commit sets `ZEPHYR_<MODULE_NAME>_KCONFIG` variable for each
Kconfig file discovered in `nrf/modules/<module>/Kconfig`.

This is not meant as a permanent solution; we should do more careful
consideration on the optimal approach forward that will allow
compliance_check.py to be used downstream with custom
module_ext_roots, and at the same time keep current flexibility for
module glue code handling intact.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
(cherry picked from commit c78a6ea)
This file is used for NCS-specific testing configuration based on
modifications to files in this repository.

Signed-off-by: Alperen Sener <alperen.sener@nordicsemi.no>
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Signed-off-by: Elisabeth Solheim Klakken <elisabeth.solheim@nordicsemi.no>
Signed-off-by: Mariusz Poslinski <mariusz.poslinski@nordicsemi.no>
Signed-off-by: Markus Swarowsky <markus.swarowskyl@nordicsemi.no>
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Signed-off-by: Sebastian Wezel <sebastian.wezel@nordicsemi.no>
Signed-off-by: Tomasz Tyzenhauz <tomasz.tyzenhauz@nordicsemi.no>
Signed-off-by: Fredrik Ås <fredrik.aas@nordicsemi.no>
Signed-off-by: Michał Szablowski <michal.szablowski@nordicsemi.no>
Signed-off-by: Tony Le <tony.le@nordicsemi.no>
Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
(cherry picked from commit 2a59fbd)
(cherry picked from commit acb96b1)
(cherry picked from commit e102ad1)
Bring back parallel execution to the clang action. In the upstream
they went to use a single dedicated powerful agent to run this. We
need to keep this as we have to base on agents available in github's
cloud.

zephyr_runner is upstream's proprietary agent inaccessible outside of
upstream's CI. Use ubuntu-latest instead.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
(cherry picked from commit 5b3d0ff)
Necessary changes for NCS CI.

- Add a Jenkinsfile
- compliance.yml: Disable check for merge commits, since we have upmerges
  downstream.
  Add an additional check for sauce tags (details in scripts/gitlint)
  Also, since in the code we refer to Kconfig symbols that are defined
  in the sdk-nrf repository, the Kconfig checks (Kconfig and
  KconfigBasic) will not pass so exclude them.
- Extend the max commit line lengths for Gitlint to account for sauce
  tags
- scripts/gitlint: Add support for sauce tags checks. In order to not
  interfere with CI in other repos (namely sdk-nrf) this is run as an
  independent gitlint invocation and not as part of check_compliance.py.
  This invocation enables the ncs-sauce-tags rule and, since it runs
  before rebasing and thus will run on merge commits, disables the
  title-starts-with-subsystem rule by setting a catch-all regex.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
(cherry picked from commit d34b035)
Add scripts/quarantine.yaml file, which will be used in CI.

Signed-off-by: Piotr Golyzniak <piotr.golyzniak@nordicsemi.no>
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit d08f81f)
(cherry picked from commit 9a7ce33)
(cherry picked from commit b176697)
Kconfig search is handled in a separate docset in NCS, so remove the
page. This is a long-term noup patch.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
(cherry picked from commit 89babe6)
(cherry picked from commit fdbdd80)
Partition Manager (PM) is a component of the nRF Connect SDK (NCS)
which uses yaml files to resolve flash partition placement with a
holistic view of the entire device, including each firmware image
present on the flash device, and various subsystems, such as settings
and NFFS.

When this NCS extension is used, various source files which would use
partition information from devicetree in "vanilla" zephyr instead use
defines generated by PM instead.

This commit removes support for HEX_FILES_TO_MERGE, as it conflicts
with PM.

The settings subsystem pm.yml defines a partition 'settings_storage'.
The nffs subsystem pm.yml defines 'nffs_storage'.

Leverage label translation to avoid patching partition names.

Refer to the NCS documentation page for this feature for more details.

This is a long-running out of tree patch which has been worked on by
several people. The following sign-offs are in alphabetical order by
first name.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: Ole Sæther <ole.saether@nordicsemi.no>
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Signed-off-by: Sigvart Hovland <sigvart.hovland@nordicsemi.no>
Signed-off-by: Thomas Stenersen <thomas.stenersen@nordicsemi.no>
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
(cherry picked from commit ba54fe8)
This is a long-term noup patch because driver support is NCS-only.

Set HAS_HW_NRF_CC3XX to be defined in NS build when cryptocell
is accessed through the PSA API.
We need to know which CC3XX features are available.

Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
(cherry picked from commit c76cf87)
(cherry picked from commit 214533f)
-Adds Kconfig.psa
-Add standardized algorithms, curve types etc as Kconfig variables
-Add configurations for internal logic to see if a feature
 is enabled by PSA_WANTS_XXX

ref: NCSDK-11689
ref: NCSDK-17840
ref: NCSDK-17840

Signed-off-by: Frank Audun Kvamtrø <frank.kvamtro@nordicsemi.no>
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
(cherry picked from commit c913e3a)
(cherry picked from commit 6ae8ab0)
Out-of-tree crypto subsystems need to deselect MBEDTLS_BUILTIN, but
deselection is not supported. It is however supported to select a
dependency in a ! expression.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
(cherry picked from commit d2eb105)
-This allows configurations enabled by PSA_WANTS_ALG_XXXX to be
 used to control which TF-M module is enabled
-If the TF-M image doesn't support e.g. the MAC APIs, then the
 MAC interface is not enabled

Note: This functionality requires that nrf_security is enabled

ref: NCSDK-11689

Signed-off-by: Frank Audun Kvamtrø <frank.kvamtro@nordicsemi.no>
(cherry picked from commit 55015d6)
…neric

-This commit prevents legacy mbed TLS configurations from being in
 conflict with PSA Configurations while using nrf_security
-Removing use of unsupported TLS protocols (TLS 1.0, 1.1)
-Required configurations are duplicated inside nrf_security Kconfig
-Ensured that mbedtls_platform_zeroize is not duplicated when
 CONFIG_NRF_CC3XX_PLATFORM is set

ref: NCSDK-13503

Signed-off-by: Frank Audun Kvamtrø <frank.kvamtro@nordicsemi.no>
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
(cherry picked from commit 84ee8c8)
Add some socket options and address family extensions to Zephyr
headers, which will be useful for nRF Connect SDK.

Add secure socket options:
* Add CID socket options to NCS specific options.
* Add TLS/DTLS tls ciphersuite chosen socket option to NCS specific
  options.
* Add TLS/DTLS connection save/load socket options to NCS specific
  options.
* Add TLS/DTLS handshake status socket option to NCS specific options.

The "author" of this commit is a contact person; various people with
s-o-b lines following here have contributed to the maintenance of this
patch.

Signed-off-by: Andreas Moltumyr <andreas.moltumyr@nordicsemi.no>
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Signed-off-by: Christopher Métrailler <christopher.metrailler@nordicsemi.no>
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
Signed-off-by: Glenn Ruben Bakke <glenn.ruben.bakke@nordicsemi.no>
Signed-off-by: Håkon Alseth <haal@nordicsemi.no>
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Signed-off-by: Jan Tore Guggedal <jantore.guggedal@nordicsemi.no>
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: Mirko Covizzi <mirko.covizzi@nordicsemi.no>
Signed-off-by: Petri Honkala <petri.honkala@nordicsemi.no>
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Signed-off-by: Tommi Mammela <tommi.mammela@nordicsemi.no>
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
(cherry picked from commit 11a73e1)
(cherry picked from commit 1fbee9f)
Provides an option to enable TLS session caching for an MQTT
client's secure socket.

Signed-off-by: Jan Tore Guggedal <jantore.guggedal@nordicsemi.no>
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
(cherry picked from commit 97e75e9)
This commit adds an extra parameter in the configuration
structure to configure native TLS support at runtime.

Signed-off-by: Mirko Covizzi <mirko.covizzi@nordicsemi.no>
(cherry picked from commit a719cd2)
Added a code for initializing shared memory to zero. This operation
normalizes the memory state so that the IPC service is no longer
prone to reading status bits from the previous reset session.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
(cherry picked from commit 5e850cf)
Enable dynamic power control in hci_pwr_ctrl sample for
platforms using hci_rpmsg as controller

Signed-off-by: Azizah Ibrahim <azizah.ibrahim@nordicsemi.no>
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
(cherry picked from commit 14f6d9c)
Added a configuration file for the HCI RPMsg child image that is necessary
for multi-core targets.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
(cherry picked from commit 761f5fd)
This is a follow-up to commit 9dd570f.

Since in NCS, unlike in vanilla Zephyr, the nano variant of newlib
is the default one, restore entries that disable the nano variant
in one sample and one test that require the full newlib variant.
This patch is supposed to be removed when picolibc becomes the default.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
(cherry picked from commit 5620420)
Change introduces common static Partition Manager configuration.
The tfm_nonsecure partition must be SPU region aligned.

Ref: NCSDK-18033
Ref: NCSDK-19515

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
(cherry picked from commit 6a9eba7)
Friend's replies on LPN's polls do not assume randomization in
advertiser. Zero randomization will help to optimize time when
LPN keeps receiving window open and save power.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
(cherry picked from commit 88d5ef9)
Update Kconfig options for qualification:
 - Remove experimental on qualified feature.
 - Add experimental on unqualified feature.
 - BT_L2CAP_ECRED is not marked as experimental upstream and we qualify it
   downstream.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Signed-off-by: Ingar Kulbrandstad <ingar.kulbrandstad@nordicsemi.no>
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
(cherry picked from commit a6c2e3b)
Fixes issue where randomness can be removed for advertising sets that
have to handle other adv types than the BT_MESH_FRIEND_ADV tag type.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
(cherry picked from commit f8f1133)
Enabling USB CDC by default in Thingy:53 board configuration
caused that there were two instances of USB CDC in MCUBoot. Change
disables one instance which was added automatically by NCS if
MCUBoot bootloader was built as a child image.

Jira: NCSDK-18596

Signed-off-by: Mateusz Kapala <mateusz.kapala@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
(cherry picked from commit 5193278)
Enable TF-M by default for nordic nRF5340 and nrf9160 SoC boards.

NCSDK-14811

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Signed-off-by: Alex Tsamakos <alex@actinius.com>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
(cherry picked from commit 1f9e520)
Change enables MCUboot bootloader by default to allow programming
samples and applications without external programmer (using MCUboot
serial recovery). Change also enables network core to prevent build
failures when building MCUboot with nRF53 multi image DFU.

Jira: NCSDK-18263

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
(cherry picked from commit 4689549)
The commit adds bootutil hook, for nrf5340, to allow it
handling the non-accessible image-1/primary slot.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
(cherry picked from commit 840b8fa)
(cherry picked from commit 9af7d7a)
If WPA supplicant is enabled at build time, then use the WPA
supplicant APIs, else use offload driver APIs. Use z_wpa_supplicant as
the name space.

Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
(cherry picked from commit 1f61ba5)
Fix some additional cases in in-tree applications (samples and tests).

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
(cherry picked from commit 1d214e7)
… SFD

OpenThread requires that the `mTimestamp` parameter from the `mRxInfo`
struct points to the end of SFD, i.e. beggining of PHR.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
(cherry picked from commit 760d8fc)
pjasinski990 and others added 22 commits May 26, 2023 17:48
openthread upmerge to `d9abe30`

Signed-off-by: Piotr Jasiński <piotr.jasinski@nordicsemi.no>
(cherry picked from commit 9efd52f)
(cherry picked from commit 1648ab1)
Param type is set to correct type for power save timeout.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
(cherry picked from commit d47021b)
(cherry picked from commit 5acaefe)
Display MFP info in scan results.

Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
(cherry picked from commit 0889cea)
(cherry picked from commit 1b36aa5)
Fixed comparison between signed(int16_t) and unsigned(size_t) variables.

Signed-off-by: Wojciech Slenska <wsl@trackunit.com>
(cherry picked from commit 330a2f8)
(cherry picked from commit 162ab27)
Fixes an issue where variables like BOARD_ROOT would be provided
to sysbuild but would then be lost on target images.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
(cherry picked from commit cd9465a)
(cherry picked from commit 9d64118)
… MERGE mode

Fixes a regression whereby the variable would be cleared prior to
being used in MERGE mode.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
(cherry picked from commit 87f50bb)
(cherry picked from commit bb8f70a)
…unction

Fixes a string comparison which is missing quotes, this works
on the first invocation but fails on the second if quotes are
not present.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
(cherry picked from commit a41f44b)
(cherry picked from commit 7ee2fa8)
…iple variables

This commit extends zephyr_get() to support multiple variable names to
be fetched into a single variable.

Example:
  zephyr_get(FOO VAR FOO_A FOO_B FOO_C)

will lookup each FOO_A, FOO_B, FOO_C for supported scopes and return
the value in FOO of the first scope encountered having one of the
variables defined.

If MERGE is specified, then all scopes for all vars are looped and the
variable values are merged into FOO and returned.

This functionality will allow to deprecate user-facing settings while
ensuring that both the new and deprecated variables are considered
in zephyr_get() and also taking into consideration the scope with
highest precedence.

This allows Zephyr CMake to do:
  zephyr_get(FOO VAR FOO DEPRECATED_FOO)

  zephyr_get(BAR MERGE VAR BAR DEPRECATED_BAR)

This allows support of old and new setting for a given number of
releases.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
(cherry picked from commit 8460d91)
(cherry picked from commit b7aa221)
…_CONFIG

This commit introduces EXTRA_CONF_FILE and deprecates OVERLAY_CONFIG.

It has often caused confusion that OVERLAY_CONFIG adds extra
configuration fragments to the value of CONF_FILE (default: prj.conf),
but the similar named variable DTC_OVERLAY_FILE replaces the default
dtc overlay file used by the build system.

To remove such confusion, this commit introduces the EXTRA_ prefix in
front of CONF_FILE to clearly indicate it's purpose.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
(cherry picked from commit 3a34568)
(cherry picked from commit c174508)
This commit introduces EXTRA_DTC_OVERLAY_FILE.

This allows users to specify additional devicetree overlays in addition
to a sample / board specific default devicetree overlay files.

It also allows snippets to provide extra devicetree overlays on addition
to sample / board specific overlays.

The name EXTRA_DTC_OVERLAY_FILE clearly indicates the purpose and
follows the naming scheme of EXTRA_ in front of variable name.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
(cherry picked from commit 384fb1e)
(cherry picked from commit 0fe5a56)
…CONF_FILE var

Update package_helper.cmake to use EXTRA_CONF_FILE instead of deprecated
OVERLAY_CONFIG variable.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
(cherry picked from commit ca76349)
(cherry picked from commit 47d7941)
Align sysbuild with Zephyr CMake so that sysbuild supports
SB_EXTRA_CONF_FILE. Keep support for the old SB_OVERLAY_CONFIG.

This ensures that sysbuild is consistent with Zephyr CMake configuration
file handling.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
(cherry picked from commit 5c40607)
(cherry picked from commit 49e95c2)
Update nrf53_sync_rtc to use EXTRA_CONF_FILE instead of the old
OVERLAY_CONFIG.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
(cherry picked from commit 391f4c9)
(cherry picked from commit 9edf62a)
Introduce EXTRA_CONF_FILE and EXTRA_DTC_OVERLAY_FILE and remove old
references to OVERLAY_CONFIG.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
(cherry picked from commit 754eca9)
(cherry picked from commit 7c5db34)
Update rst files to use EXTRA_CONF_FILE instead of OVERLAY_CONFIG.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
(cherry picked from commit 1120934)
(cherry picked from commit 75b5e45)
…DULES

Align Zephyr modules with other user facing variables where settings
can be defined or extended, meaning Zephyr modules now supports:
ZEPHYR_MODULES and EXTRA_ZEPHYR_MODULES.

Support for ZEPHYR_EXTRA_MODULES is kept foir backward compatibility.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
(cherry picked from commit a885027)
(cherry picked from commit 0b4be63)
Update Zephyr modules documentation to use EXTRA_ZEPHYR_MODULES.
This gives a more consistent naming scheme in Zephyr CMake build system.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
(cherry picked from commit 6c8e52b)
(cherry picked from commit a85057c)
Adding the possibility to have the list returned in reversed order when
using `zephyr_get(... MERGE).

`zephyr_get(... MERGE)` creates a list which populates the content based
on variable settings in the following scopes, in this order:
sysbuild, cache, environment, local.

This works well for lists where content first in list has highest
precedence, such as ROOTs settings.
However, for settings where the value last in the list will overwrite
values earlier in the list, we want the list to be reversed, examples
of such can be CONF_FILE, OVERLAY_CONFIG, DTC_OVERLAY_FILE, where the
content of the file last in the list will overrule the content from an
earlier file.
So to ensure that a DTC_OVERLAY_FILE defined as cache takes precedence
over an env or local scope variable the possibility of reversing the
list must be available.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
(cherry picked from commit fd526cc)
(cherry picked from commit e56afd2)
…_CONF_FILE

This commit adds change snippets to use the new EXTRA_DTC_OVERLAY_FILE
and EXTRA_CONF_FILE Zephyr build system variables instead of
DTC_OVERLAY_FILE and OVERLAY_CONFIG.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
(cherry picked from commit 1561a07)
(cherry picked from commit d683f25)
zephyr_get() supports multiple scopes when returning variables.
Variables are returned based on the scope's priority.

To facilitate creation of more scopes in Zephyr for variable handling
additional functions are introduced.
- zephyr_create_scope(<scope>)
    creates a new scope
- zephyr_set(<var> <val>... SCOPE <scope>)
    set the value of a variable in the specified scope.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
(cherry picked from commit a6d9105)
(cherry picked from commit b8f7f3a)
Fixes: #57139

Snippets provides the possibility of defining EXTRA_DTC_OVERLAY_FILE and
EXTRA_CONF_FILE in snippets.
Snippets must co-exist with existing infrastructure of
EXTRA_DTC_OVERLAY_FILE and EXTRA_CONF_FILE, and a user specifying a
snippet must be able to specify extra files for adjusting the snippet.

This means that if the following is specified:
`-DSNIPPET=some_snippet -DEXTRA_CONF_FILE=extra.conf`
then `extra.conf` may contain adjustments to the snippet.
Similar to sysbuild. Imagine a sysbuild controlled image uses a default
snippet for building, by ensuring that any extra
`-D<image>_EXTRA_CONF_FILE=extra.conf` arguments takes precedence over
the snippet we allow users to make adjustments if they need.

This commit introduces a snippets scope where snippet scoped variables
can be set with `zephyr_set()` and then `zephyr_get()` will take the
snippet scoped variables into consideration before returning.

Adjust calls to `zephyr_get(EXTRA_DTC_OVERLAY_FILE)` and
`zephyr_get(EXTRA_CONF_FILE)` to use `MERGE` to ensure all scopes are
considered.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
(cherry picked from commit ba48dd8)
(cherry picked from commit b9d092e)
In order to pass the l2cap pts tests.

Signed-off-by: Lang Xie <lang.xie@nordicsemi.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.