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

nrf53: Halt app CPU before flashing netcore #1105

Open
wants to merge 225 commits into
base: main
Choose a base branch
from

Conversation

swojo
Copy link

@swojo swojo commented Mar 24, 2023

Ongoing IPC communication between the app and net cores can cause flashing to fail on the nrf53 . This is because the network core is flashed first and the app core is not halted during this time. Attempted IPC communication can then lead to assertions/resets during the flashing process.

This PR proposes to halt the app core before halting and flashing the network core for the nrf53.

tejlmand and others added 30 commits February 20, 2023 14:44
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 0510664)
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>
(cherry picked from commit b1bc6c6)
(cherry picked from commit cb225d2)
(cherry picked from commit 09758a6)
(cherry picked from commit 0e8d3fa)
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 9e7b24c)
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 5b1c0d0)
(cherry picked from commit aa5def0)
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>
(cherry picked from commit 2231f20)
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>
(cherry picked from commit 290b37a)
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 3181f6f)
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 a0eba5b)
-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>
(cherry picked from commit e968e0f)
(cherry picked from commit 45f86b1)
(cherry picked from commit c6184a9)
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 39a18d7)
-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 c094977)
…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 72d68cb)
Add some socket options and address family extensions to Zephyr
headers, which will be useful for nRF Connect SDK.

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: Mirko Covizzi <mirko.covizzi@nordicsemi.no>
(cherry picked from commit 191a8d6)
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 037d897)
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 890d32b)
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>
(cherry picked from commit 2104c26)
(cherry picked from commit be420be)
(cherry picked from commit 1767131)
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 d62225e)
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>
(cherry picked from commit 5507eaa)
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 f4b7179)
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 2ed6b3d)
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 ac1d486)
The sample is requesting an initial attestation token, which requires
running the provisioning sample before, so the device has the needed
key material programmed.
This updates the documentation to make users aware of this and as the
provisioning sample is in sdk-nrf, a noup is used.

Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
(cherry picked from commit 9114a18)
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>
(cherry picked from commit 3e72cbb)
(cherry picked from commit 707ff27)
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 9a86803)
(cherry picked from commit 2b6325a)
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>
(cherry picked from commit 4771258)
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 c576e5b)
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 b63046b)
…ent for twister

The net_mgmt sample enables a lot of features, resulting in pretty large
image sizes for various platforms (~200k). At the same time, the
sample.yaml for the sample did not specify minimum flash requirement for
the sample, causing flash overflows during build in certain cases.
This commit fixes this by setting a reasonable flash requirement for the
sample.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit f33072a)
Changing the log mode to minimal to reduce flash size

Signed-off-by: Alperen Sener <alperen.sener@nordicsemi.no>

(cherry picked from commit 1af9b40)
…zephyr versions

This fixes an issue whilst investigating using iterable sections,
which cannot be used when the non-zephyr prefixed functions are
used. It also resolves a possible critical bug intoduced with the
MCUmgr rework whereby functions or elements seem to have silently
dropped.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
(cherry picked from commit 95697b5)
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
(cherry picked from commit 6d666a4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.