We shall not enable by default a system timer in ARM
platforms, namely the SysTick, the Nordic, or the SAM0
RTC timer, simply by assessing the hardware capabilities
(e.g. by conditioning on CPU_CORTEX_M_HAS_SYSTICK).
Instead, now, all ARM platforms needs to explicitly set
their system timer module. Note that this has already
been the case for ca 80% of the ARM platforms.
This clean-up allows us to decouple HW capabilities from
system configuration (for example, Nordic platforms may
enable option CPU_CORTEX_M_HAS_SYSTICK, and still use
the platform-specific RTC timer for system timing).
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit renames the symbol CPU_HAS_SYSTICK to
CPU_CORTEX_M_HAS_SYSTICK, to look similar to all
other CPU_CORTEX_M_HAS_ options, and moves the
K-config symbol definition from arm/core/Kconfig to
arm/core/cortex_m/Kconfig.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
ARM SysTick timer is implemented by default in ARMv7-M
and Mainline ARMv8-M processors, so we include the
corresponding Kconfig symbol in arch/arm/core/cortex-M/Kconfig
and remove the selections from the Cortex-M SOCs.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
CPU_CORTEX_M does not need to be selected by Kconfig
symbols that already select a CORTEX_M variant.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Allow for including arbitrary data in net_icmpv6_send_echo_request()
that will be echoed verbatim by the receiver.
This allows to use ICMP echo for diagnostic use cases, e.g. by testing
packet framentation (large payload) or measuring round-trip-time.
Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Allow for including arbitrary data in net_icmpv4_send_echo_request()
that will be echoed verbatim by the receiver.
This allows to use ICMP echo for diagnostic use cases, e.g. by testing
packet framentation (large payload) or measuring round-trip-time.
Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Allow accessing already parsed information from the ICMP header
that callbacks might be interested in.
This makes the callback signature and behaviour match that of
the ICMPv6 implementation.
Signed-off-by: Benjamin Valentin <benpicco@googlemail.com>
For example it should be possible to compile and use the SLIP module
with NET_L2_DUMMY. This required the following changes:
* Fix a typo in the initializer for struct dummy_api
* Only define eth_capabilities if CONFIG_NET_L2_ETHERNET is defined to
silence a -Wunused-function compiler warning
* Unconditionally include net/dummy.h
Signed-off-by: Sören Tempel <soeren+git@soeren-tempel.net>
Without this change compilation of the SLIP module would fail if LLDP
wasn't enabled. There is also no need to include net/lldp.h explicitly
as net/ethernet.h will include it conditionally if CONFIG_NET_LLDP is
defined.
Signed-off-by: Sören Tempel <soeren+git@soeren-tempel.net>
In order to make board listing reusable by external tools, split it out
from the usage helper script into a new boards.cmake that can also be
called directly with cmake -P.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The previous mcuboot reference didn't make sense - it linked to
itself. Linking to the official website should be more useful.
Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
Enabling the RTC event is intended to support peripheral-to-peripheral
interconnects, so introduces a request for HFCLK and PCLK16M when the
event is triggered. This specific event is never used with PPI so
enabling events apparently does nothing but increase power consumption.
Closes#15513
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
main function is not necessary.
And without main here, it is possible to import these
samples zperf files in another project.
Signed-off-by: Bub Wei <bub.wei@unisoc.com>
We have users that have problems in their linker scripts where the
order of input sections matters.
To allow users to use the latest Zephyr while working on a fix to
their linker scripts we add an option to allow leaving the sections
unsorted.
See discussion here for more details
https://github.com/zephyrproject-rtos/zephyr/pull/14183
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Reduced flash size for QEMU x86 so it does not consume a lot of RAM
memory where it is simulated.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Statistic for flash has limitation regards number of pages possible to
be counted. This path introduces check for that in source file as it is
not possible to preserve the limit in Kconfig.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
This commit adds a tests for flash simulator driver implementation
for qemu_x86 boards.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
This commit adds a flash driver implementation that writes to RAM and
exports statistics through stats.h. It can be used to simulate flash
memory for testing purposes.
Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Aligned format specifiers for the Bluetooth Host. Now, the format
specifier matches the variable type.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
This patch adds support for Read Using Characteristic UUID which is one
of the procedure to read the characteristic value especially when the
client only knows the characteristic UUID and does not know the handle
of the characteristic.
Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
By selecting CONFIG_THREAD_NAME. It makes sense to have this enabled
by default for tests, to easy debugging in a case of crash.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
It's relatively hard to figure out what thread a crash happens in
from the crash dump. E.g, it's usually not immediately possible to
find it out from linker map due to the fact that static symbols are
not there (https://sourceware.org/bugzilla/show_bug.cgi?id=16566).
So, try to do it as easy if possible, by just printing thread name
in a dump, if thread names are enabled at all.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
We need to re-initialize the trickle->timer delayed work to use
trickle_timeout() if there are multiple triggerings.
Fixes#15606
Signed-off-by: ling wei <lingwei@cisco.com>
Existing sntp_request() function has a coarse integer seconds
precision, discarding fractional part as returned by SNTP.
Deprecate it, and instead introduce sntp_query() function which
returns both integer and fractional seconds as a newly introduced
structure sntp_tstamp.
Fixes: #15596
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
1. Output what steps the app performs, so it doesn't look to user
that it simply hanged.
2. Don't use infinite timeouts, because that will hang.
3. Clearly note which requests are for IPv4 vs IPv6 server.
4. Define IPv4 gateway. This sample is configured to run against
SNTP on local Linux host, but standard distros (e.g. Ubuntu) don't
run SNTP server by default, so usual outcome for running this sample
will be timeout. A realistic way to get successful output would be
to run it against a server on the Internet, for what a gateway is
required.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Previously, a case when poll() call timed out wasn't handled, and
recv() was called unconditionally. In the case of timeout, recv()
itself would hang indefinitely.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
When there is no need to divide the PWM clock (i.e. the requested
period cycles fit the 15-bit PWM counter), the prescaler value
should be 0, not 1.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
When making a build folder pristine until now we were running the
'pristine' build target. The issue with that is that ninja/make or
whatever build tool is being used might decide to re-run CMake itself if
some of the dependencies have changes. This might trigger an error that
is unfriendly and unnecessary, since the user is explicitly asking for
the build folder to be wiped before starting a fresh build.
To avoid this issue restor to running directly the CMake script that the
'pristine' build target itself uses, so as to make sure that the build
folder is wiped unconditionally regardless of changes made to the tree.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The test is to run for boards that have memory protection
enabled; having MPU capabilities on the SoC level is not
sufficient (the user, or the board itself, might not enable
memory protection support). This commit applies that policy
to the mem_protect/protection test suite.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Added implementation to pause data PDU transmission during
PHY update procedure in order to comply to BT Spec. v5.1
Vol.6, Part B, Section 5.1.10.1 Packet transmit time
restrictions.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Minor refactoring to move PKT_US into ULL internal header,
and rename ull_conn_allowed_check to ull_conn_llcp_req.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Ported implementation of Data Length Update Procedure to
ULL/LLL architecture of the Link Layer.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>