Commit Graph

105273 Commits

Author SHA1 Message Date
Lars-Ove Karlsson e7c74e8f30 tests: kernel: fpu_sharing Fixed missing struct defs for ARM
Added empty fp register structs for ARM combinations not handled,
i.e. any ARM without a fpu.

Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
2024-11-16 14:57:17 -05:00
Aaron Ye 0439cbc29c drivers: bluetooth: hci: add close function for Ambiq Apollo3x
This commit adds the bt_hci_driver.close function for Ambiq
Apollo3x SoC. Also update the hal_ambiq revision including
the necessary support.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2024-11-16 14:57:06 -05:00
Fin Maaß 8646a6c289 net: ethernet: arp: extend error log
If a gateway is not set for a interface,
also log the destination address.

Also print the interface index instead of the
interface pointer.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-11-16 14:56:57 -05:00
Emil Gydesen 8386929944 tests: Bluetooth: Tester: Log conn changes
Log the address and the err/reason values in the connected
and disconnect callbacks.

Since these values are not part of the BTP events it is
difficult to follow the order and reason why disconnects
happen when debugging.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-16 14:56:51 -05:00
Alberto Escolar Piedras 6d53e376cb tests/bsim/bluetooth/ll: Increase EXECUTION_TIMEOUT where needed
Increase the EXECUTION_TIMEOUT (real time timeout at which the test
will be killed), so we have more margin for CI.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:56:43 -05:00
Alberto Escolar Piedras 5da8eb3e9f tests/bsim/bluetooth/host: Increase EXECUTION_TIMEOUT where needed
Increase the EXECUTION_TIMEOUT (real time timeout at which the test
will be killed), so we have more margin for CI.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:56:43 -05:00
Alberto Escolar Piedras 4c8ee78b76 tests/bsim/bluetooth/audio: Increase EXECUTION_TIMEOUT where needed
Increase the EXECUTION_TIMEOUT (real time timeout at which the test
will be killed), so we have more margin for CI.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:56:43 -05:00
Emil Gydesen dc6630d5f5 samples: Bluetooth: PBP: Source: Fix advertising data
The sample had a few off-by-ones in the code, which caused access
to invalid data.

Fixed by setting the right buffer sizes and the right AD length
fields.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-16 14:56:30 -05:00
Guennadi Liakhovetski ae8c373314 LLEXT: fix a needless allocation
When CONFIG_LLEXT_STORAGE_WRITABLE is selected and .pre_located is
set, the BSS section is allocated by the user too, no need to
allocate it internally.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-11-16 14:56:23 -05:00
Marvin Ouma 7e8ee25479 tests: posix: common: separate posix rwlocks tests into a standalone test
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves rwlocks into a singular
testsuite at tests/posix/rwlocks app directory.

Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
2024-11-16 14:56:16 -05:00
Marvin Ouma f7633a55aa tests: posix: common: separate posix semaphores tests into standalone test
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves semaphore into a singular
testsuite at tests/posix/semaphores app directory.

Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
2024-11-16 14:56:09 -05:00
Krzysztof Chruściński ed5ce47437 drivers: serial: nrfx_uarte: Fix RX path without low power modes
RX FIFO flushing on RXTO event should only be performed when
UARTE peripheral might be disable during inactivity and that
happens when low power modes is enabled or when device runtime
PM is used. Flushing was incrementing flush_cnt which was not
used (flushed data is not copied to the next buffer) which
was causing data loss and invalid RX data length reporting.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-16 14:55:43 -05:00
Pisit Sawangvonganan effe4bbf95 fb: cfb_shell: remove `dev` null check
Remove `dev` null check as `DEVICE_DT_GET` ensures compile-time
initialization.
Refer to commit 6eb371f (fb: initialize devices at compile time)

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-11-16 14:53:57 -05:00
Pisit Sawangvonganan cff8b6092e fb: cfb_shell: use `shell_strtol` in `cmd_set_kerning`
Switch from using direct `strtol` calls to `shell_strtol`.
This change leverages the extensive error handling provided
by `shell_strtol`.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-11-16 14:53:57 -05:00
Pisit Sawangvonganan 06e0b2d1d6 fb: cfb: remove unnecessary `NULL` check and `NULL` assignment
Since the `fb` pointer is always assigned to `char_fb`, there is no need
for a `NULL` check. Additionally, removed setting `fb->buf` to `NULL` in
`cfb_framebuffer_init` as it will be overwritten by subsequent operations.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-11-16 14:53:57 -05:00
Pisit Sawangvonganan b7fe2a0bf9 fb: cfb: avoid multiple `strlen` calls in `draw_text`
Added `len` to store the result of `strlen(str)` to avoid
multiple calls to `strlen` in the `for-loop`.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-11-16 14:53:57 -05:00
Marvin Ouma ab601ae05c tests: posix: common: separate posix single process into a standalone test
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves confstr, sysconf and uname into
a singular testsuite at tests/posix/single_process app directory.

Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
2024-11-16 14:53:42 -05:00
Mikhail Kushnerov a995d9d76f kernel: fix k_sleep in no multi-threading mode
Fix k_sleep implementation for no multi-threading mode.

Absolute value of timeout expiration was fed to the k_busy_wait()
function instead of delta value. That caused bug like incrementing of
sleep time in geometric progression (while actual function argument is
constant) during program running.

Signed-off-by: Mikhail Kushnerov <m.kushnerov@yadro.com>
2024-11-16 14:07:41 -05:00
Mark Inderhees c9d6c4c744 compiler: for xtensa add libgcc support
In order to compile with C++ exception handling for xtensa, the libgcc
location needs to be known. This change uses the same logic from gcc's
target.cmake to query the compiler for libgcc location and add the lib
to the include list.

Signed-off-by: Mark Inderhees <markind@meta.com>
2024-11-16 14:07:30 -05:00
Neil Chen 2de5e601a7 boards: frdm_mcxc444: Add lptmr support
Support lptmr for NXP frdm_mcxc444 board

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-11-16 14:07:17 -05:00
Yong Cong Sin e0ce096b91 tests: benchmarks/sched: limit CPU to 1 for Intel ADSP ACE
Due to addition of busy threads running on other cores, and
the simulator runs in single thread bouncing through all cores,
we are wasting quite a bit of time just busy waiting. This makes
each simulator run too long for CI. So limit CPU number to 1.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-11-16 14:07:08 -05:00
Yong Cong Sin 927420a423 tests: sched: Add busy threads for SMP
The sched benchmark is designed for systems with a single
CPU. Otherwise, the timestamps would be wrong when the partner
thread is scheduled on another CPU, i.e. negative values:

```
unpend   63 ready   62 switch -16562 pend 18937 tot 2500 (avg  928)
```

When the system allows for multiple CPUs, spawn a non-preemptible
thread to keep the other CPUs busy.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-11-16 14:07:08 -05:00
Maxime Vincent b77c50d7b8 soc: arm: nxp: lpc55xx flexcomm 3->7 clock init
Add clock init for FlexComm 3,4,5,6,7 in case they
are enabled in DeviceTree

Signed-off-by: Maxime Vincent <maxime@veemax.be>
2024-11-16 14:06:54 -05:00
Jamie McCrae 73f3f7dbef soc: gd: gd32: Remove setting Kconfig in wrong place
This Kconfig should not be set from here

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-11-16 14:06:37 -05:00
Jamie McCrae 557a2c6cbd soc: nxp: imx: imx8m: Remove wrong Kconfig setting
Removes setting a Kconfig in the wrong place

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-11-16 14:06:37 -05:00
Jamie McCrae 6bc6e4e5c2 soc: mediatek: mtk_adsp: Fix wrong hwmv2 Kconfigs
Fixes Kconfigs for hwmv2 being defined in the wrong files

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-11-16 14:06:37 -05:00
Krzysztof Chruściński bedb7e16c3 tests: kernel: timer: timer_behavior: Adjust TIMER_TEST_SAMPLES
Adjust default number of test samples which is based on SRAM size.
Test is using 8*TIMER_TEST_SAMPLES and with previous defaults for
the device with 64k RAM it was using 56k of test data leaving only
8k RAM and that was easily not enough. Adjust conditions to
take less samples when SRAM_SIZE is equal to the threshold.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-16 14:06:28 -05:00
Erwan Gouriou 4a94a33164 drivers: i2c: stm32: LL API C filers are not required
From some reason, STM32 I2C drivers selected the compilation of
C files of the I2C LL API.
This is actually not required, so remove this dependency.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-11-16 14:06:21 -05:00
Pieter De Gendt 2ee5a24417 scripts: ci: check_compliance: Simplify line number in loop
Use the builtin enumerate function rather than a manual variable.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-16 14:06:12 -05:00
Emil Gydesen 8703381764 Bluetooth: Host: Add conversion macros from ms to various units
Add conversion macros from milliseconds to various units.
The purpose of these macros is to make it more clear/easier
for users to set and read values using milliseconds rather
than the various BT units which may be in 0.625, 1.25 or 10ms
units.

This is especially useful when comparing related values using
different units, such as advertising interval (0.625ms units)
and periodic advertising interval units (1.25ms units).

Users will have to be aware that these macros can provide slightly
different values than what is provided, if the provided values
do not match the units.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-16 14:06:03 -05:00
Alberto Escolar Piedras 0d249ecd23 tests/bsim: Also runtime test the UART drivers for the nrf5340
To increase coverage.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras 7065b4628b doc boards nrfbsim: Mention the UARTE as supported for nrf5340
Include in the list of supported peripherals the UARTE for the
simulated nrf5340

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras 5321941a5d tests uart_pm: Enable for nrf5340bsim
Enable this test in the simulated nrf5340 and provide
an appropriate overlay.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras 51053cce11 tests uart_mix_fifo_poll: Enable for nrf5340bsim
Enable this test in the simulated nrf5340 and provide
an appropriate overlay.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras dd13fa0c47 tests uart_async_api: Enable in nrf5340bsim//cpuapp
Enable this test in the simulated nrf5340 by providing
an appropriate overlay.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras a7abf80064 boards nrfbsim: Enable UART(E) peripherals for nrf5340bsim
The HW models now support this peripheral for these targets.
Let's enable them.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras 3418305eb8 doc boards nrfbsim: Mention the GPIO & GPIOTE as supported
Include in the list of supported peripherals the GPIO
and GPIOT for both the nrf5340 and nrf54l15

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras da01758908 tests gpio_get_direction: Enable for nrf5340bsim
Enable this test by providing an overlay for the nrf5340bsim
Both for the app and net core.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras 14c096ff38 tests gpio_basic_api: Enable for nrf5340bsim
Enable this test, and provide overlays, in the nrf5340bsim

Note this test specs 2 GPIO pins to be shorted. This can be done
for the simulation target by calling zephyr.exe with the option
`-gpio_conf_file=shorts_config.txt`
Where  that file would contain this one line (for the provided overlay),
for the cpunet:
---- shorts_config.txt
short 1.1 1.2
----
And this for the cpuapp:
---- shorts_config.txt
short 3.1 3.2
----

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras 8bd0a2525c tests gpio_hogs: Enable for nrf5340bsim
Enable this test, and provide overlays, for the nrf5340bsim.
Both for the app and net core.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras d0746f1177 boards nrfbsim: Enable GPIO & GPIOTE peripherals for nrf5340bsim
The HW models now support these pheripherals, let's enable them

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras 990fc4c130 tests gpio_get_direction: Enable for nrf54l15bsim
Enable this test by providing an overlay for the nrf54l15bsim

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras fb5ee609a0 tests gpio_hogs: Enable for nrf54l15bsim
Enable this test, and provide overlays, in the nrf54l15bsim

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras 1b1d3ca5d5 tests gpio_basic_api: Enable for nrf54l15bsim
Enable this test, and provide overlays, in the nrf54l15bsim

Note this test specs 2 GPIO pins to be shorted. This can be done
for the simulation target by calling zephyr.exe with the option
`-gpio_conf_file=shorts_config.txt`
Where  that file would contain this one line (for the provided overlay)
---- shorts_config.txt
short 1.1 1.2
----

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras 4b890bc7b5 boards nrfbsim: Enable GPIO & GPIOTE peripherals for nrf54l15bsim
The HW models now support these pheripherals, let's enable them

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras 0efbca30a5 manifest: Update nRF hw models to latest
Update the HW models module to:
aeef3db9fa9e4b9d12b3bbec44f9cedc8fcb7d9c

Including the following:
aeef3db GPIO & GPIOTE: Improve notes and documentation
93549c4 UART: Fix command line parameter description
dbab746 nrf_hack: Add a few missing peripherals
4b1a61b 53 UARTE: Correct subscribe sideeffects function name
197e9cf docs: UART can be used now for 5340 in Zephyr
dc18d14 53: GPIO+TE: Add app core instances
b236c08 GPIO+TE: Add to 5340's netcore
7a621f6 GPIO: Clarify function description
1a2e1e4 GPIO+TE: Build for 54L
d121db4 nrf_gpio hal: Add new nrf_gpio_port_pin_{in,out}put_set
9bc41ce GPIOTE: Connect to DPPI
7141042 GPIOTE: Add simple support for PORT.SECURE & NONSECURE
dc930ba GPIOTE: Support having or not sense functionality per instance
a07180d GPIO: Support multiple GPIOTEs
14bdce5 GPIO: Collect status in single struct
b91da53 GPIOTE: Add support for N interrupt lines
9963424 GPIO & GPIOTE: Generalize to N instances
7379c23 GPIO+TE: Fix indentation
8d691c6 Add SPU registers stub
dd68ca9 Add NFCT register stub
cf2cc5b HW_models: NHW_NVMC: fix buffer read validation
f3db727 zephyr: module.yml: add `depends` field
09fc98f CMakeLists: remove trailing whitespace

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Yong Cong Sin ad7f3a9a0c soc: andestech: refactor out soc_early_init_hook() from pma.c
Refactor out the `soc_early_init_hook()` function from `pma.c` to
`soc.c` which is always compiled so that it can be extended to run
other init functions easily in the future. Then, restore the function
in `pma.c` to `pma_init()`.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-11-16 14:04:25 -05:00
Yong Cong Sin 01b69e9c22 soc: andestech: run pma_init_per_core() with soc_per_core_init_hook()
The function `pma_init_per_core()`, as its name suggest, should be
run from every core, so call it from `soc_per_core_init_hook()`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-16 14:04:25 -05:00
Yong Cong Sin de347a4e07 init: support per-core init hook
Allow SoC to implement their custom per-core initialization function by
selecting `CONFIG_SOC_PER_CORE_INIT_HOOK` and implement
`soc_per_core_init_hook()`.

Signed-off-by: Maxim Adelman <imax@meta.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-16 14:04:25 -05:00
Yong Cong Sin cc0796ab86 soc: andestech: soc_per_core_init_hook() shouldn't return value
The `soc_per_core_init_hook()` function now has `void` type after
da118b9, so it should just return without any value.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-16 14:04:25 -05:00