This adds the correct compiler and linker flags to
support software floating point operations. The flags
need to be added to TOOLCHAIN_*_FLAGS for GCC to find
the correct library (when calling GCC with
--print-libgcc-file-name).
Note that software floating point needs to be turned
on for Newlib. This is due to Newlib having floating
point numbers in its various printf() functions which
results in floating point instructions being emitted
from toolchain. These instructions are placed very
early in the functions which results in them being
executed even though the format string contains
no floating point conversions. Without using CONFIG_FPU
to enable hardware floating point support, any calls to
printf() like functions will result in exceptions
complaining FPU is not available. Although forcing
CONFIG_FPU=y with newlib is an option, and because
the OS doesn't know which threads would call these
printf() functions, Zephyr has to assume all threads
are using FPU and thus incurring performance penalty as
every context switching now needs to save FPU registers.
A compromise here is to use soft float instead. Newlib
with soft float enabled does not have floating point
instructions and yet can still support its printf()
like functions.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Provide a demonstration of using the timeutil skew infrastructure to
measure the relative error of the two clock sources on Nordic boards.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Describe the role of these APIs, key concepts that they depend on, and
expose the low-level API.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Provide data structures to capture a timestamp in two different
clocks, monitor the drift between those clocks, and using a base
instant with estimated drift convert between the clocks.
This provides the core technology to convert between system uptime and
an external continuous time scale like TAI (UTC without applying leap
seconds).
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Currently, zefi.py takes host GCC OBJCOPY as
default. Fixing the script to use CMAKE_C_COMPILER
and CMAKE_OBJCOPY.
Fixes: #27047
Signed-off-by: Spoorthy Priya Yerabolu <spoorthy.priya.yerabolu@intel.com>
Add routine to calculate crc of flash region. Read 32 bytes at a time
from flash instead of 4 bytes, for a significant speed up of the flash
image crc calculation.
Signed-off-by: Klaus H. Sorensen <khso@vestas.com>
The callback function canopen_odf_1f56 is called with the can od lock
held. Release the lock while performing time consuming flash reading and
crc calculations, and reacquire the lock before returning from the
function.
Signed-off-by: Klaus H. Sorensen <khso@vestas.com>
The default configuration is made to be "master" at
"standard speed". This makes it possible to use the
driver without having to configure it.
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
Enable slave support for I2C device instances. Slave mode is
interrupt based, wheras master mode is still based on polling.
Remove ENI bit in master configuration since it is not needed for
master mode.
Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
Add the girq and girq-bit fields to the binding. This allows
encoding GIRQ related information inside device tree.
Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
Let's do it upfront only once for each entry point and dispense
with overflow checks later to keep the code simple.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
The Maintairs file will be used to replace the code owners file and will
be used to add reviewers (collaborators + maintainers of affected
areas).
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The changes here are the result of running all open pull-requests
through a script to identify the assignee and findi ng many gaps or old
data. Some of the changes here are coming from pending PRs that were
waiting for some TSC confirm ation, others are done based on pending
maintainer and collaborator changes that were not submitting yet.
Two noteable changes:
- CMake/Build system: This is now limited to just the infrastructure and
not every single Cmake file in the tree. - Documentation: ditto, this
is just for the doc infrastructure and not for every RST file in the
tree.
The reason for the above two changes is the fact that most PRs would
have some cmake or doc changes and assignees in this case should not be
the owners of the build system or the doc infra, instead we should
assign to the subsystem being changed. (Otherwise majority of PRs would
be assigned to the doc and build system maintainers).
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Initial driver and sample application of
TDK Invensense ICM42605 6-axis motion sensor.
This driver provide DTS for nRF52 DK board DTS setting.
Providing features are below.
Sensor data streaming - Accel, gyro
Tap, Double tap triggering.
Set/Get FSR, ODR by set attr API
Support multi instance feature.
Signed-off-by: JuHyun Kim <jkim@invensense.com>
The inline asm code was not conveying in all cases that registers r1-r3
would get clobbered by the SVC handler code. In the cases that we can't
list r1-r3 in the clobber list the registers need to show up as outputs
to know that they values are not preserved by the callee.
Fixes#30393
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Move i2s_cavs_irq_connect_##n up so its available later when used. This
fixes compile issues with the driver.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Fixes: #28650
Linking with newlib now defines the following linker flags as:
```
${CMAKE_C_LINKER_WRAPPER_FLAG}${CMAKE_LINK_LIBRARY_FLAG}c
${CMAKE_C_LINKER_WRAPPER_FLAG}${CMAKE_LINK_LIBRARY_FLAG}gcc
c
```
This is needed because when linking with newlib on aarch64, then libgcc
has a link dependency to libc (strchr), but libc also has dependencies
to libgcc.
CMake is capable of handling circular link dependencies for CMake
defined static libraries, which can be further controlled using
`LINK_INTERFACE_MULTIPLICITY`.
However, libc and libgcc are not regular CMake libraries, and is seen as
linker flags by CMake, and thus symbol de-duplications will be
performed.
CMake link options cannot be used, as that will place those libs first
on the linker invocation. -Wl,--start-group is problematic as the
placement of -lc and -lgcc is not guaranteed in case later libraries are
also using -lc / -libbgcc as interface linker flags.
Thus, we resort to use
`${CMAKE_C_LINKER_WRAPPER_FLAG}${CMAKE_LINK_LIBRARY_FLAG}`
as this ensures the uniqueness and thus avoids symbol de-duplication
which means libc will be followed by libgcc, which is finally followed
by libc again.
It would have been possible to use `-lc` directly, but there is a risk
that an externally library is also adding `-lc` and thus de-duplication
and re-arrangement of this flag happens. This risk is in theory also
existing with this fix, but the long nature of this link flag with using
`${CMAKE_C_LINKER_WRAPPER_FLAG}` would likely indicate a similar fix and
thus those libraries will stay in order.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
The designated initializer used in Z_TIMEOUT_TICKS causes problems for
some C++ parsers (at least in Eclipse).
Let's use standard C++ list initialization (C++11 and up) instead.
Designated initializatin is going to C++20,
so it is not neccessary to apply C++ specific code
for that version and up.
Signed-off-by: Artur Lipowski <Artur.Lipowski@hidglobal.com>
Remove UP Squared support for the gpio sample that was merged after
the sample itself was removed.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Currently configuration for STM32F746G Discovery board on reset-start
event is inherited from included files (OpenOCD stm32f7x.cfg), but
contrary to the inherited adapter speed on reset-init event, the speed
inherited for the reset-start event is only 2000 kHz, which is not
available, so a lower speed is picked up automatically generating the
following message several times when flashing the board:
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
That commit overrides that suboptimal speed for reset-start event and
sets it to the same speed as used by reset-init event, i.e. the maximum
speed (4000 kHz), so the noisy messages like the above one disappear.
The change also improves a bit the throughput when writing to the board.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Add support for testing the NXP Kinetis Pulse Width Timer (PWT) on the
NXP TWR-KE18F development board using PWM loopback.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add Kconfig option for indicating that a given SoC contains the NXP
Kinetis Pulse Width Timer (PWT).
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Fix compilation error if CONFIG_BT_CTLR_DF is not defined.
If DF was not enabled, there was missing CONFIG_BT_CTLR_DF_MAX_-
ANT_SW_PATTERN_LEN and undeclared symbol was found.
Split ll_df.h into two parts:
- ll_df.h that is generally includeable and allows to successfully
compile sources when DF is not enabled.
- ll_df_internal.h to be used in soucres that are compiled when
DF is enabled.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Direction Finding requires initalization of a set of registers
in Radio peripheral. Also it requires information about antenna
matrix unit that are provided by end user in DTS overlay.
Implemented initialization step is responsible for validation of
hardware information delivered by DTS and setting up DF related
registers in Radio.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add support for Direction Finding antenna configuration in
Nordic hal of Bluetooth controller.
Add handling of response for HCI_LE_Read_Antenna_Information
HCI command in controller (upper and lower link layer).
Handling of response to the command requires antenna matrix
configuration.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add radio peripheral to nrf52833 DTS including antenna matrix
congiuration for Direction Finding extennsion.
Add appropriate binding file for nRF radio peripheral.
There is no default antenna matrix configuration. Antennas number
and GPIOS mapping to DFEGPIOS is project specific.
Complete configuration must be provided by end user as overaly.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
The introduction of Zephyr module glue code in the Zephyr repository
introduces a Kconfig variable in the form of:
`config ZEPHYR_<MODULE_NAME>_MODULE`.
All Kconfig variables go into `autoconf.h`, therefore it is necessary
to sanitize the Kconfig variable, so that it does not contain special
characters. To ensure consistent variable name, then the module name
will be sanitized in all variable use in both Kconfig and CMake.
The sanitization is done be replacing all special characters with an
underscore, `_`.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit verifies if the mac configuration is done correctly
during liteeth setup, and prompts a warning when not.
Signed-off-by: Pawel Sagan <psagan@antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
This commit eliminates an inifite waiting for the TX ready flag
in the eth liteeth driver, exiting with error after a defined
number of attempts.
Signed-off-by: Pawel Sagan <psagan@antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
Fixes: #28847
This commit fixes two places that was causing gen_relocate_app to fail
in windows.
gen_relocate_app.py now splits only on first `:` in
`<MEM_REGION>:<file>`.
Windows contains `:` in path, thus only first `:` is valid for splitting
mem region and file path.
Second part of the issue is fixed in CMake where `'` was used for
quoting of command arguments.
This causes a file not found on Windows because the final `'` would be
treated as part of the filename. Similar the first `'` would be treated
as path of the mem region name.
This is fixed by using `"` for quoting, which works correctly on all
platforms.
gen_relocate_app.py:403: UserWarning: File: .../kernel/sem.c' Not found
Note the stray `'` ^^^
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Fixes: #31436
This fix adds ZEPHYR_<MODULE_NAME>_KCONFIG variable to compliance check.
This ensures that Zephyr Kconfig glue code is included in the
compliance check, and thus remove the issue reported in #31436.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Starting brace was missing in the socket_select.h file so adding
it back
#ifdef __cplusplus
extern "C" {
#endif
Fixes#31444
Signed-off-by: Pablo Garrido <pablogs9@gmail.com>
Due to the routing, the ip_k66f board can only use RTT to export
console. With this change the SHELL is enabled to get access
to network commands (like ping).
To use it with RTT from Segger:
-------------------------------
On HOST (terminal 1):
./JLink_V664/JLinkRTTLogger -Device MK66FN2M0XXX18 -RTTChannel 1 \
-if SWD -Speed 4000 ~/rtt.log
On HOST (terminal 2):
nc localhost 19021
(19021 is the port number for the Segger RTT server)
Signed-off-by: Lukasz Majewski <lukma@denx.de>
The 'local-mac-address' nodes are helpful for assessing if the LLDP like
example of DSA switch works correctly.
As those are used only for testing (or when user explicitly needs them),
those are added as DTS overlay to DSA example.
The 'local-mac-address' properties will be visible when one assess the
LLDP response from ip_k66f board (each LAN port has different IP
assigned).
Example output from 'tcpdump -v -i eth0':
-----------------------------------------
Chassis ID TLV (1), length 7
Subtype MAC address (4): 00:00:12:13:00:37 (oui Unknown)
Port ID TLV (2), length 7
Subtype MAC address (3): 00:00:12:13:00:37 (oui Unknown)
Time to Live TLV (3), length 2: TTL 120s
System Name TLV (5), length 13: ip_k66f LAN:3
End TLV (0), length 0
Signed-off-by: Lukasz Majewski <lukma@denx.de>