The eponymous function in __aeabi_read_tp.S is declared using:
SECTION_FUNC(TEXT, __aeabi_read_tp)
Note the first argument (section name) is `TEXT` in capital letters which
a define in `include/zephyr/linker/sections.h` should replace with `text`,
such that the function is placed in section `.text.__aeabi_read_tp` which
matches the ".text.*" pattern in linker script. However, this file is not
included by __aeabi_read_tp.S: as such, the substitution never happens and
the function goes in `.TEXT.__aeabi_read_tp` instead! This has not caused
issues thanks to a workaround in the Cortex-M linker script, which also
has ".TEXT.*" as input section name pattern (unlike all other archs!), but
is a bug nonetheless.
Fix this issue by adding the missing include which ensures the function
is placed in a section with the proper name.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
This adds the compiler flag to instruct xt-clang not to generate
FLIX (Flexible Length Instruction Xtensions) instructions, where
multiple instructions can be fused into one instruction. FLIX
can provide performance and code size advantages.
When userspace is enabled, FLIX may reorder memory access
where memory is accessed before code determines whether
we should perform that memory access. For example,
when guarding memory access via k_is_user_context(), and
some kernel variables can only be accessed via kernel mode,
FLIX may reorder memory access such that these variables are
accessed before k_is_user_context(). This results in access
violation. This turns off FLIX generation by default and
lets the application developers to decide whether to enable
FLIX generation.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This adds to compiler flags template on instructing the compiler
on whether to generate VLIW instructions.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
For Windows, if the build dir is under same drive with zephyr base, the
generated link shall be relative url like posix style.
If they are in different drive, url is meaningless. So just use raw link
format so that some editors can directly jump to.
Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
To allow flexibility of ethernet "just working" with various peers,
including Linux peers that may be configured by default as master.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
This platform is failing the
portability.xsi.single_process.newlib test, therefore add it to
the exclusion list
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Fixes the Kconfig name of this so that it matches the value from
soc.yml, and deprecates the old name - this is required to support
future build system features. Additionally, it fixes an issue in
Kconfigs of this SoC of duplicating existing symbols
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
The test case is similar to `voltage_divider_scale_dt()` but works
with microvolts.
Signed-off-by: Stefan Schwendeler <Stefan.Schwendeler@husqvarnagroup.com>
The calculation of the sensor value uses the intermediate value of the
function `adc_raw_to_microvolts_dt`. This results in a sensor value
with a resolution that is not below `voltage-divider-scaling` millivolts
which can be too rough for some applications.
Using `adc_raw_to_microvolts_dt` and 64-bit-based scaling improves
the resulting voltage resolution.
Therefore, the public function `voltage_divider_scale64_dt()` is
introduced, which performs the same as `voltage_divider_scale_dt()`.
This decision does not affect implementations that use the current
32-bit implementation of `voltage_divider_scale_dt()`.
Signed-off-by: Stefan Schwendeler <Stefan.Schwendeler@husqvarnagroup.com>
The -test command line option can be used to filter tests for execution
on native_sim targets, but if ZTEST_SHELL is enabled this filtering can
be done via the shell itself, so the option loses its purpose and can be
disabled.
Signed-off-by: Guilherme Costa <glhrmcosta91@gmail.com>
On POSIX targets, TC_END_POST calls posix_exit(), which terminates the
process after test execution. When tests are run via the ztest shell,
this behavior is undesirable, as the shell session is expected to remain
active for further interaction.
Change TC_END_POST to expand to an empty statement when CONFIG_ZTEST_SHELL
is enabled, preventing premature process termination.
Signed-off-by: Guilherme Costa <glhrmcosta91@gmail.com>
When CONFIG_ZTEST_SHELL=y, the system failed to compile due unsatisfied
references to ztest_set_test_args and ztest_reset_test_args. This commit
fixes the issue by copying these functions from ztest_shell and
modifying libc calls to their nsi_host_* equivalents, fixing
compilation.
Signed-off-by: Guilherme Costa <glhrmcosta91@gmail.com>
Fix offset calibration handling and improve type safety in the
LPADC driver:
- Change offset_a and offset_b from uint32_t to int16_t to match HAL API.
- Add explicit int16_t casts when initializing offset values from DT.
- Add conditional logic to handle platforms with single offset trim.
- Use LPADC_SetOffsetValue() with appropriate parameters based on
FSL_FEATURE_LPADC_OFSTRIM_COUNT when auto-calibration is disabled.
This ensures proper offset calibration on all supported platforms and
prevents potential type mismatch issues.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Fix inconsistent formatting in the LPADC driver by:
- Consolidating multi-line preprocessor conditionals onto single lines
- Aligning macro continuation backslashes consistently
- Fixing indentation in structure initialization and macro definitions
- Removing unnecessary line breaks in function calls
No functional changes, formatting cleanup only.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
PR #100910 assigns SRAM2 memory regions to the MAC node,
which does not exist because SRAM2 was deleted and combined
with SRAM1 to increase the memory needed for the test to run.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Remove the "number-of-mb-fd" property from the NXP FlexCAN FD binding. The
number of Message Buffers (MBs) supported by a given FlexCAN instance is
always specified in 8-byte sized MBs using the "number-of-mb" property
present in the "nxp,flexcan" binding.
The fact that the Zephyr FlexCAN shim driver sets the MB size to 64-byte
when CAN FD is enabled is purely a software construct which should not be
described in devicetree.
Each 512 byte message buffer RAM region can either contain up to 32 x
8-byte MBs or 7 x 64-byte MBs, so just calculate the number of CAN FD MBs
at driver build time.
The FlexCAN IP can either support 16 (CAN classic only), 32, 64, 96, or 128
8-byte MBs, so limit the property to these values.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The whole TCP Kconfig options block is already behind "if NET_TCP",
therefore "depends on NET_TCP" on certain options was redundant.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Zephyr by default closes all TCP contexts associated with a given
network interface when the interface goes down. This leads to
reporting an error on the associated network socket, allowing the
application to reopen sockets (for example in case of a network or
an IP address change).
It's been reported however that in certain cases this behavior is
undesirable. If this option is enabled, the TCP stack won't
close any TCP contexts when the network interface is going down.
Therefore, it is the application's responsibility to monitor the IP
address or network interface state changes, and restart the TCP
sockets when needed. Enable this option only if you can guarantee
that the application handles that properly.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Contexts bound to any address are not associated with any specifc IP
address (sockets not connected yet or listening sockets bound to any),
therefore there's no need to shut down the connection context on the
interface down event. Hence, check the local address binding before
shutting down the context.
Note, that there's some extra logic involved when reading the TCP local
address, implemented in net_tcp_endpoint_copy(), therefore I've simply
reused that function for the purpose.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
A couple paragraphs refer to automatically generated Kconfig symbols,
add references to detailed information.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
add the missing accel0 node alias for steval_stwinbx1.
This will fix the build error encountered when running
sample.sensor.accel_trig.generic-tap sample scenario.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Data that isn't a touch event needs to be discarded, especially after
wakeup when it's possible the read has no touch event.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Fix Devicetree compilation errors caused by incorrect enum macro
names used in DTS overlay files.
Replace LSM6DSV16X_DT_ODR_AT_960Hz with the correct Devicetree enum
LSM6DSVXXX_DT_ODR_AT_960Hz in the stream_drdy sample boards overlay.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Add an explicit inline comment in the OpenOCD board configuration
file explaining why 'gdb_memory_map disable' and
'gdb_breakpoint_override hard' are used and add missing
'gdb_memory_map disable' command to nucleo_u5a5zi_q board file.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
OpenOCD recently renamed stm32wba55 target config file [1] from
stm32wbax.cfg to stm32wba5x.cfg. Use the new file name if found or
alternatively fallback to the old file name to support both older
and recent version of OpenOCD tool.
Link: c36f59d9b4 [1]
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
OpenOCD recently merged stm32wba6x support, providing a dedicated
target config file [1]. Use that file when available. Alternatively
fallback to OpenOCD support of STM32WBA5x, with some limitation
(memory layout and software breakpoints disabled. This change allows
to better support coming change sin OpenOCD tool.
Link: c36f59d9b4 [1]
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add some information about OpenOCD support for WBA5xx and WBA6xx
targets. This better comply with an inline comment of the board
openocd.cfg file. While at it, rephrase that inline comment for
sake of clarity.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Instead of reading calibration data (device-unique, but never changing!)
then multiplying the result with a constant as part of each conversion,
perform the read+multiplication once during init and cache the result.
This notably avoids frequently an ICACHE disable/enable cycle on STM32H5,
which is a somewhat slow operation.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Various fields were stored in the instance data despite being initialized
at compile-time to a constant value.
Move these fields to the instance configuration instead.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Moved forward decision debug messages ahead of interface TX/RX
operations. That's proper to see forward decision debug messages
first, and then interface TX/RX debug messages.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Added FDB (Forward Database) table support for bridge.
Implemented very basic functions for adding/deleting
static <MAC + iface> FDB entry.
The dynamic FDB entry and hardware FDB configuration is
still TODO work.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
In WCH chips entering idle via `wfi` will break ongoing DMA
transactions. This adds PM state to prevent `wfi` idle in specific drivers.
Signed-off-by: James Bennion-Pedley <james@bojit.org>