Commit Graph

93932 Commits

Author SHA1 Message Date
David Leach 00b46686b1 drivers: lpc55s36: Remove deprecated CSS driver
CSS was deprecated from the mcu-sdk. Removing driver from lpc55s36
to clear build error.

This is a temporary patch to remove the build error.

Fixes #69961

Signed-off-by: David Leach <david.leach@nxp.com>
2024-04-10 14:11:34 -04:00
Marcin Niestroj 424ea9f5e4 drivers: wifi: esp_at: do not connect socket on bind(INADDR_ANY)
All connect() syscalls result in EISCONN error, since underlying
_sock_connect() is attempted to be called twice. Once from net_context.c'
bind_default() (with INADDR_ANY) as part of esp_bind() and second time as
part of esp_connect().

Do not call _sock_connect() from esp_bind(INADDR_ANY), which happens as
part of connect().

Fixes: dbf3d6e911 ("drivers: esp_at: implement bind() and recvfrom() for
  UDP sockets")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-04-10 12:23:12 -05:00
Dmytro Firsov 79c3ba802a boards: xenvm: return userspace testcases for XenVM board
XenVM boards were mark as unsupported for twister testcases related to
userspace. After additional investigation no problems were found for
builds, so there are no reason to exclude it from test runs.

Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
2024-04-10 12:14:57 -04:00
Marcin Szymczyk d2b3e3a389 sysbuild: add SoC-specific sysbuild configuration
Sysbuild now supports SoC configuration,
in addition to application and board.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2024-04-10 17:53:24 +02:00
Marcin Niestroj ea44e2715a drivers: net: nsos: update unwatched file descriptor with poll()
zsock_poll_internal() iterates through all fds to call
ZFD_IOCTL_POLL_UPDATE on them. In cases when -EAGAIN is returned from one
of such syscalls (which happens for example for TLS sockets when in the
middle of a TLS handshake) whole fds array is iterated once again. This
means that ZFD_IOCTL_POLL_UPDATE can be called more than once for a single
preceding ZFD_IOCTL_POLL_PREPARE operation. This resulted in error in
nsos_adapt_poll_remove() call, which was not intended to be called twice.

In case ZFD_IOCTL_POLL_UPDATE is called second time, update 'revents' just
by calling poll() syscall on the host (Linux) side with 0 timeout.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-04-10 11:30:04 -04:00
Marcin Niestroj 7c506fad6b drivers: net: nsos: fix error message on EPOLL_CTL_DEL error
Fix a copy-pasted error message to reference proper epoll_ctl() operation.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-04-10 11:30:04 -04:00
Marek Matej b29be06ec2 boards: espressif: Update documentation
Update the booting information in recently added
Espressif boards to include simple boot method.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-04-10 11:29:45 -04:00
Fabian Blatz f47b862c44 modules: lvgl: Kconfig: Add missing stubs for DMA2D kconfig symbols
Adds the missing stubs for DMA2D kconfig symbol to fix the Kconfig warning
produced by checkpatch.

Resolves #70859

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-04-10 11:29:19 -04:00
Lluis Campos 85b86daa01 doc: device_mgmt: Fix typo in link text
Previously it read "there is a sample sample that..."

Signed-off-by: Lluis Campos <lluis.campos@northern.tech>
2024-04-10 11:28:51 -04:00
Lyle Zhu 97fcbc905b drivers: memc: fix FlexRAM bank cfg issue
From IMXRT1170RM.pdf, iomuxc_gpr->GPR17 is
used to configure FlexRAM bank 0~7.
iomuxc_gpr->GPR18 is used to configure
FlexRAM bank 8~15.

Set low 2 bytes to iomuxc_gpr->GPR17.
Set high 2 bytes to iomuxc_gpr->GPR18.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-04-10 11:28:32 -04:00
TOKITA Hiroshi 747440c46e boards: arduino: uno_r4: Update document about Arduino UNO R4 WiFi
Update documents about adding Arduino UNO R4 WiFi.
Adding a description that a debug adapter is required when
flashing and debugging.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-04-10 15:55:57 +02:00
TOKITA Hiroshi 1b2560167f boards: arduino: uno_r4: Add Arduino UNO R4 WiFi
Add configuration for Arduino UNO R4 WiFi

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-04-10 15:55:57 +02:00
TOKITA Hiroshi 63772ad2d8 boards: arduino: uno_r4_minima: Rename directory to `uno_r4`
Rename directory to `uno_r4` for preparing to add Arduino UNO R4 Wifi.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-04-10 15:55:57 +02:00
Sebastian Głąb 0fdfcad675 samples: sensor: qdec: Move console regex to each test
It seems that harness_config defined in the 'common' section
is discarded when test adds fixture to it's harness_config.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-04-10 15:55:49 +02:00
Sebastian Głąb ad33d007ea samples: sensor: qdec: Add nRF54L15 to platform allow
Add nRF54L15 to platform_allow and integration_platforms
in the sample.yaml.
Overlay file for that target already exists in the boards
directory.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-04-10 15:55:49 +02:00
Piotr Kosycarz 884e661cc9 samples: sensor: isl29035: Align sample definition
Add fixutre as external hw is required.
Add regex.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-04-10 15:55:40 +02:00
Armando Visconti 38738265b9 drivers/sensor: use sensor APIs to convert to units
Make use of sensor_ug_to_ms2() and sensor_10udegrees_to_rad() APIs
to convert from raw values into proper units (i.e. m/s^2 for accel
and rad/s for gyro).

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-04-10 15:55:32 +02:00
Kai Vehmanen 7fee1bdd39 soc: intel_adsp: cavs: fix power_down documentation
Fix the inline documentation to match implementation. As IPFL is used,
the correct matching function is xthal_icache_region_lock().

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-10 15:55:21 +02:00
Kai Vehmanen 03057f33d4 soc: intel_adsp: ace: fix power_down documentation
Fix the inline documentation to match implementation. As IPFL is used,
the correct matching function is xthal_icache_region_lock().

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-10 15:55:21 +02:00
Seppo Takalo 41d70de91e drivers: eth: stellaris: Fix build error
Apparently there was a typo in the last commit.
Looks like it was refactored without trying to build.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-04-10 15:55:13 +02:00
Najumon B.A e70273a3cd MAINTAINERS: update for x86 arch and platform
Update collaborators list for x86 arch and platform

Signed-off-by: Najumon B.A <najumon.ba@intel.com>
2024-04-10 08:17:42 -04:00
Filip Kokosinski f46debf21e MAINTAINERS: update SiLabs maintainers
Removing ourselves from maintainers list as we currently don't have
bandwith to maintain this platform family.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-04-10 14:11:16 +02:00
Francois Ramu 325ae4d32a samples: drivers: spi flash testcase check the erased data
After erasing the sector, compare dat read with expected 0xFF pattern
to decide if erasing is successful instead of relying on the
returned code of the flash_erase function

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-04-10 08:00:53 -04:00
Francois Ramu 01684df03a drivers: flash: stm32 ospi flash driver the correct erase instruction
Use the most adapted instruction for the sector erase command
It can be 0x20 or ox21 or 0x21DE in octo - DTR mode.
The value is given by the SFDP table and  filled in the erase_types
 table the during the SFDP discovery process.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-04-10 08:00:53 -04:00
Grzegorz Swiderski 7d45f3c92a soc: nordic: Provide z_arm_platform_init at link time
Nordic SoCs use this hook to execute `SystemInit` as early as possible
after ARM core reset. Previously, `z_arm_platform_init` was defined as
assembly code, which would simply jump to the other function.

However, this extra code can be avoided by using `SystemInit` directly
in place of the `z_arm_platform_init` symbol (whenever it's undefined).
This is now done with a linker script containing a `PROVIDE` directive.

This saves 4 bytes of ROM (0-16 depending on alignment) and also makes
it possible to override `z_arm_platform_init` out of tree, if needed.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-04-10 07:45:42 -04:00
Daniel Leung 027a1c30cd x86: add support for memory mapped stack for threads
This adds the necessary bits to enable memory mapping thread
stacks on both x86 and x86_64. Note that currently these do
not support multi level mappings (e.g. demand paging and
running in virtual address space: qemu_x86/atom/virt board)
as the mapped stacks require actual physical addresses.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-04-10 07:44:27 -04:00
Daniel Leung 414250d013 boards: qemu_x86/atom/virt: forcibly disable memory mapped stack
The current memory mapped stack code requires actual physical
addresses for stacks, and cannot deal with stacks already using
virtual addresses. So disable mapped stack via defconfig.

Note that this is done before enabling memory mapped stacks on
x86 so test won't fail when the support in the architecture
code is introduced.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-04-10 07:44:27 -04:00
Daniel Leung e7554117b7 tests: mem_protect/stackprot: test mapped stack
This extends the mem_protect/stackprot tests to support testing
with memory mapped stack.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-04-10 07:44:27 -04:00
Daniel Leung b60e09062d cmsis_rtos_v1: support memory mapped stack at abort hook
This extends the thread abort hook to support memory mapped
stack. The calculation to find out to which instance of thread
pools the outgoing thread belongs requires physical address.
So find the physical address via the memory mapped stack for
that.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-04-10 07:44:27 -04:00
Daniel Leung cfbbcac3f7 tests: threads/thread_stack: extend tests for mapped stack
This extends the test for memory mapped stack, as the address of
memory mapped stack object would be different than the actual
stack object.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-04-10 07:44:27 -04:00
Daniel Leung 0b3a4f35d0 tests: mem_protect/userspace: extend tests for mapped stack
This extends the test for memory mapped stack, as the address of
memory mapped stack object would be different than the actual
stack object.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-04-10 07:44:27 -04:00
Daniel Leung d0a90a0b33 kernel: add the ability to memory map thread stacks
This introduces support for memory mapped thread stacks,
where each thread stack is mapped into virtual memory
address space with two guard pages to catch
under-/over-flowing the stack. This is just on the kernel
side. Additional architecture code is required to fully
support this feature.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-04-10 07:44:27 -04:00
Daniel Leung 04c5632bd4 kernel: mm: introduce k_mem_phys_map()/_unmap()
This is similar to k_mem_map()/_unmap(). But instead of using
anonymous memory, the provided physical region is mapped
into virtual address instead. In addition to simple mapping
physical ro virtual addresses, the mapping also adds two
guard pages before and after the virtual region to catch
buffer under-/over-flow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-04-10 07:44:27 -04:00
Daniel Leung 378131c266 kernel: add options to cleanup after aborting current thread
This adds the mechanism to do cleanup after k_thread_abort()
is called with the current thread. This is mainly used for
cleaning up things when the thread cannot be running, e.g.,
cleanup the thread stack.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-04-10 07:44:27 -04:00
Daniel Leung 94997a026f x86: correct size for stack bound check for privileged stack
Previous commit changed the privileged stack size to be using
kconfig CONFIG_PRIVILEGED_STACK_SIZE instead of simply
CONFIG_MMU_PAGE_SIZE. However, the stack bound check function
was still using the MMU page size, so fix that.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-04-10 07:44:27 -04:00
Daniel Leung ac5835565b x86: synchronize usage of CONFIG_X86_STACK_PROTECTION
Most places use CONFIG_X86_STACK_PROTECTION, but there are some
places using CONFIG_HW_STACK_PROTECTION. So synchronize all
to use CONFIG_X86_STACK_PROTECTION instead.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-04-10 07:44:27 -04:00
Daniel Leung 3d39864900 x86: do not advertise demand paging support for x86_64
x86_64 does not currently support demand paging so don't
advertise it.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-04-10 07:44:27 -04:00
Daniel Leung d8614afd8d x86: gen_gdt: remove extra unnecessary parens
Pylint complains so we fix.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-04-10 07:44:27 -04:00
Jonathan Rico 55533bc607 scripts: Add `APP_LOG_LEVEL_DBG`
Someone should really fix this properly..

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-04-10 07:43:41 -04:00
Jonathan Rico f818cbd8cc tests: Bluetooth: Add example bsim test
This test is intended to teach the conventions and best practices to a
potential contributor that wants to add a test, for say a new feature.

It is liberally commented on purpose, so new contributors don't have to
spend two weeks understanding the intricacies of the simulator, the bsim
test framework, the native builds, backchannels, etc..

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-04-10 07:43:41 -04:00
Jonathan Rico 389192a94d tests: Bluetooth: Add common helpers for bsim
This code can be found (kinda) duplicated all over
`tests/bsim/bluetooth`.

Put it in a common place.

Refactoring the current tests will be done in a future commit.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-04-10 07:43:41 -04:00
Alberto Escolar Piedras 936598ddf1 tests/bsim/common sh: Improve getting test name/relative path
Improve function which guesses the test name so the calling
script can be invoked from any folder, not just Zephyr's
base.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-10 07:43:21 -04:00
Jukka Rissanen cb7aae6f82 net: dns-sd: Do not use sockaddr struct directly
The "struct sockaddr" should only be used in casts and never
as a standalone variable because it might not have enough
space allocated for all the protocol specific fields.
So refactor the port_in_use() function to reflect that.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-10 07:42:42 -04:00
Robert Lubos f77c7a3d05 net: dhcpv4_server: Fix positive error codes returned
errno values are positive, therefore they should be negated when
assigned as return values for net_dhcpv4_server_start().

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-04-10 07:42:21 -04:00
Piotr Kosycarz 8d4743d144 samples: sensor: qdec: Allow coverage calculation
Sample must end to dump coverage data.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-04-10 07:42:01 -04:00
Nikola Trifunovic 768215ad96 boards: m5stack: m5stack_atom_lite file ending typo fixed
Change board.yaml to board.yml in zephyr/boards/m5stack/m5stack_atom_lite.
Fixes: #71240

Signed-off-by: Nikola Trifunovic <nikola@trifunovic.at>
2024-04-10 07:40:50 -04:00
Fin Maaß 1ab6f82c7e lib: smf: check for NULL
don't execute share_paren() if the target is NULL
in smf_execute_ancestor_exit_actions()

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-04-10 07:40:21 -04:00
Jamie McCrae 9c05618c2b tests: Fix missed renames
Fixes some missed renames for overlays with the recent change

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-04-10 11:50:29 +02:00
Björn Stenberg 731f8d4736 modbus: Respect CONFIG_UART_USE_RUNTIME_CONFIGURE
Only perform runtime UART configuration if it is enabled.

Signed-off-by: Björn Stenberg <bjorn@haxx.se>
2024-04-10 10:01:55 +02:00
Dominik Ermel 5a0ecb9641 flash: Move dependency on FLASH_PAGE_LAYOUT where it belongs
The commit adds dependency on Kconfig FLASH_PAGE_LAYOUT to subsystems
that really require it:
 FCB, NVS, LittleFS
and removes direct selection from '*.conf' files where no longer
needed.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-04-10 10:01:40 +02:00