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

DNM: Ble stack and init #20205

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

DNM: Ble stack and init #20205

wants to merge 121 commits into from

Conversation

frkv
Copy link
Contributor

@frkv frkv commented Feb 5, 2025

Just for test

Just for testing. Changes will be taken in #19720 if this works

test_low_level: PR-1765
test_rs: PR-1483
test_fem: PR-1483
test_ble_mesh: ble_mesh_upmerge_test
test_crypto: PR-750
test_suit_dfu: PR-450
test_tfm: PR-194
test_secdom_samples_public: NCSDK-NONE_upmerge_jan2025
test_audio: PR-294
test_wifi: sdk-nrf-pr-19720

maxd-nordic and others added 28 commits February 7, 2025 16:00
BLE logging size requirements have increased a lot.
We need to reduce logging to fit the application.

Signed-off-by: Maximilian Deubel <[email protected]>
Switched from speed to size optimization for nRF54H20 DK target in
debug configurations to reduce memory footprint.

Jira: NCSDK-31374

Signed-off-by: Mateusz Kapala <[email protected]>
Switched from speed to size optimizations for nRF54L15 DK (nRF54L05
emulated SoC) and enabled LTO in debug and release configurations
to reduce memory footprint.

Jira: NCSDK-31374

Signed-off-by: Mateusz Kapala <[email protected]>
Remove reference of z_impl_sys_rand_get().

Signed-off-by: Eivind Jølsgard <[email protected]>
Updates required by changes in zephyr upstream for the BT HCI driver.

Signed-off-by: Tommi Rantanen <[email protected]>
Update pm policy event usage after API was changed from
using relative time in cycles to absolute time in ticks.

Signed-off-by: Knut Eldhuset <[email protected]>
This test is not really useful in NCS context (checking if the nRF
Wi-Fi driver can be built successfully is done by other tests and
samples), and it requires the hal_atmel module to be pulled in
(because the WINC1500 driver requires two header files that are
located in that module). And the module weights ~87 MB, so it's
not reasonable to pull it in just for this one test.

Signed-off-by: Andrzej Głąbek <[email protected]>
Fixes an issue with stream writer by providing the size of the
partition

Signed-off-by: Jamie McCrae <[email protected]>
Change posix names to zsock in nrf_cloud lib.

Signed-off-by: Maximilian Deubel <[email protected]>
Some sdk-zephyr tests and samples reports issues due to
RAM overflow issues.

Refers:
NCSDK-31667
NCSDK-31671

Signed-off-by: Katarzyna Giądła <[email protected]>
Applications `applications.nrf_desktop.zrelease` and
`applications.nrf_desktop.zdebug` report RAM overflow.

Therefore, applications on listed platforms are moved
to quaratine.

Refers: NCSDK-31675

Signed-off-by: Katarzyna Giądła <[email protected]>
PSA requires large stacks, especially on 54.

Signed-off-by: Sean Madigan <[email protected]>
Signed-off-by: Frank Audun Kvamtrø <[email protected]>
Test configurations with secure_storage should be
move to quarantine due to issues on native_sim
platform.

Signed-off-by: Katarzyna Giądła <[email protected]>
Clang is not available in our toolchain, therefore
test kernel.common.toolchain will fail.

Signed-off-by: Katarzyna Giądła <[email protected]>
`nanopb_BUILD_RUNTIME` is not an option to be passed to nanopb,
but rather a cmake one, so set it to off in the proper way.

The previous invalid form was not working as intended and only by
chance not causing any problems. With a correction that was applied
in the nanopb module (removal of leading space before the first -I
directive passed to nanopb), this behavior changed and because of
that the generation could not be performed correctly.

Signed-off-by: Andrzej Głąbek <[email protected]>
Use zsock_addrinfo to avoid dependency on the POSIX subsystem.

Remove CONFIG_POSIX_API from provisioning tests.

Signed-off-by: Juha Ylinen <[email protected]>
... because this causes conflicting types compilation errors in library
files it uses.

Signed-off-by: Andrzej Głąbek <[email protected]>
Test scenarios `shell.device_filter` and
`init.check_init_priorities` should be fixed in
Zephyr first.

Signed-off-by: Katarzyna Giądła <[email protected]>
-This added SYS_INIT will ensure that psa_crypto_init is called
 in kernel *after* Hw_CC3XX is executed to ensure that mutexes are
 ready to be used.

Signed-off-by: Frank Audun Kvamtrø <[email protected]>
-Changing default y for nrf_security to use
 DT_HAS_ZEPHYR_PSA_CRYPTO_RNG_ENABLED instead of depending
 on ENTROPY_PSA_CRYPTO_RNG. Doing this avoids a dependency
 loop on ENTROPY_GENERATOR

Signed-off-by: Frank Audun Kvamtrø <[email protected]>
-This commit is only used to enact testing. The dependency for
 PR nrfconnect#2464 to the previous commit is inherent, but we would like
 to have a commit that is pickable in the upmerge

Signed-off-by: Frank Audun Kvamtrø <[email protected]>
This is required by PSA in NCS, so make sure it is selected
NRF_SECURITY_ENABLER.

Signed-off-by: Sean Madigan <[email protected]>
-Enabling ENTROPY_GENERATOR for BT_HOST_CRYPTO_PRNG and BT_ECC
 as a workaround of having ENTROPY_GENERATOR in sample/tests

Also the heap size required for bsim is larger than on
actual target, reason unknown.

Signed-off-by: Sean Madigan <[email protected]>
Signed-off-by: Frank Audun Kvamtrø <[email protected]>
The NRF_RNG_ENTROPY_DRIVER provides entropy though the PSA APIs.

This is used to seed/reseed the Oberon PSA random drivers
(CTR_DRBG/HMAC_DRBG). Before this was only used to allow enabling
this PSA driver with the devices which use the DT label 'rng'.

We extend that now to allow this driver to be used with the fake
entropy node which uses the DT label 'prng'.

This is needed to unblock development until real RNG is enabled
for all the needed applications/samples.

In practice this means that when 'prng' is enabled a device can
generate random numbers with the psa_generate_random call.

Signed-off-by: Georgios Vasilakis <[email protected]>
-Adding CONFIG_MBEDTLS_FORCE_LEGACY_MD for cc3xx/oberon legacy
 psa_tls to avoid that MBEDTLS_MD_SOME_PSA is getting set

Signed-off-by: Frank Audun Kvamtrø <[email protected]>
-Fixes issues with nRF54H20 and nRF5340dk in upmerge. This can be
 seen as a workaround
-Adjusting board-files for central_uart and peripheral_uart
 for nRF5340 and nRFH20 cpuapp

Signed-off-by: Frank Audun Kvamtrø <[email protected]>
-HKDF reports errors when MBEDTLS_MD_SOME_PSA is set. Setting this
 configuration to avoid trying to resolve with PSA APIs.
 This configurations and these tests to be removed with more
 standardization on PSA crypto

Signed-off-by: Frank Audun Kvamtrø <[email protected]>
Increased stack sizes to prevent the stack overflows.

Jira: NCSDK-31374

Signed-off-by: Mateusz Kapala <[email protected]>
@frkv frkv force-pushed the ble_stack_and_init branch from 7087cfb to 8fa454b Compare February 7, 2025 15:25
@NordicBuilder
Copy link
Contributor

Memory footprint analysis revealed the following potential issues

applications.nrf_desktop.zdebug.usb_next[nrf52840gmouse/nrf52840]: RAM size increased by 5900[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug.usb_next[nrf52840gmouse/nrf52840]: ROM size increased by 23792[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug[nrf52833dk/nrf52833]: RAM size increased by 4540[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug[nrf52833dk/nrf52833]: ROM size increased by 11712[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug[nrf52840dongle/nrf52840]: RAM size increased by 6520[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug[nrf52840dongle/nrf52840]: ROM size increased by 21300[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug_dongle.usb_next[nrf52840dk/nrf52840]: RAM size increased by 6536[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug_dongle.usb_next[nrf52840dk/nrf52840]: ROM size increased by 21996[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug_keyboard.usb_next[nrf52840dk/nrf52840]: RAM size increased by 5984[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug_keyboard.usb_next[nrf52840dk/nrf52840]: ROM size increased by 23940[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug_nrf21540ek_multicore[nrf5340dk/nrf5340/cpuapp]: RAM size increased by 6417[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug_nrf21540ek_multicore[nrf5340dk/nrf5340/cpuapp]: ROM size increased by 21468[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebugwithshell[nrf52840dk/nrf52840]: RAM size increased by 5968[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebugwithshell[nrf52840dk/nrf52840]: ROM size increased by 27992[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zrelease[nrf52840gmouse/nrf52840]: RAM size increased by 5888[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zrelease[nrf52840gmouse/nrf52840]: ROM size increased by 22032[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug_wwcb[nrf52840dk/nrf52840]: RAM size increased by 5968[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug_wwcb[nrf52840dk/nrf52840]: ROM size increased by 23108[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug.uart.kmu_provision[nrf54l15dk/nrf54l10/cpuapp]: RAM size increased by 6836[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug.uart.kmu_provision[nrf54l15dk/nrf54l10/cpuapp]: ROM size increased by 30804[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug.usb_next[nrf52840dk/nrf52840]: RAM size increased by 5984[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug.usb_next[nrf52840dk/nrf52840]: ROM size increased by 23804[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug_4llpmconn[nrf52840dongle/nrf52840]: RAM size increased by 6408[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug_4llpmconn[nrf52840dongle/nrf52840]: ROM size increased by 21312[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug_mcuboot_qspi[nrf52840dk/nrf52840]: RAM size increased by 5968[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug_mcuboot_qspi[nrf52840dk/nrf52840]: ROM size increased by 23264[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
sample.matter.template.debug[nrf7002dk/nrf5340/cpuapp]: ROM size increased by 20884[B] in comparison to the main[a3b7e57] branch. - link (cc: @kkasperczyk-no @ArekBalysNordic @markaj-nordic)
applications.nrf_desktop.zdebug[nrf5340dk/nrf5340/cpuapp]: RAM size increased by 6417[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug[nrf5340dk/nrf5340/cpuapp]: ROM size increased by 21468[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug[nrf54l15dk/nrf54l05/cpuapp]: RAM size increased by 4572[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zrelease.usb_next[nrf52840dk/nrf52840]: RAM size increased by 5988[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zrelease.usb_next[nrf52840dk/nrf52840]: ROM size increased by 22416[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zrelease[nrf54l15dk/nrf54l15/cpuapp]: RAM size increased by 6836[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zrelease[nrf54l15dk/nrf54l15/cpuapp]: ROM size increased by 27588[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug[nrf52kbd/nrf52832]: RAM size increased by 3484[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug[nrf52kbd/nrf52832]: ROM size increased by 13620[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zrelease[nrf52840dongle/nrf52840]: RAM size increased by 6420[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zrelease[nrf52840dongle/nrf52840]: ROM size increased by 20460[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
sample.matter.template.release[nrf7002dk/nrf5340/cpuapp]: ROM size increased by 21468[B] in comparison to the main[a3b7e57] branch. - link (cc: @kkasperczyk-no @ArekBalysNordic @markaj-nordic)
applications.nrf_desktop.zdebug.usb_next[nrf52840dongle/nrf52840]: RAM size increased by 6536[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug.usb_next[nrf52840dongle/nrf52840]: ROM size increased by 22000[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug[nrf52833dongle/nrf52833]: RAM size increased by 4540[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug[nrf52833dongle/nrf52833]: ROM size increased by 11712[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug_dongle[nrf52840dk/nrf52840]: RAM size increased by 6520[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug_dongle[nrf52840dk/nrf52840]: ROM size increased by 21296[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug_mcuboot_smp[nrf52840dk/nrf52840]: RAM size increased by 4944[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug_mcuboot_smp[nrf52840dk/nrf52840]: ROM size increased by 23716[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zrelease[nrf52kbd/nrf52832]: RAM size increased by 3504[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zrelease[nrf52kbd/nrf52832]: ROM size increased by 12560[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zrelease_fast_pair.keyboard[nrf52kbd/nrf52832]: RAM size increased by 2912[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zrelease_fast_pair.keyboard[nrf52kbd/nrf52832]: ROM size increased by 8516[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug[nrf52dmouse/nrf52832]: RAM size increased by 3988[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug[nrf52dmouse/nrf52832]: ROM size increased by 13920[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug_keyboard.uart.kmu_provision[nrf54l15dk/nrf54l15/cpuapp]: RAM size increased by 6836[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug_keyboard.uart.kmu_provision[nrf54l15dk/nrf54l15/cpuapp]: ROM size increased by 30792[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug.uart.kmu_provision[nrf54l15dk/nrf54l15/cpuapp]: RAM size increased by 6836[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug.uart.kmu_provision[nrf54l15dk/nrf54l15/cpuapp]: ROM size increased by 30804[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug[nrf52840dk/nrf52840]: RAM size increased by 5968[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug[nrf52840dk/nrf52840]: ROM size increased by 23104[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug_fast_pair.gmouse[nrf52840gmouse/nrf52840]: RAM size increased by 5884[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug_fast_pair.gmouse[nrf52840gmouse/nrf52840]: ROM size increased by 19416[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug[nrf52840gmouse/nrf52840]: RAM size increased by 5884[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug[nrf52840gmouse/nrf52840]: ROM size increased by 23092[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug_keyboard[nrf52840dk/nrf52840]: RAM size increased by 5968[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug_keyboard[nrf52840dk/nrf52840]: ROM size increased by 23300[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zrelease[nrf5340dk/nrf5340/cpuapp]: RAM size increased by 6457[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zrelease[nrf5340dk/nrf5340/cpuapp]: ROM size increased by 19112[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug_fast_pair.gmouse.uart.kmu_provision[nrf54l15dk/nrf54l15/cpuapp]: RAM size increased by 6780[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug_fast_pair.gmouse.uart.kmu_provision[nrf54l15dk/nrf54l15/cpuapp]: ROM size increased by 31136[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug_nrf21540ek[nrf52840dk/nrf52840]: RAM size increased by 5968[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zdebug_nrf21540ek[nrf52840dk/nrf52840]: ROM size increased by 23104[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
applications.nrf_desktop.zrelease_keyboard[nrf54l15dk/nrf54l05/cpuapp]: RAM size increased by 4600[B] in comparison to the main[a3b7e57] branch. - link (cc: @MarekPieta)
sample.matter.template.release[nrf52840dk/nrf52840]: ROM size increased by 1744[B] in comparison to the main[a3b7e57] branch. - link (cc: @kkasperczyk-no @ArekBalysNordic @markaj-nordic)

Note: This message is automatically posted and updated by the CI (latest/sdk-nrf/PR-20205/16)

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.