Commit graph

86069 commits

Author SHA1 Message Date
Alberto Escolar Piedras adf9e4000f samples ipc static_vrings: Convert to sysbuild
Convert this sample application build to sysbuild.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-25 17:31:27 +03:00
Alberto Escolar Piedras 19cc0fe099 samples ipc icmsg: Convert to sysbuild
Convert this sample application build to sysbuild.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-25 17:31:27 +03:00
Alberto Escolar Piedras 433f47ee57 samples ipc icmsg_me: Convert to sysbuild
Convert this sample application build to sysbuild.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-25 17:31:27 +03:00
Dmitry Lukyantsev 357d6cec45 boards: Add support for the NXP MIMXRT595 DSP core
Add board and soc files for the NXP MIMXRT595 DSP core.

Signed-off-by: Dmitry Lukyantsev <dmitrylu@google.com>
2023-10-25 09:55:10 -04:00
Dmitry Lukyantsev 0ae68a3857 soc: nxp_adsp: Refactor imx8/imx8m Kconfig
In preparation for RT500 ADSP enablement, consolidate common Xtensa
configuration parameters in top level Kconfig.defconfig.

Signed-off-by: Dmitry Lukyantsev <dmitrylu@google.com>
2023-10-25 09:55:10 -04:00
Anders Storrø d4037ce6a1 Bluetooth: Mesh: Correct pack of net idx hb_status
Ensures correct packing of net idx in Heartbeat Publication Status
messages on the Configuration Server.

Reference to net idx packing format: MshPRTv1.1 section 4.3.1.1

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-10-25 14:50:22 +02:00
Anders Storrø 05774c5d76 Bluetooth: Mesh: Fix unpacking of hb_pub status
Fixes incorrect unpacking of Heartbeat Publication status
messages on the Configuration client.

Reference to packing format: MshPRTv1.1 section 4.3.2.63

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-10-25 14:50:22 +02:00
Anders Storrø 46d9c97991 Bluetooth: Mesh: HB pub status for unassigned addr
Fixes issue where Heartbeat Publication Status message sends
garbage data when destination field is set to the unassigned address.

MshPRTv1.1, section 4.4.1.2.15:
"When the Destination field is set to the unassigned address, the values
of the CountLog, PeriodLog, TTL, and Features fields shall be set to
0x00 and NetKeyIndex field shall be set to 0x0000."

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-10-25 14:50:22 +02:00
Anders Storrø c51bb9c13b Bluetooth: Mesh: Update spec ref 1.0.1->1.1
Updates Bluetooth mesh specification references:

- Change "Profile" to "Protocol" since the main specification has
changed its name.
- Update/align formating of specification references. This will
make it easier to find spec references in the future.
- Change some section references to point to the correct section of the
newest version of the specification (v1.1).

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-10-25 14:50:14 +02:00
Alberto Escolar Piedras 587c43a602 tests/posix/common: Fix filtering for POSIX arch
All these tests where filtered for the whole POSIX
architecture, but quite a few of them can be run in
native_sim.
So let's filter out native_posix(_64) in general,
(allowing other native simulator based targes),
and filter for thsi arch out explicitly the 2 tests
which need NEWLIB as this arch does not provide it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-25 07:44:12 -04:00
Alberto Escolar Piedras 32ea1566db tests/posix/fs: Improve filtering around posix arch
These tests cannot be run on the native_posix(_64) targets,
so let's filter them explicitly. Before they were filtered
due to the "filter", but using platform_exclude is faster.

Also the tests that depend on newlib cannot be run
in this architecture at all, so let's filter them by
architecture too.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-25 07:44:12 -04:00
Alberto Escolar Piedras a2d1e979ef tests posix timer: Fix timer check
The timer check does not work properly for platforms
which have a system tick timer with a period that
does not properly divide the configured time interval.

In those, depending on when the timer is started and
stopped, one signal less may be received.

This is for example the case for nrf5x platforms,
where the system tick timer is driven by a 32.768KHz
clock.

=> Correct the test, to accept receiving 1 signal
too little during the wait.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-25 07:44:12 -04:00
Joakim Andersson dc431a7397 boards: Fix nrf9160 NS flash partition layout
Fix secure and non-secure images overlapping because of incompatible
flash layout configurations.

Align the board configurations to match the nRF9160 DK default
partition layout.

This enforces that the SPU alignment requirement is satisfied for
the nrf9160 MCU.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-10-25 11:22:06 +02:00
Alberto Escolar Piedras 572491ab95 Revert "modules: tinycrypt: Options only when module is available"
This reverts commit 713ca15224.

This change broken several BT unit tests breaking CI in the main
branch. Let's revert it.

Fixes https://github.com/zephyrproject-rtos/zephyr/issues/64344

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-25 11:04:43 +02:00
Henrik Brix Andersen 9a7671e521 ci: test using Python 3.11 as well
Run CI tests against Python v3.11 as well.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-10-25 10:06:01 +02:00
Peter Mitsis 9f7244ee04 tests: obj_core: Increase stack sizes
Increase the size of the thread stacks used by the obj_core tests
by CONFIG_TEST_EXTRA_STACK_SIZE bytes. This is useful to prevent
stack overflow/corruption when options such such as
    "--coverage --gcov-tool gcov"
are applied to twister runs.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2023-10-25 10:05:52 +02:00
romain pelletant efebb1841f modem_chat: fix hard fault on script stop
Fix fault on modem_cellular disconnection/reconnection
Issue #64291

Signed-off-by: romain pelletant <romainp@kickmaker.net>
2023-10-25 10:05:45 +02:00
Jamie McCrae f2b3a5ea3a samples: mgmt: mcumgr: smp_svr: Fix start if USB already init
Fixes an issue whereby the application init will stall if USB init
failed if it's already been setup, this is likely due to USB CDC
being enabled in which case the failure can be ignored

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-10-25 10:05:37 +02:00
Rick Tsao 7c25a7562b riscv: pmp: Fix assertion for PMP misaligned start address and size
Fix assertion to check whether the start address and size align with
PMP granularity.

Signed-off-by: Rick Tsao <rick592@andestech.com>
2023-10-25 10:05:24 +02:00
ingram weeks 6b739a7684 doc: README added to lora send sample
README added to lora send sample

Signed-off-by: ingram weeks <ingram.weeks@gmail.com>
2023-10-25 10:05:17 +02:00
Alberto Escolar Piedras c83c8df26a tests/lib/time: Fix for posix architecture
* Select always PICOLIBC. This is anyhow the default for all
  but the posix architecture. And for the posix architecture
  we need it as POSIX_CLOCK does not work with the host C
  library.
* Fix the testcase filtering. This sample works fine
  in native_sim (when not using the host libC),
  but does not work for native_posix(_64), as those can
  only be built with the host libC, and in that case,
  the POSIX_CLOCK provided functions will not be properly
  linked to.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-25 09:58:07 +02:00
Alberto Escolar Piedras f8c202ec1c lib/posix clock: Add missing kconfig dependency
POSIX clock cannot be used with the host libC
when building with the POSIX architecture.
Let's ensure it via kconfig.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-25 09:58:07 +02:00
Alberto Escolar Piedras 7159522597 samples posix uname: Fix sample yaml filtering
The sample was at the same time filtered for the whole
posix architecture and had native_posix as its integration platform.
This is selfcontradictory.

In any case, this sample cannot run in native_posix but
can run in native_sim.
So let's fix the filtering.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-25 09:57:58 +02:00
Sylvio Alves c179f17836 samples: boards: esp32: add memory-mapped sample code
This sample shows how to use flash_mmap() call to enable custom flash
area to be mapped into data region.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-10-25 09:57:48 +02:00
Sylvio Alves 3f5ea785f2 linker: esp32: fix linker to enable proper MMU usage
ESP32 flash_mmap() function requires `_rodata_reserved_start` address
to be at the beginning of RODATA. This allows adding memory-mapped flash
areas.

Fixes #52764

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-10-25 09:57:48 +02:00
Jason Murphy 38f8a4db28 drivers: ethernet: fix adin2111 devicetree init to work with adin1110
The initialisation of the device data struct was giving a build error
when using the adi,adin1110 devicetree compatible.
Fixed to allow both adi,adin2111 and adi,adin1110 devices to
be defined.

Signed-off-by: Jason Murphy <jason.murphy@analog.com>
2023-10-25 09:57:37 +02:00
Yong Cong Sin 0e2f5c2dbb shell: print name and prompt when listing backends
The shell name defined with `SHELL_DEFINE` is implicitly
guaranteed to be unique while it is possible that more than one
shell backends can have the same prompt.

Print the name of the shell backend alongside with its prompt
to differentiate between the backends.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-10-25 09:57:29 +02:00
Yong Cong Sin a068288091 shell: add new APIs to get the backend instances
Added some new APIs to get the backend instances more easily,
so that dev does not need to rely on `shell_backend_*_get_ptr`,
which looks more like a hack to access a local variable.

These APIs are basically copied from the log backend
implementation.

Added testcase for the APIs.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-10-25 09:57:29 +02:00
Yong Cong Sin dd154406ba shell: make the backend thread name variable generic
Rename the shell backend `thread_name` variable to just `name`,
to be used for other things not specific to thread later.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-10-25 09:57:29 +02:00
Piotr Kosycarz 8c5a15aac4 scripts: twister: get status of coverage data processing
Do not break processing when incorrect coverage data are received.
Instead, report failures but still process valid data.

Include coverage processing status within twister retrun code.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2023-10-25 09:57:15 +02:00
Piotr Kosycarz 861cab4a2a scripts: twister: extend test timeout to get gcov data
When coverage is enabled, gather console logs longer
to receive gcov data which are send after test output.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2023-10-25 09:57:15 +02:00
Piotr Kosycarz bc8b7dd6dd testsuite: coverage: allow gcov data dump directly on console
When there is no buffer for gcov hex data,
dump them directly to console.
This saves RAM which can be used to hold more gcov data.

Reduce number of gcov hex data send by console -
do not send space between every two digits.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2023-10-25 09:57:15 +02:00
Antoniu Miclaus b5bc088529 tests: build_all: sensor: i2c: add adxl367
Add adxl367 i2c node in the build_all tests.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
2023-10-25 09:57:02 +02:00
Antoniu Miclaus cecfb3e120 tests: build_all: sensor: spi: add adxl367
Add adxl367 spi node in the build_all tests.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
2023-10-25 09:57:02 +02:00
Antoniu Miclaus 89be1e948d drivers: adxl367: add support
Add driver support for adxl367 accelerometer.

The ADXL367 is an ultralow power, 3-axis microelectromechanical
systems (MEMS) accelerometer that consumes only 0.89 μA at
a 100 Hz output data rate and 180 nA when in motion-triggered
wake-up mode. Unlike accelerometers that use power duty cycling
to achieve low power consumption, the ADXL367 does not alias
input signals by undersampling, but samples the full bandwidth of
the sensor at all data rates.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
2023-10-25 09:57:02 +02:00
Antoniu Miclaus a282f6a92b dts: bindings: add adxl367 support
Add bindings for the adxl367 accelerometer.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
2023-10-25 09:57:02 +02:00
Keith Packard 1e5c46df3d samples: Switch from NEWLIB_LIBC to REQUIRES_FULL_LIBC
Instead of forcing use of NEWLIB_LIBC, select any available complete C
library implementation. Add CONFIG_REQUIRES_FLOAT_PRINTF and adjust
CONFIG_LIBC_MALLOC_ARENA_SIZE as needed.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-10-25 08:32:06 +02:00
Keith Packard 565c9376f1 tests: Switch from NEWLIB_LIBC to REQUIRES_FULL_LIBC
Instead of forcing use of NEWLIB_LIBC, select any available complete C
library implementation. Add CONFIG_REQUIRES_FLOAT_PRINTF where needed.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-10-25 08:32:06 +02:00
Keith Packard be4b76fea2 Kconfig.zephyr: Add NATIVE_LIBC and NATIVE_LIBCPP
These are set when building against the host C or C++ libraries. This
allows filtering tests that require use of a C library that sits atop
Zephyr OS APIs.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-10-25 08:32:06 +02:00
Keith Packard 1e40199c8d libc: Add REQUIRES_FLOAT_PRINTF to indirectly set printf support
Instead of making applications use C library specific settings to enable
floating point support in printf, provide this indirect symbol which then
detects which C library is in use and selects the correct configuration for
each.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-10-25 08:32:06 +02:00
Daniel Leung 88b05b3b91 kernel: disable THREAD_USERSPACE_LOCAL_DATA if LIBC_ERRNO
Thread userspace local data is to be used with storing errno per
thread without thread local storage support. However, if the C
library has native errno support, there is no need to enable
thread userspace local data to store errno per thread. Therefore,
amend the default for CONFIG_THREAD_USERSPACE_LOCAL_DATA so that
it is not enabled if the C library has native errno support.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-10-24 20:23:11 -04:00
Flavio Ceolin 27dedec4cc doc: release: 3.5: Add info about CVE-2023-5753
Update 3.5 release notes with published CVE

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-24 23:49:59 +02:00
Flavio Ceolin 31a92fc5e3 doc: vuln: Add information about CVE-2023-5753
Information about CVE-2023-5753

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-24 23:49:59 +02:00
Laurentiu Mihalcea 4974bc0137 linker: common-rom: Keep z_shared_isr regardless of dynamic interrupts
Currently, the z_shared_isr symbol is only kept if
CONFIG_DYNAMIC_INTERRUPTS=n. Whenever CONFG_DYNAMIC_INTERRUPTS
is set to 'y', said symbol gets dropped when zephyr_pre0.elf
is created. This is wrong because dropping/keeping z_shared_isr
shouldn't be influenced by enabling/disabling support for the
dynamic interrupts.

This commit fixes the aforementioned issue by removing the
dependency on CONFIG_DYNAMIC_INTERRUPTS.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-10-24 17:00:55 +02:00
cyliang tw b59810650d drivers: can: support for Nuvoton numaker series
Add Nuvoton numaker series can-fd controller based on mcan.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-10-24 09:31:47 -05:00
Bjarki Arge Andreasen b4f3150592 modem: cmux: Optimize log message to save ROM
This commit reuses the string "Unknown %s frame type" for two
log messages, as suggested by ycsin.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-24 14:31:38 +01:00
Bjarki Arge Andreasen ee44357cfb modem: modem_cellular: Reset receive state on attach
This commit resets the state of the CMUX receive state
machine when the CMUX instance is attached to a pipe.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-24 14:31:38 +01:00
Bjarki Arge Andreasen b495fda6a1 modem: modem_cmux: Improve logging
This commit adds logging for CMUX frames and commands and
their data, for both transmit and receive. It also removes
the superseded LOG_DBG() lines like "Received frame".

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-24 14:31:38 +01:00
Bjarki Arge Andreasen 0f38136431 modem: modem_cmux: Clear DLCI pipes on open
This commit resets the receive ring buffer for each DLCI
pipe when they are opened. They may have old data stored
from last time they where opened.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-24 14:31:38 +01:00
Bjarki Arge Andreasen 92ad351e2a modem: modem_cmux: Use k_event_test instead of K_NO_WAIT
This commit replaces the k_event_wait calls using K_NO_WAIT
with k_event_test.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-24 14:31:38 +01:00