Convert the nxp boards that have general init functions
as SYS_INITs to use board_early_init_hook instead.
Also standardize selection of CONFIG_BOARD_EARLY_INIT_HOOK in the
Kconfig file across NXP boards.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Building with clang warns:
tests/lib/cmsis_dsp/distance/src/u32.c:82:3: error: variable 'val' is
used uninitialized whenever switch default is taken
[-Werror,-Wsometimes-uninitialized]
default:
^~~~~~~
tests/lib/cmsis_dsp/distance/src/u32.c:87:19: note: uninitialized use
occurs here
output[index] = val;
^~~
tests/lib/cmsis_dsp/distance/src/u32.c:47:16: note: initialize the
variable 'val' to silence this warning
float32_t val;
^
= 0.0
Hitting the default switch will assert, so this won't cause any problems
as written, but it doesn't hurt to initialize the variable.
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Instead of re-implementing or assuming that POPCOUNT is available
we now use the generic function from Zephyr.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Adds a generic function that will count the number of bits set in
a value.
It uses POPCOUNT (e.g. __builtin_popcount for GCC) if available,
or else it will use Brian Kernighan’s Algorithm to count bits.
POPCOUNT will likely always support unsigned ints, but the function
was implemented to use it with uint8_t for the sake of simplicity
and compatibility with Brian Kernighan’s Algorithm.
A generic solution was chosen rather than a macro/function per
type (e.g. uint8_t, uint16_t, etc.) as that is easier to maintain
and also supports array types (e.g. counting the number of bits
in 128 or 256 octet arrays).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add ZTEST_NO_YIELD to keep test case output consist.
The log may missing, as the soc goes to low power.
Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
Explicitly set the OpenOCD target-handle so `west debug` will work
as expected on MAX32 targets using a supported OpenOCD version.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
The ADI fork of OpenOCD prints a modified version line; adjusting the
regex to account for that different format when checking the OpenOCD
version.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
We disable power management by removing select HAS_PM. At this time
these new SoC do not have any power management code. With HAS_PM
selected the zephyr test runner will choose PM tests which fail to
build. PM support will be enabled in the future once we decide
which of the many Zephyr PM implementations we will support.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
This commit updates all GitHub Actions workflows to use specific
SHAs for the actions when they're not GitHub owned (`actions/*`)
instead of using tag-based versioning since tags are mutable.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Boards might have local bindings for which generating links using the
dtcompatible role doesn't work -- update the code accordingly so that
we can still provide a description of these custom bindings in the table
of supported features (but with no hyperlink).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME depends on
CONFIG_SYS_CLOCK_EXISTS, so CONFIG_SOC_NEORV32_READ_FREQUENCY_AT_RUNTIME
needs to depend on CONFIG_SYS_CLOCK_EXISTS for selecting it.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
It has been discovered that direct IPI support does not work
correctly when CONFIG_X2APIC is enabled. Until that can be
fixed, restrict this feature on x86 to platforms that do not
enable CONFIG_X2APIC.
Fixes#87046
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Fix connection update microsecond interval variable data
type, to use 32-bit so that a value upto 2000 seconds, i.e.
4 seconds interval and 499 peripheral latency can be stored.
Regression in commit abfe5f17a9 ("Bluetooth: Controller:
1 ms connection").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add printing reset reason at the beginning of the sample. Makes it easier
to determine if sample correctly wakes up from LP mode.
Signed-off-by: Bartlomiej Buczek <bartlomiej.buczek@nordicsemi.no>
Add the following property renaming entries to
the migration:
* dai_id
* afe_name
* agent_disable
* ch_num
* mono_invert
* quad_ch
* int_odd
Signed-off-by: James Roy <rruuaanng@outlook.com>
On Zephyr devices that has an Ethernet switch IC with the Zephyr device
connected to the CPU port, there aren't necessarilly any register to
check the link state on that port. If the check is kept on such devices,
Zephyr will believe the link disappears
CONFIG_ETH_STM32_CARRIER_CHECK_RX_IDLE_TIMEOUT_MS after last message was
received, until a new message is received. If the application tries to
send data while the link is considered gone, sending returns an error,
sometimes indicating that the interface is down.
It also seems conceptually meaningless to try determining link state on
such devices, since as long as both the microcontroller and the switch
IC is powered, the link should always be up.
This commit therefore introduces a new Kconfig to allow disabling the
entire checking of link state, so that on devices where there is no
relevant PHY register to read, the check can be disabled.
Signed-off-by: Ole Morten Haaland <omh@ixys.no>
Add a test case for the alignment support in loadable extensions. This
test case creates a set of constants with specific alignment requirements
and verifies that they are placed in memory as expected.
Fix the detached section test to use a more standard syntax for the
section attribute, avoiding issues with different toolchains.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This patch adds support for alignment requirements for sections in the
loader. The alignment requirements are taken from the ELF file and
checked when the section is mapped to a memory region and when the
region is copied to memory (or directly used from the ELF buffer).
Supporting a larger alignment requirement than the region's current
alignment is done by adjusting the region's start address. This needs
care to avoid detecting false overlaps with other regions and to ensure
that the region address and size reported by the inspection APIs are
correct. The extra offset needed to re-adjust these values is stored in
the 'sh_info' field of the region descriptor.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Since commit 0aa6b1c9de, the 'ldr_parm' pointer is guaranteed to be
valid inside all the functions of the llext_load() call tree.
This commit fixes the only exception of llext_copy_strings(), which was
not passed the 'ldr_parm' pointer, and remove the redundant checks.
No functional change is intended by this commit.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This commit adjusts the logic of the LLEXT memory allocation routine by:
* defining 'align' and 'alloc' variables once and updating them in the
following code;
* swapping the condition, converting it to an 'if(IS_ENABLED(...))' and
using a direct calculation for the size to make the code easier to
read;
* updating and extending a few comments.
No functional change is intended.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Since 3466dab804 the generic llext_symbol_name() function abstracts
the use of llext_string() for (non-section) symbols. Define a similar
llext_section_name() function and replace current occurrences of
llext_string() with the proper abstraction.
By extending llext_symbol_name(), this commit also allows to print the
correct name of sections that are referred to by a symbol.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Rewrite the overlap checks in llext_map_sections() to use a pair of
macros to calculate the top and bottom of a region. This makes the
code more readable and less error-prone.
No functional change is introduced in this commit apart from a log
message format change.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Use the more compact %#x format for printing out hexadecimal values in
the LLEXT subsystem. This also uses a clearer wording for the
llext_link() log message that avoids repeating information.
No functional change is introduced by this commit.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
llext_copy_section() is a misnomer, as it is copying a region of memory,
not a section. Rename it to llext_copy_region() and use 'region' in the
internal variables to better reflect their purpose.
No functional change is introduced in this commit.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Add a 'continue' statement when the first section of a region is
detected, to avoid unnecessary indentation.
No functional change is introduced in this commit.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Fix the following warning
att.c:734:3: warning: label followed by a declaration is a C23 extension
[-Wc23-extensions]
734 | k_tid_t current_thread = k_current_get();
| ^
By wrapping that code as a compound statement
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add information about "struct net_linkaddr" changes to 4.2
migration guide to help the developers to handle issues if
they access the net_linkaddr struct fields directly in their
code.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Previously the net_linkaddr struct had pointers to the link address.
This is error prone and difficult to handle if cloning the packet as
those pointers can point to wrong place. Mitigate this issue by
allocating the space for link address in net_linkaddr struct. This will
increase the size of the net_pkt by 4 octets for IEEE 802.15.4 where the
link address length is 8, but there no increase in size if link address
is 6 bytes like in Ethernet/Wi-Fi.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Make sure that source and destination link addresses are correct
after cloning and pulling net_pkt.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This is to fix the below compiler warning from TF-M builds
that don't use the Ethos-U driver.
```
CMake Warning:
Manually-specified variables were not used by the project:
ETHOS_DRIVER_PATH
```
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
IAR doesn't support the __volatile__ keyword, and since the
toolchain.h isn't included by these arm-specific files and
other arm-specific files already uses volatile, I've made
them all use volatile.
Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
Due to historical reasons, there were two implementations of
R7FA4M1AB3CFM. However, the migration has been completed,
so the old one is now being removed.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Extract common parts from `dts/arm/renesas/ra/ra4/r7fa4m1ab3cfp.dtsi`
to support R7FA4M1AB3CFM.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>