Commit graph

87781 commits

Author SHA1 Message Date
Joakim Andersson 3467a25fff tfm: Change SFN and FP_HARDABI dependency
TF-M only suports floating point in IPC model, not the SFN model.
Since floating point is a basic feature of the architecture and TF-M
has the limitation it makes more sense for the dependency to exist in
TF-M and and limit the TF-M model choice instead of limiting the
option to enable floating point.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-11-21 09:55:24 +01:00
Andreas Sandberg b544855ba5 samples: usb-c: sink: Add support for WeAct STM32G431 core
Add support for the WeAct Studio STM32G431 Core board. Note that this
board does not support USB-C PD in its default configuration. See the
board documentation for the necessary hardware reconfiguration.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
2023-11-21 09:54:02 +01:00
Andreas Sandberg 84d588e013 boards: arm: add support for WeAct STM32G431 Core
Add support for the WeAct Studio STM32G431 Core Board.

Tested with:
 - `samples/basic/blinky`
 - `samples/basic/button`

Flashed samples using dfu-util.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
2023-11-21 09:54:02 +01:00
Marcin Niestroj 81c5727f27 drivers: wifi: airoc: drop default shell and sysworkq stack sizes
Those configuration settings should never be part of driver Kconfig file.
Drop them, since they can easily result in Kconfig symbol circular
dependency error.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2023-11-21 08:48:40 +00:00
Declan Snyder 4cc80097d3 drivers: wifi: include sockets headers
Some wifi drivers need internal sockets headers
included to build, put this in CMakeLists

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-11-21 08:48:04 +00:00
Jukka Rissanen f70e4c0f68 drivers: modem: Fix include paths
Set the include paths properly and unconditionally to needed
networking directories.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2023-11-21 08:48:04 +00:00
Jukka Rissanen bc8b5b3813 mgmt: updatehub: Fix CMakeLists.txt file
Fix the CMakeLists of the updatehub to link with mbedtls.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2023-11-21 08:48:04 +00:00
Declan Snyder cf42b8b2fb net: sockets: fix shadowing warning
Fix compiler local variable shadowing warning

Rename ret to bytes_sent in offending funciton

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-11-21 08:48:04 +00:00
Declan Snyder 7c72d4a2d6 net: Fix CMakeLists
Fix the CMakeLists of the tls_credentials and sockets folders
to link/interface to the net library instead of the zephyr library.
This fixes issues where some files are not found in the link interface
when compiling the sources in this folder.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-11-21 08:48:04 +00:00
Robert Lubos aa6f698d31 net: zperf: Fix TCP packet counting
Make sure we send the entire packet buffer before bumping the packet
counter, send() does not guarantee that all of the requested data will
be sent at once with STREAM socket.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-11-21 08:46:45 +00:00
Robert Lubos e6d90b409b net: sockets: tls: Set errno on TX waiting error
In case underlying socket reported error while waiting for TX, the
errno value was not set accordingly. This commit fixes this.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-11-21 08:46:45 +00:00
Robert Lubos 3a38ec1aaa net: tcp: Feed TX semaphore on connection close
Otherwise, if the application was for example blocked on poll() pending
POLLOUT, it won't be notified.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-11-21 08:46:45 +00:00
Robert Lubos 9976ebb24b net: tcp: Rework data queueing API
Rework how data is queued for the TCP connections:
  * net_context no longer allocates net_pkt for TCP connections. This
    was not only inefficient (net_context has no knowledge of the TX
    window size), but also error-prone in certain configuration (for
    example when IP fragmentation was enabled, net_context may attempt
    to allocate enormous packet, instead of let the data be fragmented
    for the TCP stream.
  * Instead, implement already defined `net_tcp_queue()` API, which
    takes raw buffer and length. This allows to take TX window into
    account and also better manage the allocated net_buf's (like for
    example avoid allocation if there's still room in the buffer). In
    result, the TCP stack will not only no longer exceed the TX window,
    but also prevent empty gaps in allocated net_buf's, which should
    lead to less out-of-mem issues with the stack.
  * As net_pkt-based `net_tcp_queue_data()` is no longer in use, it was
    removed.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-11-21 08:46:45 +00:00
Robert Lubos 16fd744c13 net: pkt: Add function for allocating buffers w/o preconditions
Add new function to allocate additional buffers for net_pkt, w/o any
additional preconditions/checks. Just allocate what was requested.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-11-21 08:46:45 +00:00
Dawid Niedzwiecki e6c7a4c968 tests: pm: add soc pm tests and sample for stm32f4x chip
Add soc power management test and blinky sample for the nucleo_f429zi
board.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2023-11-21 08:46:17 +00:00
Dawid Niedzwiecki 43ef398614 pm: add power management for stm32f4x
Add soc power management for the STM32F4x chips.

One low power state is added supported by all chips from the family -
the Stop mode with voltage regulator in low-power mode.

The Stop mode for STM32F chips has to work with the IDLE timer -
CORTEX_M_SYSTICK_IDLE_TIMER, because PLL and HSI are disabled in the
Stop mode (Systick is not clocked). The only possible wakeup source is
RTC, which works as a IDLE timer for the Systick.

The exit latency may need to be adjusted per system, depending on the
system tick frequency and other variables.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2023-11-21 08:46:17 +00:00
Abderrahmane Jarmouni 053c6b29cc boards: arm: stm32u5a9j-dk: add OpenOCD support
Add support for debugging with OpenOCD and GDB

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2023-11-21 08:44:34 +00:00
Abderrahmane Jarmouni ebf67b2cef test: drivers: adc_api: add overlay for STM32U5A9J
Add overlay for STM32U5A9J board to pass test in CI

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2023-11-21 08:44:34 +00:00
Abderrahmane Jarmouni 2df99b10c5 boards: arm: stm32u5a9j-dk: Add initial support
Add initial support of STM32U5A9J-DK discovery kit

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2023-11-21 08:44:34 +00:00
Abderrahmane Jarmouni aeb1e8ed34 dts: arm: st: add STM32U5A9 support
add STM32U5A9XJ device trees. Also add ADC2 & ADC1_2 dual mode nodes

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2023-11-21 08:44:34 +00:00
Abderrahmane Jarmouni 236ba6bf5a dt-bindings: clock: Add STM32U5A9 clk sel helpers
Add clock selection helpers specific to STM32U59x/5Ax &
STM32U5Fx/5Gx SoCs

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2023-11-21 08:44:34 +00:00
Abderrahmane Jarmouni f8a9d95549 soc: arm: st_stm32: stm32u5: Add STM32U5A9 support
Add support for STM32U5A9XX SoC series

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2023-11-21 08:44:34 +00:00
Daniel Leung 9c90ed6f61 mm: polish doxygen doc on memory banks driver APIs
() Put the memory bank APIs under the memory management group.
() Document the struct sys_mm_drv_bank.
() Put proper in,out for function parameters.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-11-21 08:42:01 +00:00
Daniel Leung 9a6e32f87c mm: rename struct mem_drv_bank to sys_mm_drv_bank
Simply to put them into correct namespace as the struct is
part of public API.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-11-21 08:42:01 +00:00
Daniel Leung ca1aae6183 mm: intel_adsp_mtl_tlb: move SRAM_BANK_PAGE_NUM in driver
The macro SRAM_BANK_PAGE_NUM is specfic to the mtl_tlb
driver and is not universal. So move that from public
header into the driver.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-11-21 08:42:01 +00:00
Daniel Leung 8021cde6de mm: polish doxygen on memory management driver APIs
Makes the HTML document on the MM driver APIs a bit more easier
to navigate (hopefully).

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-11-21 08:42:01 +00:00
Adrien Bruant 176d433b98 drivers: bbram: stm32-bbram: port to stm32wl
On STM32WL, the backup memory is defined as part of the TAMP peripheral.
This seems to be a deviation from the stm32 family where this memory is
defined as part of the RTC.

The STM32WL reference manual shows that tamp_pclk is connected to
rtc_pclk. This means that the clock required to run the TAMP peripheral
is the same as the RTC's. A quick port of BBRAM on STM32WL is achieved
by instanciating the bbram device as a child of the RTC and by modifying
the address offset to the first backup register from the rtc base
address.

Signed-off-by: Adrien Bruant <adrien.bruant@aalberts-hfc.com>
2023-11-21 08:40:51 +00:00
Emil Gydesen 1829cf4324 Bluetooth: Audio: Add set functions for codec meta
Add set function for all metadata types for both
codec_cfg and codec_cap.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-11-21 08:38:29 +00:00
Dmitrii Golovanov 23324fc5ba boards: qemu_xtensa: coredump: Enable coredump
Enable coredump on qemu_xtensa and qemu_xtensa_mmu.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2023-11-20 10:51:35 -06:00
Dmitrii Golovanov 5ed8bb74d4 tests: coredump: Adjust logging backend patterns to xtensa
Adjust tests/subsys/debug/coredump logging backend's output
matching pattern to Xtensa fatal errors handler's call sequence
difference.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2023-11-20 10:51:35 -06:00
Benjamin Cabé fedd23f970 bluetooth: a2dp: Add missing Doxygen comments
Added missing Doxygen comments to various macros.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-20 10:49:26 -06:00
Bjarki Arge Andreasen f9b42bc911 drivers: serial: uart_stm32.c: RxDataFlush on async_rx_enable
When enabling async RX the first time after boot, there is an
additional byte received with the first RX_DATA_RDY event,
which seems to be caused by the RX data not being flushed before
enabling the UART RX DMA.

Adding a request to flush the RX data register before enabling
the RX DMA, solves the issue.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2023-11-20 10:48:41 -06:00
Krzysztof Chruściński 26fd55e0a7 drivers: serial: nrfx_uarte: Rework Kconfig to use instance template
Rework Kconfig to improve handling of multiple UART instances by
using Kconfig template file.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2023-11-20 13:18:43 +01:00
Franciszek Pindel ad788ad511 gecko: pinctrl: Add missing configuration for Gecko Series usarts
This commit adds missing pinctrl configuration for USARTs in
efm32gg_slwstk6121a, efm32gg_stk3701a and efr32_radio boards
and enables PINCTRL for efr32_radio_brd4180a
and efr32_radio_brd4187c boards.

Signed-off-by: Franciszek Pindel <fpindel@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2023-11-20 13:03:18 +01:00
Bjarki Arge Andreasen d3f100355f tests: modem: backends: uart: Add UART backend test suite
The UART backend test suite performs 9 iterations of:

1. Open UART backend pipe
2. Transmit 8192 bytes of pseudo random data
3. Receive and validate bytes
4. close UART backend pipe

The test is run on real hardware, with the TX/RX pins
connected to each other to provide loopback functionality.

The test suite has been run on a STM32 and an nRF5340 board.
The test suite tests both the UART interrupt driven and
async APIs.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2023-11-20 13:03:08 +01:00
Bjarki Arge Andreasen 8128a726a4 modem: backend: uart_async: Remove UART flush
The UART flush is not relevant for the async UART implementation.
UART drivers should handle this internally.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2023-11-20 13:03:08 +01:00
Bjarki Arge Andreasen 6f1d49e7b3 modem: backend: uart_async: Use single ring buffer
Use single ring buffer and protect it with a spinlock as it is
shared between backend and UART thread (ISR). This is simpler
than the double ring buffer setup.

The receive idle timeout has also been made configurable
instead of being a hardcoded value.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2023-11-20 13:03:08 +01:00
Bjarki Arge Andreasen 7cf2b0fc9d modem: backend: uart_async: Extend "closed" requisites
The current implementation only waits for the RX disabled event
to determine if the UART is closed. It should wait for all RX
buffers to be released, and the TX to be done as well.

We now also call uart_tx_abort() when closing the pipe.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2023-11-20 13:03:08 +01:00
Franciszek Zdobylak 1d01f5c6b9 dts: arm: silabs: Move gpio gecko header include
Move the include to places where it is actually used.

Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
2023-11-20 13:02:49 +01:00
Franciszek Zdobylak 6f91fd858c dts: arm: silabs: Configure hfxo in dtsi
This commit moves configuration of hfxo from headers defined on board level
to device trees of SoCs.

Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
2023-11-20 13:01:39 +01:00
Henning Fleddermann 8e4c588eab net: lib: lwm2m: Use int16_t for signal quality
RSRQ is the ratio between send and received signal strength and usually
understood/expected to be represented as a ratio in dB and as such always
has a negative range. So to allow RSRQ to be represented correctly the
resource must allow negative values, but currently it's limited to unsigned
8bit integers.

Signed-off-by: Henning Fleddermann <henning.fleddermann@grandcentrix.net>
2023-11-20 13:01:23 +01:00
Keith Packard a4a8120b69 doc: Update picolibc section in 3.5 migration guide for 1.8.5
Picolibc 1.8.5 includes more control over printf capabilities, document
those in the migration guide.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-11-20 06:07:58 -05:00
Keith Packard 6c95f23d81 samples/code_relocation_nocopy: Increase fake flash size
When linking with the 0.16.3 SDK version of picolibc, using long long
cbprintf support pulls in the full floating point printf which is much
larger than the integer-only version. This ends up overflowing the memory
region available for it. Increase the size of that by bumping the start of
the fake region by 8kB.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-11-20 06:07:58 -05:00
Keith Packard d04c834c0f tests/kernel: Fix test printk output for new printf variants
In minimal mode, format modifiers are not supported, leading to a lack
of width and precision support.

long long values are presented correctly in either long long or floating
mode.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-11-20 06:07:58 -05:00
Keith Packard 7a5fcb8c60 libc/picolibc: Support 'long long' and 'minimal' printf variants
Picolibc's 'minimal' printf mode reduces functionality and size even more
than the 'integer' mode. Use this where memory is at a premium and where
the application knows that it does not require exact printf semantics.

1.8.5 adds two more printf variants, 'long long' and 'minimal'. The 'long
long' variant is the same as the 'integer' variant but with long long
support enabled. The 'minimal' variant reduces functionality and size even
more than the 'integer' mode. Applications can use this where memory is at
a premium and where the application does not require exact printf
semantics.

With these two added variants, the SDK has enough options so that all of
the cbprintf modes can be supported with the pre-compiled bits:

 1. CBPRINTF_NANO - picolibc's 'minimal' variant
 2. CBPRINTF_REDUCED_INTEGRAL - picolibc's 'integer' variant
 3. CBPRINTF_FULL_INTEGRAL - picolibc's 'long long' variant
 4. CBPRINTF_FB_SUPPORT - picolibc's 'double' variant

This patch makes the cbprintf Kconfig values drive the default picolibc
variant, disables picolibc variants not capable of supporting the required
cbprintf level, but allows applications to select more functionality in
picolibc than cbprintf requires.

Note that this depends on the SDK including picolibc 1.8.5. Without that,
selecting the 'minimal' or 'long long' variant in Zephyr will end up with
the default variant from picolibc, which is the full version with floating
point support. When using the module things will work as specified.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-11-20 06:07:58 -05:00
Keith Packard 5347a834af libc/picolibc: Support picolibc's assert-verbose option
This option in picolibc switches the assert macro between a chatty version
and one which provides no information at all. This latter mode avoids
placing the associated strings in memory.

The Zephyr option is PICOLIBC_ASSERT_VERBOSE and it is disable by default.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-11-20 06:07:58 -05:00
Keith Packard 35e83d20e4 west: Update picolibc to version 1.8.5
Picolibc version 1.8.5 offers additional memory savings and new long-long
and minimal printf variants which can be selected from either the SDK or
module version of the library.

This needed a patch to the Zephyr cmake support bits to enable one of the
new picolibc 1.8.5 features.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-11-20 06:07:58 -05:00
Keith Packard 47e09806c8 lib/os: With CBPRINTF_NANO, picolibc long-long printf isn't required
CBPRINTF_FULL_INTEGRAL doesn't happen to explicitly conflict with
CBPRINTF_NANO, but when CBPRINTF_NANO is enabled, there's no long long I/O
support provided.

Allow picolibc long-long I/O support to also be elided when CBPRINTF_NANO
is enabled to save similar amounts of space.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-11-20 06:07:58 -05:00
Alberto Escolar Piedras 196341c18b samples: Switch integration_platforms from native_posix to native_sim
For all remaining samples which now set their integration platform
as native_posix(_64) switch them to native_sim(_64)

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 12:02:48 +01:00
Alberto Escolar Piedras 868489b98e samples: Enable any which runs in native_posix also in native_sim
Enable the remaining samples which run now in native_posix also
in native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 12:02:48 +01:00