NXP MR-CANHUBK3 is an evaluation board for mobile robotics applications.
It features an NXP S32K344 MCU based on an Arm Cortex-M7 core
(lock-step).
By default, this board configuration uses Lauterbach TRACE32 West runner
for flashing and debugging applications, but other debuggers can be used
to download the program to flash.
Co-authored-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
Co-authored-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
Introduce minimal power initialization for NXP S32 SoCs and allow to
reset the SoC through the sys_reboot() API.
Presently only S32K3 SoCs is supported but it can be extended later to
other NXP S32 SoCs, hence it's placed in a common directory.
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
The S32K3 MCUs are 32-bit Arm Cortex-M7-based microcontrollers with a
focus on automotive and industrial applications. The S32K344 features
a lock-step core, internal flash, RAM and TCM with ECC.
Co-authored-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
Co-authored-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
The `struct k_spinlock` size is zero bytes under certain
circumstances. This is a bit of a problem, because it breaks a
number of assumptions about things in C.
That should be fixed when #59922 is addressed.
This change is just a hotfix to correct the specific condition
where we will need workarounds in other source files.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
This change is setting up for switching over to proper POSIX
option requirements, feature test macros, and a dependency
structure that is reflective of the standard.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Most of the posix source files can be easily identified by a
short name. I.e. most of the `pthread_` prefixed files do not
need the `pthread_` prefix.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Most Zephyr testsuites do not break tests down to the level of
granularity that `nanosleep()` tests, and this change makes
reports less verbose.
This change makes the `nonosleep()` test cases
significantly less verbose.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
The POSIX testsuite should be run with standard POSIX
header locations.
Additionally, reorder headers to follow the recommendation
in #41543.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
A significant enough portion of these files has been
changed to justify adding Meta copyright as well as
that of the original author.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
There were a number of tests that started with `test_posix_..`.
The `test_` prefix is necessary, but the `posix_` part is self-
evident, so it makes sense to shorten that.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Now all SDL drivers can be used with the embedded libCs.
Let's update the table.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Split the SDL GPIO emulator driver in a top and bottom
to enable using it with embedded libCs.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Split the SDL input driver in a top and bottom
to enable using it with embedded libCs.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Split the SDL display driver in a top and bottom
to enable using it with embedded libCs.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Split the SDL event handling code in a top and bottom
to enable building it with embedded libCs.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Instead of failing badly later, let's give a clear error
message if the user tries to build in an unsupported platform.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
SYS_INIT() requires pointer to function that takes `void` now, instead of
pointer to device structure. Since the commit was developed before that
switch, it still invoked it with NULL. Fix that now.
Fixes:
zephyr/modules/mbedtls/zephyr_init.c: In function 'mbedtls_init':
zephyr/modules/mbedtls/zephyr_init.c:108:16: error: too many arguments \
to function '_mbedtls_init'
108 | return _mbedtls_init(NULL);
| ^~~~~~~~~~~~~
zephyr/modules/mbedtls/zephyr_init.c:86:12: note: declared here
86 | static int _mbedtls_init(void)
|
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Set the flash device node as "okay" so that it can be used with the
flash APIs and samples, also use the DT_SIZE_M macro for the flash node
itself so it's somewhat coherent with the second cell of the flexspi reg
property.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Merges the condition for `UART_INTERRUPT_DRIVEN || UART_ASYNC_API` into
`UART_MCUX_FLEXCOMM_ISR_SUPPORT`.
Signed-off-by: Alp Sayin <alpsayin@gmail.com>
When UART_INTERRUPT_DRIVEN=n, mcux_flexcomm_isr and the data structure
inside is left unused. This patch turns off the build of the entire ISR.
Signed-off-by: Alp Sayin <alpsayin@gmail.com>
without the call of LPUART_ClearStatusFlags(), the interrupt can
immediately trigger again, blocking the application.
CONFIG_ASSERTS=n removes the assert() including the call of
LPUART_ClearStatusFlags().
Also removed LPUART_ClearStatusFlags call for unclearable
kLPUART_TransmissionCompleteFlag.
Signed-off-by: Jan Peters <peters@kt-elektronik.de>
The "virtio_" prefix is used by the open-amp library API.
Rename local functions using "ipc_virtio_" prefix to avoid
function redefinition.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Recently there have been a few name changes in the API that caused
build errors of the tester application when LE Audio overlays applied.
Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
Add a config flag to enable conditional mbebtls
initialization at startup, defaulting to enabled.
Also add a function, mbedtls_init(), that should be
called by platforms that wish to initialise mbedtls
at a time of their choosing.
Signed-off-by: Eugene Cohen <quic_egmc@quicinc.com>
Signed-off-by: Dave Aldridge <quic_daldridg@quicinc.com>
Since clocks aren't declared in the devicetree for the stm32mp1
co-processor. Read the resulting clock divider here instead.
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Since clocks aren't declared in the devicetree for the stm32mp1
co-processor. Read the resulting clock divider here instead.
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Now that the gcc compiler driver uses the -T flag instead of -Wl,-T, we can
remove the hack here that kept the picolibc specs file from inserting the
picolibc linker script.
Signed-off-by: Keith Packard <keithp@keithp.com>
This property specifies the flag used to pass the linker script filename
through the compiler front end tot he linker.
For clang, we use the general purpose linker-pass through -Wl flag with -T:
-Wl,-T as clang doesn't support -T.
For gcc, we use -T directly as this keeps the picolibc specs file from
inserting the picolibc linker script as well.
If the compiler doesn't specify a value, we continue to use -Wl,-T as
before.
Signed-off-by: Keith Packard <keithp@keithp.com>
Sort the list of board architectures alphanumerically except for shields,
which are still listed at the very end.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The `USE_NEGATIVE_ERRNO` rule consistently generates false
positives when working with certain areas of POSIX.
It makes sense to disable this check for the POSIX API
rather than requiring merge superpowers constantly. That
way, we can merge as per usual after sufficient approvals
rather than waiting for someone with merge superpowers to
override / manually merge.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Ensure `POSIX_SPIN_LOCKS` are documented as part of the
mandatory option requirements according to IEEE Std 1003.1-2017.
Additionally, list the functions implemented according to the
standard.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Exercise the following (which rely mainly on existing Zephyr
utilities)
* `pthread_spin_init()`
* `pthread_spin_destroy()`
* `pthread_spin_lock()`
* `pthread_spin_trylock()`
* `pthread_spin_unlock()`
Additionally, ensure that we do not leak spinlock descriptors.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Add a testcase to exercise two cases:
* when `k_spin_trylock()` fails (lock is busy)
* when `k_spin_trylock()` succeeds (lock is acquired)
We use the same machinery for checking for a recursive mutex
as `k_spin_lock()`.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
To satisfy the requirements of POSIX spinlocks, we need a common
way to attempt to lock a spinlock that will return an error if
unsuccessful.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Currently, this section has LOAD flag which means that it's part of
image layout. Attempt to generate binary file with --gap-fill results in
creating a very big file, because LMA of the section is RAM address
(e.g. 0x20000000 for STM32F4) instead of FLASH (e.g. 0x8000000 for
STM32F4).
This problem doesn't appear when linking using GNU LD, because it
removes the section in garbage collect process. However, LLVM LLD
doesn't garbage collect sections that define used symbols, so the
section is present in final ELF image.
There is no need to load this section (it has 0 size), so we can safely
add NOLOAD attribute to the section.
Fixes: #57727
Signed-off-by: Patryk Duda <pdk@semihalf.com>
An advertising report must not be generated unless the AUX_ADV_IND
has been received (for ADV_EXT_IND with an auxptr)
Signed-off-by: Troels Nilsson <trnn@demant.com>
Use CONFIG_BT_CTLR_PHY_CODED to flag out coded phy code
Don't schedule a scan for coded phy when it is not supported
Signed-off-by: Troels Nilsson <trnn@demant.com>