Skip to content

Shell threadless #3056

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

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

Conversation

bjarki-andreasen
Copy link
Contributor

Shell threadless

anangl and others added 30 commits June 16, 2025 11:00
Non-secure variants for nRF7002 DK were removed from upstream
in commit 10d4973. Revert these
changes downstream, so that the NS variants are still available.

Signed-off-by: Andrzej Głąbek <[email protected]>
Signed-off-by: Johann Fischer <[email protected]>
(cherry picked from commit 06171de)
Fixes an issue whereby just enabling hooks would enable the nrf5340
network core hook despite lacking other requirements

Signed-off-by: Jamie McCrae <[email protected]>
(cherry picked from commit 497a6fa)
Use PPI resources information from SoftDevice when it is present.

Co-authored-by: Krzysztof Chruściński <[email protected]>
Signed-off-by: Eivind Jølsgard <[email protected]>
(cherry picked from commit 9b21d44)
The PSA is a cryptographically secure random number generator.

It will be enabled by default, eventually,  For now, enable it manually.

Signed-off-by: Gordon Klaus <[email protected]>
(cherry picked from commit ea9188b)
Same as commit 6ec9d10 but with the REQUIRED keyword on its own
line to attempt to avoid a merge conflict when reverting/reapplying
this patch.

Signed-off-by: Jonathan Nilsen <[email protected]>
(cherry picked from commit 8c2d815)
Initial implementation of nRF54L quirks necessary for nRF54LM20A.
To be upstreamed after TODO comments are resolved.

Signed-off-by: Tomasz Moń <[email protected]>
(cherry picked from commit f35ea13)
Necessary changes for NCS CI.

- Add a Jenkinsfile
- Add a commit-tags workflow: This enables sauce tag checking in sdk-zephyr
- compliance.yml: Disable check for merge commits, since we have upmerges
downstream. Also, since in the code we refer to Kconfig symbols that are defined
in the sdk-nrf repository, the Kconfig checks ((SysBuild)Kconfig,
(SysBuild)KconfigBasic and (SysBuild)KconfigBasicNoModules) will not pass so
exclude them. Also, disable any maintainers-related checks
- scripts/gitlint: Extend the max commit line lengths for Gitlint to account
for sauce tags
- Adapt to the changes in:
nrfconnect/action-commit-tags#4

Signed-off-by: Carles Cufi <[email protected]>
Signed-off-by: Dominik Ermel <[email protected]>
Signed-off-by: Martí Bolívar <[email protected]>
Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Signed-off-by: Krishna T <[email protected]>
Signed-off-by: Dominik Ermel <[email protected]>
(cherry picked from commit 0648e72)
Adds symbols used in NCS to the sysbuild Kconfig allow list

Signed-off-by: Jamie McCrae <[email protected]>
(cherry picked from commit 37bd53a)
…in dBm

The nrf-802154 component of hal_nordic is updated.
The CCA threshold configuration is now done in dBm units, instead of
hardware-dependent scale.
Fixed a bug, where the CONFIG_NRF_802154_CCA_ED_THRESHOLD units were
different from the NRF_802154_CCA_ED_THRESHOLD units. Now all
configuration is done in dBm.

Upstream PR #: 90795

Signed-off-by: Rafał Kuźnia <[email protected]>
(cherry picked from commit ba8fd23)
nrf-squash! [nrf noup] modules: hal_nordic: adjust nrfx reservations to NCS
nrf-squash! [nrf noup] modules: hal_nordic: use Kconfig symbols in NCS reservation
nrf-squash! [nrf noup] modules: hal_nordic: nrfx: Add SoftDevice PPI resources

Add peripherals used by MPSL and SDC on nRF71-series matching nRF54L.

Signed-off-by: Aleksandar Stanoev <[email protected]>
(cherry picked from commit 666ecc8)
…ation

CONF_FILE parameter in testcase.yaml overwrites board
specific configurations. Change it to EXTRA_CONF_FILE
to apply both configurations.

Signed-off-by: Michał Stasiak <[email protected]>
(cherry picked from commit 72623f9)
… 3.12.0

New nrfx release contains MDK 8.71.1
and various fixes for nRF devices.

Signed-off-by: Nikodem Kastelik <[email protected]>
(cherry picked from commit f46798f)
…ration

Some nRF devices allow to configure burst setting per channel
while others globally.

Signed-off-by: Nikodem Kastelik <[email protected]>
(cherry picked from commit 5abf43c)
Some nRF devices do not allow to configure gain.

Signed-off-by: Nikodem Kastelik <[email protected]>
(cherry picked from commit 647477c)
ZMS legacy enabled by CONFIG_SETTINGS_ZMS_LEGACY uses a different lookup
cache function that is optimized for Settings subsystem.

Signed-off-by: Riadh Ghaddab <[email protected]>
(cherry picked from commit d07064e)
… 3.12.1

New nrfx release contains fixes for SPIM and GRTC driver.

Signed-off-by: Nikodem Kastelik <[email protected]>
(cherry picked from commit 59334fa)
Allow to add an image-specific DTS overlay, that is applied based on the
FILE_SUFFIX.
Up to this point, it was possible to specify such Kconfig files
(sysbuild/<image>_<file_suffix>.conf),
but it did not work with dts overlays
(sysbuild/<image>_<file_suffix>.overlay).
This commit aligns the logic of finding configuration files for both
scenarios mentioned above.

Ref: NCSDK-NONE

Signed-off-by: Tomasz Chyrowicz <[email protected]>
(cherry picked from commit 13a0f05)
Allow more TWIS instances to be tested.

Signed-off-by: Michał Stasiak <[email protected]>
(cherry picked from commit f9be875)
For GRTC timer a longer timeout is required:
(2 ^ 32) * 2 * 1us

Signed-off-by: Adam Kondraciuk <[email protected]>
(cherry picked from commit d0785ce)
The HFXO used on nRF54L15 DK has the typical startup latency of 854us.

Upstream PR #: 90795

Signed-off-by: Rafał Kuźnia <[email protected]>
(cherry picked from commit 39076d5)
…ency

The clock startup latency is now obtained from the clock driver and the
nrf-802154 is now set to a value that matches hardware capabilities.

Upstream PR #: 90795

Signed-off-by: Rafał Kuźnia <[email protected]>
(cherry picked from commit 4b3f171)
Extended analog pins mappings for more nRF54L targets.

Upstream PR #: 91581

Signed-off-by: Michał Stasiak <[email protected]>
(cherry picked from commit bd990c5)
…calls to it

This is a follow-up to commit a068709.

As the SPIM_REQUESTS_CLOCK() macro changed the type of its parameter,
all of the calls to it need to be updated accordingly. Also the call to
DT_NODELABEL() needs to be removed from that macro as DT_CLOCKS_CTLR()
already returns a node identifier.

Signed-off-by: Andrzej Głąbek <[email protected]>
(cherry picked from commit ec06e63)
…STS is disabled

If `CONFIG_SYS_CLOCK_EXISTS=n`, then
`CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC` will likely not be defined at all.
Fix the compilation by moving the check for it being `== 0` to a
separate preprocessor #if statement.

Signed-off-by: Carles Cufi <[email protected]>
(cherry picked from commit 03f46db)
… fwid length

Commit sets max possible number of tx and rx segments
to not adapt them anymore.

Signed-off-by: Aleksandr Khromykh <[email protected]>
(cherry picked from commit a046f25)
Commit changes BT_MESH_DFU_FWID_MAXLEN option to be
compliant with BLE Mesh specification.

Signed-off-by: Aleksandr Khromykh <[email protected]>
(cherry picked from commit 2411238)
…rious empty macro

If SYS_CLOCK_EXISTS is not enabled, then the SYS_CLOCK_HW_CYCLES_PER_SEC
still gets created, but with no value. This causes the code generation
in misc/generated/CMakeLists.txt to create an empty assembly macro:

`.equ  CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC,`

which then causes a build error.

Disable SYS_CLOCK_HW_CYCLES_PER_SEC entirely when SYS_CLOCK_EXISTS is
disabled to fix this.

This is a follow-up to 03f46db.

Signed-off-by: Carles Cufi <[email protected]>
(cherry picked from commit 61cdcb3)
The help message for the wifi mode -s command indicates it sets
the Wi-Fi mode to station. However, the Zephyr Wi-Fi shell subsystem
was incorrectly using a get operation instead of set.

This commit corrects the behavior to properly set the Wi-Fi mode,
aligning the implementation with the help message.

Signed-off-by: Arunmani Alagarsamy <[email protected]>
(cherry picked from commit 0faba15)
Include nordic,nrf-nfct-v2 compatible in the option.

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit 2d82970)
Use nordic,nrf-nfct-v2 compatible in the main nrf54h20 devicetree
description.

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit b84dd5b)
tmon-nordic and others added 24 commits July 15, 2025 13:13
Do not synchronously wait for endpoint interrupt bits when disarming
endpoints. Introduce ep_disabled k_event that makes it possible for
application to wait for the action to take effect which is necessary
when handling SetFeature(ENDPOINT_HALT) or SetInterface() requests.

This change improves incomplete iso IN and OUT handling performance,
especially when there are multiple isochronous endpoints that need
servicing.

Signed-off-by: Tomasz Moń <[email protected]>
(cherry picked from commit d29719e)
…dpoint

UDC drivers use udc_buf_get_all() when dequeueing endpoint. On drivers
that require double buffering for isochronous IN endpoint, the dequeue
on interface disable will result in class request API called on net_buf
with frags set. Call release callback on the buffer pointed in frags
because it was passed in using usbd_uac2_send().

Signed-off-by: Tomasz Moń <[email protected]>
(cherry picked from commit b3e80c5)
…gs can be reused

When the endpoint is re-enabled, check if the current FIFO settings can
be reused. Further work is needed to improve FIFO memory handling for
more advanced interface configurations.

Signed-off-by: Johann Fischer <[email protected]>
(cherry picked from commit 56b359b)
Signed-off-by: Tomasz Moń <[email protected]>
…specific sections

This change adds two macros that allow the user to specify the section
the memslab buffer should be allocated from. This is useful for systems
where memory must reside in DMA-able memory like USB.

Signed-off-by: Victor Brzeski <[email protected]>
(cherry picked from commit 3c47f91)
Signed-off-by: Tomasz Moń <[email protected]>
Per section 5.6.4 of the USB 2.0 standard, Isochronous Endpoints
are derived by the (2^(bInterval-1) * F) formula. The current
implementation uses the formula intended for Interrupt Endpoints.

Signed-off-by: Victor Brzeski <[email protected]>
(cherry picked from commit d9c7b19)
Signed-off-by: Tomasz Moń <[email protected]>
This commit adds a device-tree prop for the audio streaming
terminals to specify the bInterval values for the Isochronous
endpoints.

Signed-off-by: Victor Brzeski <[email protected]>
(cherry picked from commit e8638be)
Signed-off-by: Tomasz Moń <[email protected]>
This commit adds the following:
    * Sensor related usage IDs in the Sensors' page of the HID standard.
    * A HID usage macro that works with IDs of 2 bytes.
    * A macro to define the exponent in a report descriptor.

The values and naming came from the following document: https://www.usb.org/sites/default/files/hutrr39b_0.pdf

Signed-off-by: Zak Essadaoui <[email protected]>
(cherry picked from commit 41a83bd)
Signed-off-by: Tomasz Moń <[email protected]>
Add support for the HFCLK24M clock to the clock_control_nrf
device driver.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit bb31960)
Signed-off-by: Tomasz Moń <[email protected]>
Adhere to Programming Guide with regards to when the DIEPCTL0.CNAK is
set. This allows the driver to survive abusive control transfers with
extremely short host timeouts.

Signed-off-by: Tomasz Moń <[email protected]>
(cherry picked from commit d590d27)
Initial implementation of nRF54L quirks necessary for nRF54LM20A.

Upstream PR #: 92842

Signed-off-by: Tomasz Moń <[email protected]>
Signed-off-by: Johann Fischer <[email protected]>
(cherry picked from commit f48fd8fad88f5cdb8a6600cfc3c8b66980fe0378)
Avoid using the PPI channels that are currently reserved for Radiocore
through the default configuration found in `uicr_periphconf_table.c`.
Otherwise, the samples may build but will not work as expected.

Upstream PR #: 91826

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit bc26475c262d6dcb1ec1b4d8bf53bf4f262382dc)
Signed-off-by: Tomasz Moń <[email protected]>
It was observed that device ceases to work in Buffer DMA mode after GET
DEVICE QUALIFIER request is STALLed (when USB stack is limited to
Full-Speed only operation). The issue is due to missing dout feed.

Clear pending dout feed flag after bus reset (enumeration done) and
after stalled control read transfer to allow dout to be feed when
necessary.

Upstream PR #: 93103

Signed-off-by: Tomasz Moń <[email protected]>
(cherry picked from commit 83c6c402e206b7c68538594599ea495eb84ae967)
…frequencies

Disabled frequency set approximation algorithm for spim's with prescaler.

Upstream PR #: 92436

Signed-off-by: Michal Frankiewicz <[email protected]>
…requencies.

Added test cases for nrf chips for non standard frequencies.

Upstream PR #: 92436

Signed-off-by: Michal Frankiewicz <[email protected]>
Allows usage of settings when multithreading is disabled

Upstream PR #: 92886

Signed-off-by: Jamie McCrae <[email protected]>
…_alloc

nrf-squash! [nrf noup] Bluetooth: Mesh: zero randomization for friend's adv

bt_hci_cmd_create will be deprecated.

Signed-off-by: Olivier Lesage <[email protected]>
…/IW416 SoC

- Add support for default Annex-55 Bluetooth calibration data load
 for both IW612 and IW416 SoC.
- Add support for default Annex-100 Bluetooth calibration data load
 for both IW612 and IW416 SoC.

Signed-off-by: Nirav Agrawal <[email protected]>
(cherry picked from commit ffe8daa)
Use bt_hci_cmd_alloc() instead of the soon to be deprecated
bt_hci_cmd_create().

Signed-off-by: Johan Hedberg <[email protected]>
(cherry picked from commit c186a31)
Mark bt_hci_cmd_create() as deprecated (superceded by bt_hci_cmd_alloc()),
and update any references to the new function.

Signed-off-by: Johan Hedberg <[email protected]>
(cherry picked from commit a22a4b1)
…eate()

Add a note about bt_hci_cmd_create() deprecation and which API should be
used instead.

Signed-off-by: Johan Hedberg <[email protected]>
(cherry picked from commit 607ff85)
Add the resolve and get_startup_time call

Upstream PR #: 93141

Signed-off-by: Piotr Krzyzanowski <[email protected]>
(cherry picked from commit 632aad17eaab2a0fa50258b47d8732d37d274c08)
Commit 3c47f91 introduced alignment
validation in K_MEM_SLAB_DEFINE macros.
A couple PTP message slabs wer using alignment 8, while the size of
the elements wasn't a multiple of 8, causing a static assertion
failure.

Fix by changing the alignment from 8 to 4 bytes.

Signed-off-by: Benjamin Cabé <[email protected]>
(cherry picked from commit 222a601)
Signed-off-by: Robert Lubos <[email protected]>
The 50 ms TX mutex timeouts introduced in commit b0a0feb cause
dropped messages when used with the shell log backend. This
commit makes time timeout configurable using the
CONFIG_SHELL_TX_TIMEOUT_MS Kconfig option and makes the
default timeout longer when shell log backend is enabled.

Link: #90215

Signed-off-by: Tommi Kangas <[email protected]>
(cherry picked from commit 941dcd3)
The shell subsystem currently uses k_poll for signalling. However,
k_poll is only used for simple event signals, results are not used.

Replacing the k_poll with k_event greatly simplifies the code, and
saves 4 struct k_poll_signal and 4 struct k_poll_event (one of which
was entirely unused) while costing a single struct k_event, for
every shell instance. It also allows us to not select POLL,
as we are using the simpler EVENTS instead.

A quick test build of the shell test suite on an nrf54l15 produces
the following build info:

using EVENTS:

           FLASH:       71592 B      1428 KB      4.90%
             RAM:        9872 B       188 KB      5.13%
        IDT_LIST:          0 GB        32 KB      0.00%

using POLL

           FLASH:       75524 B      1428 KB      5.16%
             RAM:       11224 B       188 KB      5.83%
        IDT_LIST:          0 GB        32 KB      0.00%

Upstream PR #: 93184

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
The mutex is being used as a simple binary semaphore. It is not
recursed so we don't need to track thread ownership nor lock count.

Exchange the mutex for a binary semaphore to save resources and
speed up shell.

Upstream PR #: 93184

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
The shell at some point supported CONFIG_MULTITHREADING=n but this
has not been maintained. Adjust the shell to support threadless
operation similar to how logging works with no logging thread.

With these adjustments, building with CONFIG_SHELL_MINIMAL and
CONFIG_MULTITHREADING=n, shells can now be used like logging by
calling shell_process() with non-polling backends, like async
or irq driven UART based backends.

Upstream PR #: 93184

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.