The sample proviades required overlays only for 3 platforms.
Therefore, flash scenarios can only work on those 3 platforms.
To reflect this, platform_allow has to be used instead of
integration_platforms, so boards without overlays are not picked up
into a scope.
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Replace access to dts 'label' property (which we are phasing out)
with simple int as the serve the purpose for error report.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
The I2C & GPIO devices are not represnted in devicetree and thus we
aren't converting this sample over to i2c_dt_spec or gpio_dt_spec.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Replaced hardcoded for intel_adsp_ace15_mtpm board
HP_MEMORY_BANKS value used in SOF code with generic approach -
using PLATFORM_HPSRAM_EBB_COUNT read from Devicetree.
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
These two timers were sharing pretty much the same code. Actually
mtl timer was a "superset" of cavs timer. Just merge them into a
single one called intel audio dsp timer (intel_adsp_timer).
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Board definition for the meteorlake platform.
Enable intel_adsp_ace15_mtpm in the sof sample.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Co-authored-by: Michal Wasko <michal.wasko@intel.com>
Co-authored-by: Konrad Leszczynski <konrad.leszczynski@intel.com>
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
The use of DT_BUS_LABEL in a logging call can easily be replaced
with uart_dev->name. This moves us slowly forward to removing
use of devicetree `label` property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Also, Removed 'lsm6dso' from board & sample yaml's and move to just
filtering based on devicetree compat.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Following zephyr's style guideline, all if statements, including single
line statements shall have braces.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
This sample should be executed only when connecting external
hardware (Led strip). Thus it is necessary to add fixture to avoid
execution when no hardware is connected.
Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
This sample can only be tested if the DUT has external memory
connected. This commit aligns the yaml description, so the test
is not picked up on setups without required fixture.
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
Move to use DEVICE_DT_GET instead of device_get_binding as we
work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
This fix removes the Streaming_Audio_Context LTV from the LC3 Codec
helper macro, and subsequently a faulty exposure of this LTV in the
PAC records used.
Signed-off-by: Fredrik Danebjer <fredrik@danebjer.com>
This commit adds a sample for the maxim ds18b20 1-wire temperatue
sensor in a single-drop bus configuration.
Includes overlay files for nucleo_g0b1re und nrf52840dk_nrf52840 with
the required open drain configuration.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Add integration platforms to mass_flash_fatfs and mass_flash_littlefs
tests as these options are tuned for specific platforms.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Test sections, mass_flash_fatfs and mass_flash_littlefs,
and corresponding Kconfig options are mixed up.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
We don't have anything that build tests the win1500 driver, so
enable reel_board to provide coverage on the driver.
Signed-off-by: Kumar Gala <galak@kernel.org>
Fixed handling of k_sem_take() return codes.
Also some minor cleanup in broadcast_audio samples.
Signed-off-by: Erik Robstad <erik.robstad@nordicsemi.no>
The codec (or rather codec configuration) is now taken from the
previously received BASE. This also means that the BASE (with
the codec configurations) is now also stored statically.
When the application attempts to synk to the broadcaster
the stack will lookup the codec configuration based on the
bis index, as a BASE may have multiple subgroups
with multiple codec configurations.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add support for using PACS and/or capabilities for
the broadcast sink role. PACS and capabilities were
originally only supported for the unicast server
role, so the PACS callbacks were moved their own
struct, as if a device supports both the unicast
server role and the broadcast sink role, it will
only have a single PACS instance.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
As Zephyr currently requires CMake version 3.20.0, update all
occurrences of cmake_minimum_required.
Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as we
work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
The magn_polling sample application now supports the hmc5883l driver, so
we can remove this driver-specific sample.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
The magn_polling sample application now supports the bmm150 driver, so
we can remove this driver-specific sample.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
Extends the magn_polling sample application to support additional
magnetometer drivers. This is a first step towards reducing the number
of driver-specific sensor sample applications.
Integration platforms were selected to exercise different magnetometer
drivers.
Tested on hardware with the following configurations:
- fxos8700 driver with the on-board sensor on the frdm_k64f board
- lis2mdl driver with a x_nucleo_iks01a3 shield attached to a frdm_k64f
board
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
Updates device tree pin states definitions and node
descriptions to group pins sharing common properties.
Accordingly, updates in-tree overlays as well.
Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
Updates device tree pin states definitions and node
descriptions to group pins sharing common properties.
Accordingly, updates in-tree overlays as well.
Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
- update device tree pin states definitions and node
descriptions to group pins sharing common properties.
- update fat_fs sample code overlay.
- remove unused ledc pin states
Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
- update device tree pin states definitions and node
descriptions to group pins sharing common properties.
- update ESP32's in-tree overlays.
Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
Scenarios sample.tfm.psa_test_crypto and
sample.tfm.psa_test_crypto require longer timeout to fully finish.
This commit increase them accordingly.
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
This new application is monitoring the Vbat in Volts
from the internal ADC.
Running on the nucleo_g071rb and nucle_wb55rg boards.
Vref is a property of the ADC.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Replace calls to nrfx_gpiote functions deprecated in nrfx 2.6.0
with recommended equivalents.
On the occasion, switch to using available `nrfx_gppi_*` functions
instead of separate paths for DPPI and PPI channels.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Add overlay for espressif boards that does not have a built-in LED.
Add instructions on README file about the required LED connection.
Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
This commit moves the hardware configuration for ledc
peripheral to the device-tree instead of Kconfig.
Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
This commits prefixes all the definitions
with 'SPI_' to be used by the sample application.
This will avoid compilation conflict especially
on FLASH_SECTOR_SIZE.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
The BT_CODEC_LC3_CONFIG_* macros had a hardcoded location
and context, which makes them a lot less usable.
Updates the macro, and the macros that used them.
This also removes the BT_CODEC_LC3_CONFIG and instead
just uses the BT_CODEC_LC3_CONFIG_N macro, which has
then been renamed to BT_CODEC_LC3_CONFIG.
As an addition, the macros and their input has
also been better documented.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This sample depends on lvgl, so do not try and build it if lvgl is not
part of the workspace and if it was excluded in a local manifest.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Adds a new sample application that demonstrates using the RTIO subsystem
to read periodic sensor data directly into buffers allocated by the
application, asynchronously process batches of data with an algorithm,
and recycle buffers back for reading additional sensor data.
The sensor iodev in this application is an timer-driven device that
executes one read request per timer period. It doesn't actually send any
transactions to a real I2C/SPI bus or read any real data into the
application-provided buffers. This timer-driven behavior mimics how a
real sensor periodically triggers a GPIO interrupt when new data is
ready.
The sensor iodev currently uses an internal message queue to store
pending requests from the time they are submitted until the next timer
expiration. At least one pending request needs to be stored by the iodev
to ensure that it has a buffer available to read data into. However,
any more than that should probably be handled by the application, since
it's the application that determines how often it can submit new
requests and therefore how deep the queue needs to be.
The sensor iodev is implemented to support multiple instances with
devicetree, but additional work remains to enable and use more than one
in the application.
Tested on native_posix and frdm_k64f.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
Replace 'platform_allow' with 'filter' based on ws2812 compatible
being enabled. This will allow, for example, to run the sample on
mimxrt1050_evk and mimxrt1050_evk_qspi boards.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
If we enable DISPLAY=y, ILI9341 will be selected automatically if all of
its dependencies are met as well (SPI), let's add this to the board
defconfig.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
LVGL eats a considerable amount of flash, so tests may fail on platforms
that meet all requirements but that have a low amount of flash, e.g.
nucleo_g071rb. Set min_flash for all cases to 250K (result of some quick
experimentation). Also update minimum ram to exclude platforms that
cannot run Zephyr + LVGL (e.g. those with just 16K).
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
'display' harness doesn't exist, so replace it with 'none' to make
things more clear. It is required so that test is not run e.g. on CI,
test would timeout because the GUI is left ON forever.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Simplify sample.yaml by just adding a single test case. In future
commits, test case will be refined to be based on DT filters so that it
is made more generic.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Some of the Panasonic's evaluation boards have limited amount of pins.
So not all arduino pins can be occupied and not all shields are
compatible.
Signed-off-by: Steffen Jahnke <steffen.jahnke@eu.panasonic.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as we
work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as we
work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Some TFM samples run different test suites/cases based on
which configurations are set.
Enumerate more of these.
For samples/tfm_integration/tfm_psa_test,
add the following new build configurations:
* Add CONFIG_TFM_PSA_TEST_STORAGE
* Add CONFIG_TFM_PSA_TEST_CRYPTO
* Add CONFIG_TMF_PSA_TEST_INITIAL_ATTESTATION
For samples/tfm_integration/tfm_regression_test,
add this to all build configurations:
* Add CONFIG_TFM_PARTITION_PROTECTED_STORAGE
* Add CONFIG_TFM_PARTITION_INTERNAL_TRUSTED_STORAGE
* Add CONFIG_TFM_PARTITION_CRYPTO
* Add CONFIG_TFM_PARTITION_INITIAL_ATTESTATION
* Add CONFIG_TFM_PARTITION_PLATFORM
* Add CONFIG_TFM_PARTITION_AUDIT_LOG
And build the above for CONFIG_TFM_IPC as well.
Signed-off-by: Torstein Grindvik <torstein.grindvik@nordicsemi.no>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as we
work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Extra steps for programming the external memory on nRF5340 DK are
no longer needed. Now west is capable of handling this itself.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Despite the comment it contains, the initialization procedure for
the external memory chip on nRF5340 DK does not enable the High
Performance Mode in the chip, so communication using a frequency
higher than 8 MHz fails and the sample crashes (it works only right
after programming the chip with nrfjprog, which enables the High
Performance Mode, but the chip returns to the Low Power mode after
the board is power-cycled).
This commit fixes the initialization procedure and performs some
additional clean-up.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
In the Zephyr implementation, `sem_timedwait()` uses a
potentially wildly different timebase for comparison via
`k_uptime_get()` (uptime in ms).
The standard specifies `CLOCK_REALTIME`. However, the real-time
clock can be modified to an arbitrary value via clock_settime()
and there is no guarantee that it will always reflect uptime.
This change ensures that `sem_timedwait()` uses a more
consistent timebase for comparison.
Fixes#46807
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Renaming objects which had 2 in the name to indicate that
it is v2 specific. Once logging v1 has been removed such
suffixes are redundant.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This patch modifies the ADXL362 driver to use the new
SENSOR_TRIG_MOTION trigger for activity detection
and SENSOR_TRIG_STATIONARY for inactivity detection.
Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Logging v1 has been removed and log_strdup wrapper function is no
longer needed. Removing the function and its use in the tree.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Cocinelle complains about "shell" being used as a parameter name:
"Violation to rule 5.7 (Tag name should be unique) tag: shell"
Therefore rename the parameter throughout the sample to "sh".
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Rewrite the TCP/UDP download part of the zperf sample to use socket API.
For UDP, performance impact is negligible (< 1 Mbps), for TCP it's
noticable, but still throughputs can be considered satisfactory (up to
~75 Mbps).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Rewrite TCP/UDP upload part of the zperf sample to use socket API
instead of net_context. This has a negligible impact on the upload
throughputs (< 1 Mbps).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Whenever MBEDTLS_BUILTIN is selected then
CONFIG_MBEDTLS_CFG_FILE="config-tls-generic.h" is set as a default value.
Remove explicit configuration from prj_mtls_shim.conf.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Modified the samples such that the client will attempt to
setup 2 sink streams and 1 source stream, basically
representing a headset use case.
This also excercises both setting up a unidirectional
and a bidirectional ISO channel using the 3 audio streams.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The sample used `net_buf_ref` to send the same data multiple
times on multiple streams, but the send procedure, which
ends up calling bt_conn_send_cb, does not work
with multiple refs. We thus replace the refs with net_buf_clones.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This code has gone unmaintained and bugs continue to be reported
against it. We do not have the resources as a project to maintain this
in "odd fixes" mode, and nobody has stepped up to maintain it [1], so
sadly this must be removed for now.
If anyone would like to see civetweb supported in upstream Zephyr
again, they are welcome to add it back, as long as they promise to
maintain it going forward.
Many thanks to everyone who has contributed to civetweb support in
Zephyr while it was here. So long and thanks for all the fish.
Fixes: #45807Fixes: #43910Fixes: #34226Fixes: #46743
[1] https://lists.zephyrproject.org/g/devel/message/8466
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
The value of CONFIG_SYS_CLOCK_TICKS_PER_SEC has side-effects that
are not expected with tickless kernel mode. In bug #46378, application
code is shown to run slower with higher sys clock tick value. In SOF
bug #5921, audio quality issues were root-caused to k_timer inaccuracy
with 50000 sys clock tick.
Set the the value to 15000 for all SOF applications. All existing
test cases pass with this value.
BugLink: https://github.com/zephyrproject-rtos/zephyr/issues/46378
BugLink: https://github.com/thesofproject/sof/issues/5921
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
The timeout was accidentally changed from 60 seconds
to 0.6 seconds.
This commit also fixes the number of prints, since we are now
sending at 10ms intervals.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Samples peripheral_gatt_write and central_gatt_write to
demonstration use of GATT Write Command.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Update the readme for mpu_test sample to contain
correct sample outputs for mpu read, write and run operations.
Signed-off-by: Aastha Grover <aastha.grover@intel.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
The controller does not support connected ISO yet, so it does not make
sense to build it form devices that build both host and controller.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Move to use DEVICE_DT_GET instead of device_get_binding as we work
on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
Remove v1 implementation from log_core and all references in the tree.
Remove modules used by v1: log_list and log_msg.
Remove Kconfig v1 specific options.
Remove Kconfig flags used for distinction between v1 and v2.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Files including <zephyr/kernel.h> do not have to include
<zephyr/zephyr.h>, a shim to <zephyr/kernel.h>.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as we
work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
...v1.1 overlay
Shows the dependencies which makes it easier to enable the content
format when necessary
Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
Enable I2C access to FXOS7000 sensor on the mixrt595_evk board
Tested using samples/sensor/fxos8700 for mimxrt595_evk_cm33.
Signed-off-by: Chay Guo <changyi.guo@nxp.com>
All the gpio drivers are based on devicetree and thus we always set
HAS_DTS_GPIO, thus we don't need this Kconfig option anymore. Remove
uses as its safe to assume DTS is supported for GPIO.
Signed-off-by: Kumar Gala <galak@kernel.org>
This test only runs on one platform, so make sure we do not exclude the
only platform using some other hardware related filters.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The logging subsys has evolved to a point where XCC/GCC cannot
compile anymore as it only supports C++98. So exclude C++
samples from build. And just use XCC/Clang instead for C++.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This sample app uses a stack buffer to hold the interface name which is
generated at runtime using sprintk. The buffer is only sized for the
expected range of values, not the full possible range of the datatype
(int).
To mitigate this, increase the size of the buffer to hold the full range of
an int value.
Signed-off-by: Keith Packard <keithp@keithp.com>
By default, any string or opaque data that LwM2M engine initializes
sets data lenght to same value as given buffer length for that
resource.
However, on run time, engine keeps track how much data is written
to each resource, so when reading from any resource, should only
return data that has been written there. But uninitialized resources
return the content of the whole buffer.
Fixed the problem by introducing macros INIT_OBJ_RES_LEN(),
INIT_OBJ_RES_MULTI_DATA_LEN() and INIT_OBJ_RES_DATA_LEN() that
allows you to give the amount of data existing in buffer when
the resource is initialized. This sets the data_len and max_data_len
variables correctly.
Also introduced new functions lwm2m_engine_get_res_buf() and
lwm2m_engine_set_res_buf() that distinct between data size and
buffer size. Deprecated the previous functions
lwm2m_engine_get_res_data() and lwm2m_engine_set_res_data()
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
XCC does not support _Generic as it is being used by the runtime
tagged argument feature. So exclude them.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Rename the BT_ISO_INTERVAL_MIN/MAX to
BT_ISO_SDU_INTERVAL_MIN/MAX to avoid confusing this
the the ISO interval which is different from the SDU
interval.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add two new parameters to bt_iso_chan_send:
sn: The packet sequence number which shall be incremeted
per SDU interval.
ts: An optional timestamp value used to synchronize SDUs.
The sequence number in the API uses a 32-bit value even though
the sequence number for the HCI command is 16-bit. This is to
properly handle wrapping of sequence numbers, which is much
easier to do with additional bits allocated.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The reserved memory mechanism (sections and regions definition) has been
entirely replaced, greatly extended and made it better by the work done
on the zephyr,memory-region compatible.
Since there is are no actual users, we can remove it.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
- Inform about the requirement to configure ADC channels in Devicetree
- Fix sample output example
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
- Improve include list, so that file is self-contained
- Don't use an array type for the samples buffer, as its length is 1
- Improve some error messages
- Use PRId16/32 for printing fixed-width signed integers
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Simplify sample by relying exclusively on channel data from Devicetree.
This change makes sample simpler and more portable at the same time.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
It is now possible to configure ADC channels in Devicetree. This makes
code more portable, since there is no need to hardcode hardware specific
bits in the C sources.
This patch adds channel/s configuration for all support sample overlays.
Hardcoded values have been used:
- Resolution: 12-bit
- Gain: 1
- Reference: internal
- Acquisition time: default
Some nRF channels have been adjusted to include resolution as well.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This adds to the usual qemu_x86_64 and qemu_cortex_a53 to
the entries for Sys-T catalog message in sample.yaml.
As the Sys-T backend has been updated to support 64-bit
for catalog messages.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The BT tiny configuration has been removed some time ago,
but documentation has been still referencing it.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Recently OpenAMP introduced the possibility to set the sizes for TX and
RX buffers per created instance. Expose this also to Zephyr users by
using a DT property "zephyr,buffer-size".
For the sake of simplicity use the same DT property to set the buffer
size for both TX and RX buffers.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Provided sample support for Telink tlsr9518adk80d board.
Set CONFIG_BT_TINYCRYPT_ECC=n (supported by BLE controller).
Signed-off-by: Yuriy Vynnychek <yura.vynnychek@telink-semi.com>
Set the TF-M profile type to none for TF-M integration samples.
If the default profile has been set to something else these samples may
fail.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Adjusted Bluetooth parameters that have an impact on MTU and DLE
negotiation during a connection.
Enabled the Packet Reassembly feature from mcumgr libraries in the SMP
Server sample with the Bluetooth transport configuration. This change
should increase the overall throughput of the DFU process over
Bluetooth.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
This PR adds a soft off mode to the RT10xx Power Management API.
Additionally, it corrects the PM API function in rt10xx_power.c to
use the correct function prototype to be properly overridden.
Signed-off-by: Nickolas Lapp <nickolaslapp@gmail.com>
The ISO security implementation works by verifying
against the acl (bt_conn) sec_level field. The
bt_conn sec_level field is only available
if CONFIG_BT_SMP is enabled, so this commit
adds guards for all ISO security checks as well.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This is a follow-up to commit f5ffd05e6b.
Since twister removes leading spaces from received lines before
further processing, the regular expression for checking the output
produced by the sample cannot contain such space. Also negative
values read from ADC channels need to be allowed.
For consistency, remove the leading space also in the actual string
printed by the sample.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This dependency it is not required since majoprity of platforms are
working with new pinctrl API. This drops the pinmux dependency.
Fixes#46091
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This commit fixes the stale reference to the devicetree
`clock0@82005000` node, which was changed in the commit
7b601b7f50.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
off_t is often unsigned long, which means printf needs to use %lx. Insert
a cast in case the value is unsigned int.
Signed-off-by: Keith Packard <keithp@keithp.com>
Adds few missing zephyr/ prefixes to leftover #include statements that
either got added recently or were using double quote format.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
As per 'Adding Secure Partition' in the TF-M documentation,
every secure partition must have a unique 32-bit partition ID.
If no value is provided, one will be auto-allocated by the
TF-M build system, but this can lead to unpredictable behaviour
in some cases. One example is key derivation where the partition
ID is used as part of the key derivation inputs. Different builds
can results in different PID values being assigned, resulting
in inconsistent key derivation output.
To avoid these problems, this commit sets a fixed PID as a
best pratice.
A value of 1000 has been set to place it within the
'PSA and user Partitions' range (256 - 2999) described in the
documentation.
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Fix various board fixed-partition definitions where the devicetree cell
has been defined oddly, such as 9 nibbles (which makes no sense since
the cells are 32 bit) or 7 nibbles where all the others are 8.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The sample did not have defined pass condition and was failing
due to a timeout. Add harness: consol and an explicit regex matching
the sample's output so it can pass on a hw. In addition, a requirement
for a gpio_loopback fixture was added to the sample.yaml.
fixes: #45229
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
The check did not properly check the info->flags as a bitfield,
and thus never decoded the data.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Define the configuration through an overlay file
to run the sample on the nucleo_h743zi target board.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
It has been validated that the nucleo_h743zi board works correctly,
with '__nocache' buffers and data caches enabled, so this patch enables
support for the former.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Adds mps3_an547_ns to certain TF-M samples to improve
testing in CI by including the Arm Cortex-M55 platform.
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Removes lpcxpresso55s69_ns from certain sample.yaml files due
to changes required for TF-M 1.6.0 not being added to the
upstream project before the 1.6.0 release.
The NXP SDK available for download from NXP contains the required
updates, but these will need to be committed to TF-M, then made
available in the Zephyr fork, at which point the yaml files here can
have the LPC added back.
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Increases the scan and adv data sizes to better support
the extended advertising data and periodic advertising
data (BASE).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Clean up some of the board specific configuration files.
Removed all CONFIG_BT_CTLR* configs from the nRF5340
appcore conf files as that does not compile the controller.
Ensured that the ISO buffer in the controller for
nRF52840 can contain SDUs from all BAP LC3 minimum
requirements, as the controller does not yet
support segmentation of SDUs.
Also fixed a few bad configurations (broadcast sink not
enabling the sync support etc.).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add specific configuration and DTS overlay files for NUCLEO-H7A3ZI-Q
board to the littlefs example project. The second half of the SOC flash
is used as flash partition for littlefs.
Signed-off-by: Christoph Heller <chris@metanetics.de>
This commit changes the pointer type used in the philosophers demo to
`stack_data_t *` when stacks are used for synchronization purposes.
The previously used `void *` was causing AMO address-misaligned
exception on the HiFive Unleashed platform.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
On the stm32l073rz nucleo and stm32f091rc nucleo
boards, the DTS pwm-leds node is disabled, because
the output pin might conflict with SPI1.
It is necessary to enable the node in the overlay
to compile and run the sample.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Remove the explicit enable of Extended and Periodic
Advertising support in Controller, the feature is no
longer experimental in the Controller and is now enabled
by default when application uses them by enabling as
Host feature.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add a call to bt_iso_chan_get_info for each CIS in the sample
to ensure that we don't attempt to send any data on a CIS
that is RX only.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
integration platforms can't be filtered out, adapt tests so that those
platforms are always available for testing.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
integration platforms should not be in common section if we have
scenarios with different set of integration platforms.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The lmp90100_evb sample included an implementation of double sqrt, and the
on_off_level_lighting_vnd_app sample included an implementation of float
sqrtf. Move that code into minimal libc instead of requiring applications
to hand-roll their own version.
Signed-off-by: Keith Packard <keithp@keithp.com>
The overlay for the nRF52840 DK board uses ADC controller child nodes
for specifying channel configurations and it shows how to configure
a channel in differential input mode, so it can serve as an example
of how to use these new possibilities. The overlay for the nRF51 DK
board shows how to use a specific ADC resolution (the default 12 bit
setting is not supported by nRF51 SoCs).
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Allow specifying configuration of channels through child nodes of ADC
controllers. This way analog inputs can be specified for channels in
SoCs that require this and it is also possible, for example, to use
different gain or reference selections for particular channels.
This commit also removes a few former limitations of the sample: now
it is possible to use more than 2 channels and each channel can use
a different ADC controller. Also the ADC resolution to be used can be
specified through devicetree.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Add two new Kconfigs: BT_ISO_CENTRAL and BT_ISO_PERIPHERAL
that is used to do central or peripheral only builds,
similar to the BT_CENTRAL or BT_PERIPHERAL Kconfigs.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This add a new sample application to test and validate
the stm32 octospi driver on the NOR octo-flash present on
stm32 disco kits
There should be a special case to erase the complete flash.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Increase the heap size for RT1170 EVK to allocate the
display buffers for a 720x1280 display
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
mps2_an521 and mps3_an547 need yet more time with TFM 1.6 to pass their
tests. This change was recomended by RajKumar Kanagaraj. Thanks!
Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
Since the recent OpenThread update, OT needs more stack to initialize,
therefore bump the stack size in samples using OpenThread.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The overlay was accidentally pushed as part of another commit while
doing some pinctrl/pwm tests.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This is the same fix as the one introduced in 49520eea57 ("samples: nrf:
system_off: Fix force state usage") for nRF boards. Quoting original
commit:
The sample cannot spin in an infinity loop because the idle thread
will not run and consequently the forced state will not be used.
Without this fix, the system doesn't enter SOFT_OFF state:
*** Booting Zephyr OS build zephyr-v3.0.0-3495-ga456c5274614 ***
cc1352r1_launchxl system off demo
Busy-wait 5 s
Sleep 2000 us (IDLE)
Sleep 3 s (STANDBY)
Entering system off (SHUTDOWN); press BUTTON1 to restart
ERROR: System off failed
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Convert the can_mode enum to a bit field to prepare for future extensions
(CAN-FD mode, transmitter delay compensation, one-shot mode, 3-samples
mode, ...).
Rename the existing modes:
- CAN_NORMAL_MODE -> CAN_MODE_NORMAL
- CAN_SILENT_MODE -> CAN_MODE_LISTENONLY
- CAN_LOOPBACK_MODE -> CAN_MODE_LOOPBACK
These mode names align with the Linux naming for CAN control modes.
The old CAN_SILENT_LOOPBACK_MODE can be set with the bitmask
(CAN_MODE_LISTENONLY | CAN_MODE_LOOPBACK).
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Remove ESP32 and ESP32S2 from not working samples
and tests. Reason for not working is not enough memory
space in RAM to execute it. This can be worked out as next steps.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
LCD display is connected to the I2C bus SoC bus in the development kit,
this sample guides the user on how to use the LCD display with I2C commands
Signed-off-by: Esteban Valverde <esteban.valverde.vega@intel.com>
The audio stream receive callback now contains a
recv_info struct, which contain crucial information
such as timestamps and packet validity.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The values represent an enum, and it makes sense for the
enum values to follow the enum type name, so an
_DIR_ infix was added to the values.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Many functions and struct fields had the directory/type
value, but named in different ways and stored in different ways.
This change updates all uses of it to use the same name
and type.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The enum bt_audio_pac_type does not fully
represent the what the value is used for.
The typical use of it is not for just published
audio capabilities (PAC), but rather describes the
type, or direction, of audio endpoints.
For the unicast client, the type/direction is
relative to the unicast server.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The goal of this commit is to update existing STM32 boards descriptions
to use these size "DT_SIZE" macros to enhance readability. To realize this
i used a python script, which will detect the STM32 Boards
/zephyr/board/arm, and then will update in the dts files the partition
description using "DT_SIZE_K" and "DT_SIZE_M" macros.
Check manually and modify in .overlay files in samples and tests.
Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
Linker files were not migrated with the new <zephyr/...> prefix. Note
that the conversion has been scripted, refer to #45388 for more details.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add pinmux settings for lpadc to LPCXpresso55s69 and LPCXpresso55s28
boards. Enable ADC driver sample for LPCXpresso55s69, to aid in testing
pinmux settings.
Fixes#45401
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
In bt_audio_unicast_group_create, bt_audio_unicast_group_add_streams
and bt_audio_unicast_group_remove_streams to use an array
of pointers, instead of an array of streams.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Added chosen syntax in Device Tree to abstract the IPC device that is
used with the IPC service module in the Bluetooth HCI RPMsg driver.
Ported affected boards to declare this alias.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Cleaned up the IPC configuration for nRF5340 SoC in Device Tree. This
change fixes the (simple_bus_reg) warning about the missing or empty
reg/ranges property.
This is a follow-up to commit cf6a58d.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Update the sample to print the ISO information like flags,
sequence number and timestamp received in the ISO receive
callback.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
In order to bring consistency in-tree, migrate all samples to the use
the new prefix <zephyr/...>. Note that the conversion has been scripted:
```python
from pathlib import Path
import re
EXTENSIONS = ("c", "h", "cpp", "rst")
for p in Path(".").glob("samples/**/*"):
if not p.is_file() or p.suffix and p.suffix[1:] not in EXTENSIONS:
continue
content = ""
with open(p) as f:
for line in f:
m = re.match(r"^(.*)#include <(.*)>(.*)$", line)
if (m and
not m.group(2).startswith("zephyr/") and
(Path(".") / "include" / "zephyr" / m.group(2)).exists()):
content += (
m.group(1) +
"#include <zephyr/" + m.group(2) +">" +
m.group(3) + "\n"
)
else:
content += line
with open(p, "w") as f:
f.write(content)
```
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add sample code that demonstrate the usage for Nuvoton ADC Comparator
driver, this driver is available for NPCX microcontroller family,
this sample is supported on npcx9m6f_evb board.
Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
With LwM2M v1.1 SenML CBOR is preferred over SenML JSON.
TLV is on by default only with v1.0.
Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
Extend sample to show how to use alternative approach of adding
subcommands using new APIs: SHELL_SUBCMD_SET_CREATE, SHELL_SUBCMD_ADD
and SHELL_SUBCMD_COND_ADD.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Fix Broadcast ISO and Synchronized Receiver project
configurations related to IPC use.
Relates to commit cf6a58d3f6 ("bluetooth: hci: rpmsg:
use ipc service library").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
- Previously non-secure request at the 6th run expected to return status
"-135 (PSA_ERROR_INVALID_ARGUMENT)" which is the expected status so
updating "if" condition on the non-secure side handles this expected
type error status from the secure side.
- update sample YAML harness config regex of Digest message as this gets
compared at the run of twister.
- Update the readme console logs.
Signed-off-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@linaro.org>
In order to be consistent with what is possible in Devicetree, always
take a period in nanoseconds. Other scales or units may be specified by
using, e.g., the PWM_MSEC() macros (all of them converting down to
nanoseconds). This change then deletes the "_nsec" and "_usec" versions
of the pwm_set call.
Note that this change limits the period to UINT32_MAX nanoseconds,
~4.3s. PWM is, in generali, used with periods below the second so it
should not be a problem.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The sample did not use PWM in a proper way: it relied on a PWM device
handle, but channel or flags were hardcoded in the code. This patch
changes the sample to use a local binding ("pwm-servo") where the `pwms`
property is defined. This allows to make use of pwm_dt_spec facilities,
reducing the overall sample complexity and making it more portable
without editing the source code. The custom binding also requires to
provide the minimum/maximum pulse width so that different servos can be
easily plugged in without the need to edit sources.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
When a memory domain is initialized, the z_libc_partition must be
included so that critical libc-related data can be accessed.
On ARM processors without TPIDRURO when THREAD_LOCAL_STORAGE is enabled,
this includes the TLS base pointer, which is used for several
thread-local variables in the kernel.
Signed-off-by: Keith Packard <keithp@keithp.com>
When active, z_libc_partition consumes an MPU region which leaves too
few for some MPU tests. Free up one by disabling HW stack protection.
Signed-off-by: Keith Packard <keithp@keithp.com>
Function uart_fifo_read() returns 'int' (it may return negative values
in error cases). Its return value is stored in the variable 'read' that
is, however, of type 'size_t'.
Change the type of the variable 'read' from 'size_t' to 'int' to
accomodate proper handling of uart_fifo_read() invocation.
Coverity-CID: 248408
Signed-off-by: Aleksandar Markovic <aleksandar.markovic.sa@gmail.com>
Makes possible to enable LwM2M protocol v1.1 features. Uses SenML JSON
as default content format.
Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
- add an overlay file for the bbc_microbit board with specification
of GPIO that should be used as the PWM output to buzzer
- update a PWM related macro in the microbit specific code to refer
to PWM channel instead of pin
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
- add `channel-gpios` property with GPIO assignment for the used PWM
channel to the `sw_pwm` node
- replace ambiguous "pin 21" in the sample's README with "pin P19"
that uses notation from the official micro:bit documentation and
is consistent with this pin number within the edge_connector node
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
- add `channel-gpios` property with GPIO assignments for PWM channels
to `sw_pwm` nodes
- update PWM related macros to refer to channels instead of pins
- remove no longer needed inclusion of boards/arm/bbc_microbit/board.h
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
At some recent point, directory <zephyr-root>/include was moved to
<zephyr-root>/include/zephyr. However, links from documentation to
Zephyr source on Github were not updated. Update them now.
Signed-off-by: Aleksandar Markovic <aleksandar.markovic.sa@gmail.com>
This extends the samples to build for C++ using the same code.
This shows MIPI Sys-T can work C++ too.
The change to main.c regarding to the struct log_msg_ids is
simply that the compiler errored out complaining the members
must be initialized the same order as the declaration.
Also C++ dislikes a string literal being assigned to char*,
so assign them to const char* instead.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Updates the sample.yaml file to exclude problem architectures
from this sample project. SYS-T does not support 64-bit or
big endian architectures. The posix arch is excluded as it
is generating numerous anomolous runtime messages because it
does have the means to determine when data resides in the
rodata section.
It also converts the list of allowed platforms to lists of
platforms to use for integration testing. This helps to increase
general testing coverage.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Adding configurations for enabling this sample project on cavs
platforms. This patch also contains a fix to mipi_syst library
which resolves the memory alignment issue across different
architectures.
Fixes#43344
Signed-off-by: Aastha Grover <aastha.grover@intel.com>
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Fix spelling errors in assorted .rst files. The errors were found
using a tool called 'codespell'.
Signed-off-by: Aleksandar Markovic <aleksandar.markovic.sa@gmail.com>
Route printk()'s through logging subsystem. This is required
to get clean OS panics in log output. If this is not defined, e.g.
the stack backtrace is mixed with the Zephyr OS panic information.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Add initial build rules for CHRE. This change includes a Kconfig and
CMakeLists.txt to begin compiling code from the CHRE module.
Additional files are included to bridge the APIs from CHRE's to
Zephyr's. These can be found in modules/chre/include and
modules/chre/src.
Additionally, add a sample to make sure that the module builds. It can
be built via:
```
$ west build -b native_posix -p=always samples/application_development/chre
```
Signed-off-by: Yuval Peress <peress@google.com>
Documentation build for 2.7 was failing due to using only a single
character instead of double for showing a module name.
Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
Print whether or not the code is actually in usermode.
Fail the execution with an assertion if not the case.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Changes console blocks in hello_world and magic_wand tflite-micro
samples to Kconfig blocks to match content. Fixes typos in
some networking samples so that code blocks display instead
of being hidden. Fixes path to litex-vexriscv-tflite.resc.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
Prior instructions were incomplete, included extra, unneeded ways to
build the app.
This should simplify the instructions.
Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
Previously, you were required to set the image versions through the
CMake variables TFM_IMAGE_VERSION_{S,NS}. For better integration with
the rest of the zephyr build system, these are now KConfig variables
with the same name.
Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
This displays the secure firmware version before the nonsecure firmware
version at the beginning of boot.
Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
Previously, the example was a scheleton. This patch
pushes firmware images with psa_fwu_write, and completes
the firmware update example.
Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
This commit adds a sample application demonstrating how to use
the PSA Firmware Update API from TF-M. It also enables the
`FIRMWARE_UPDATE` partition to be included at build time.
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
Move include paths and add new target_include_directories to support
backwards compatibility:
* /include -> /include/zephyr
example: <irq.h> -> <zephyr/irq.h>
Issue #41543
Signed-off-by: Yuval Peress <peress@google.com>
Add loopback mode config to the sample so that the code
can be tested without an actual CAN network, but wit a
single board.
Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
This change augments the application object name change notification to
occur prior to the actual name change done by the OTS layer.
Notifying prior to the actual name change makes it possible to inform the
application of the current name of the object as well as the new name.
Signed-off-by: Abe Kohandel <abe.kohandel@gmail.com>
Fix usage of integration_platforms. Do not set it when the board is
excluded using some other filters.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Samples should run on a board if they have the peripheral connected, in
this case, if any LED on the board is connected to a PWM output. A
shield could be used to demonstrate a sample on a board that doesn't
have the required peripheral. In this case, it was also unclear where
that "external LED" had to be connected, unless one checks where channel
1 for PWM1 is routed to. All board LEDs are connected to pins that
cannot be driven by PWM.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The board had PWM LEDs defined in the blinky_pwm sample, mainly because
it conflicts with SPI1 pinmux. A better approach is to still define the
PWM LEDs in the board but keep the PWM controller disabled by default.
Then, samples just need to enable the PWM controller (and disable SPI if
used simultaneously).
Also updated period to 20ms (reasonable value for a PWM-driven LED).
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The board had PWM LEDs defined in the blinky_pwm sample, mainly because
it conflicts with SPI1 pinmux. A better approach is to still define the
PWM LEDs in the board but keep the PWM controller disabled by default.
Then, samples just need to enable the PWM controller (and disable SPI if
used simultaneously).
Also updated period to 20ms (reasonable value for a PWM-driven LED).
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The board had PWM LEDs defined in the blinky_pwm sample, mainly because
it conflicts with SPI1 pinmux. A better approach is to still define the
PWM LEDs in the board but keep the PWM controller disabled by default.
Then, samples just need to enable the PWM controller (and disable SPI if
used simultaneously).
Also updated period to 20ms (reasonable value for a PWM-driven LED).
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
While the pwm-led0 alias may exist, it could happen that the node with
pwm-leds compatible is disabled, making the sample fail compilation.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Replace hardcoded LC3 codec config with the selected configuration
used in the GATT profiles.
The selected codec configuration on the client will be used on both
sides for LC3 encode/decode.
This required completing the LC3 macroes for building codec
cababilities and codec configuration as they were not setting the
max_frames_per_sdu and frames_per_sdu values.
So as a side effect this change adds the capability to pack multiple
audio frames into a single SDU - tested with 2 frames every 20ms.
Signed-off-by: Casper Bonde <casper_bonde@bose.com>
Change the receive flags in the struct bt_iso_recv_info
to a bitfield instead of a single value. This will allow
us to extend the flags with more options.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Fix err and sys_token_sz not initialized when used.
Fix logging of uint32_t variables as signed.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Fix argument to psa_sign_hash call. Sending in the size of the hash
buffer instead of the size of the hash.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
The autoconf.h header is not required because the definitions present in
the file are exposed using the compiler `-imacros` flag.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Virtual MSD J-Link support on some development boards has caused an
issue with SMP due to limiting the maximum size of UART data via the CDC
endpoint, add a link to the SMP documentation and smp_svr sample
application on how to disable MSD functionality and resolve the issue.
Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
Increase to 250 simultaneous connections in the BabbleSim
test. Update connection interval to accommodate 250
non-overlapping connections and a scan window. And make the
use of is_disconnecting flag consistent between central and
peripheral sample.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add sample for the Basic Audio Profile (BAP) broadcast
audio sink role, that can scan for a receive audio
data over ISO from BAP broadcast sources.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a sample using the Basic Audio Profile (BAP)
broadcast source role, that advertises mock audio
data over ISO.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
For consistency with the scheme used for other nRF peripherals,
use the peripheral name that nRF Product Specifications use.
In this case, it is WDT, not WATCHDOG.
Also remove the requirement for the label property in the binding.
It is no longer needed.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This is a follow-up to commit cf6a58d3f6.
Restore the "nordic,nrf-ipc" compatible property in mbox nodes for both
nRF5340 cores and use it together with the new "nordic,mbox-nrf-ipc"
one. This way either the MBOX or the IPM driver can be used for these
nodes without further modifications. This eliminates the need to use
overlays in quite a few cases, so remove all those no longer needed
ones (which are also a bit confusing now as they refer to no longer
existing ipc@2a000 and ipc@41012000 nodes).
Restore also the ipc node label removed in the commit mentioned above,
as the label is used in validation of base addresses of nRF DT nodes.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This adds to sample.yaml to build for MIPI Sys-T catalog message
support.
Note that the current implementation of emitting Sys-T
catalog messages does not support 64-bit and architectures
having additional alignment requirements. So only allow qemu_x86
and mps2_an385 at the moment.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This adds qemu_x86_64 and qemu_cortex_a53 to make sure 64-bit
support for Sys-T is not broken in the future.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Compilers often combine strings to conserve space, if one string is
a perfect substring of another one towards the end. So add another
string in the test to make sure sys-t with catalog messages is still
working correctly under this scenario.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Compilers often combine strings to conserve space, if one string is
a perfect substring of another one towards the end. So add another
string in the test to make sure dictionary logging is still working
correctly under this scenario.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Until now the whole USB device stack code is located
in the top subsys/usb directory. Move it to own directory
in preparation for upcoming extension and rework of USB support.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Some information in the USB DFU sample was out of date.
Also added some example lines for the Permanent download and automatic
reboot features.
Signed-off-by: Martijn Stommels <martijn@martijnpc.nl>
This commit adds the USB_DFU_PERMANENT_DOWNLOAD and USB_DFU_REBOOT and
symbols.When the permanent download symbol is enabled, slot 1 will be
marked as confirmed. With the reboot symbol enabled, the devices
automatically reboots after the download is completed.
The functionality is split into two symbols to allow the automatic
reboot without confirming the image. This enables image confirmation via
another channel. For example via the shell’s Mcuboot commands.
This functionality allows downloading an image to the device without the
user having to interact with the device. It is useful in cases where
ease of use is more important then safety. For example when using USB
download for daily development. This is especially applicable for
devices with a closed case.
The changes were tested on an nrf52840dk. The following line can be used
to build the USB DFU example with the symbols enabled.
west build -b nrf52840dk_nrf52840 zephyr/samples/subsys/usb/dfu \
-d build-dfu -- -DCONFIG_BOOTLOADER_MCUBOOT=y \
-DOVERLAY_CONFIG=overlay-reboot-permanent.conf \
-DCONFIG_MCUBOOT_SIGNATURE_KEY_FILE\
=\"bootloader/mcuboot/root-rsa-2048.pem\"
Fixes#41921
Signed-off-by: Martijn Stommels <martijn@martijnpc.nl>
The optional flash device can be obtained at compile time using
DEVICE_DT_GET_OR_NULL. Init code has been adjusted so that flash_dev is
forced to NULL when device is not ready (user can later specify the
device manually).
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Use DEVICE_DT_GET to obtain the flash device at compile time. Add
readiness check at main.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Adding an overlay to configure the nucleo_l4r5zi for testing the pwm
blinky application on red led (PB14 on nucleo board)
Each has a specific pwm output from different timers/channels
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Some names of the test cases are duplicated within the project.
This commit contains the proposed names of the test scenarios.
Signed-off-by: Katarzyna Giadla <katarzyna.giadla@nordicsemi.no>
LC3 codec integration into BAP Unicast client and server
sample applications.
Will be enabled by default for a native_posix and nrf5430
cpuapp builds.
The client will continuously transmit a LC3 encoded 400Hz
sine wave and the client will receive and decode the data.
Implementation verified using UART based HCI controller
with ISO interface (userchan.c modified to open the UART
directly as bluez do not have support for ISO data) as well
as on-target execution on the nrf5340.
Signed-off-by: Casper Bonde <casper_bonde@bose.com>
Co-authored-by: Emil Gydesen <Thalley@users.noreply.github.com>
Add configuration for stm32h7b3i_dk board which enables
integration of touch controller (KSCAN) present on the board
into LVGL
Signed-off-by: Tomislav Milkovic <tomislav.milkovic95@gmail.com>
Instead of having one single WQ per backend, move to one WQ per
instance instead and add a new "zephyr,priority" property in the DT to
set the WQ priority of the instance. Fix the sample as well.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
The CANopenNode stack does not support CAN-FD. Depend on it being
disabled and explicitly disable it in the CANopenNode sample.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add a new callback structure for Bluetooth authentication
This struct is meant to replace the information-only
callbacks in bt_conn_auth_cb. The reason for this is that
due to the nature of bt_conn_auth_cb, it can only be registered
once. To allow mulitple users gain information about pairing
and bond deletions, this new struct is needed.
Samples, tests, etc. are updated to use the new struct.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This enables automatic MTU exchange for services that require MTU size
bigger than default ATT MTU to operate.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This update Atmel sam0 serial drivers to use pinctrl driver and API. It
updates all boards with new pinctrl groups format.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This update Atmel sam qdec sensor driver to use pinctrl driver and API.
It update board and sample with new pinctrl groups format.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This update Atmel sam afec driver to use pinctrl driver and API. It
updates all boards with new pinctrl groups format. In addition, it
add overlay files to allow run samples/drivers/adc example.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Added the stop_bits_client parameter to the modbus_serial_param struct.
Being able to configure the number of stop bits for the client
independently from the parity setting, allows to support connecting to
modbus server that do not follow the MODBUS over Serial Line Specification
and Implementation Guide.
Signed-off-by: Constantin Krischke <constantin.krischke@lemonbeat.com>
Signed-off-by: Jan Geldmacher <jan.geldmacher@lemonbeat.com>
This fixes an issue with the filesystem mcumgr being registered twice
in the sample application which resolves an issue with an endless loop
if a mcumgr handler is used which is not registered.
Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
- strtoll() and strtoull() are copies of strtol() and strtoul() with
types changed to long long instead of long.
- added tests
- added documentation
- removed stubs from civetweb sample
Signed-off-by: Gerhard Jörges <joerges@metratec.com>
This is a device-specific option and should therefore not be activated in
a generic project. Since the only boards that use this Kconfig symbol
(lpcxpresso54xx, lpcxpresso55sxx) don't build anyway, this option could
be removed. The device/board specific configuration should be placed in
the boards folder along with an appropriate device tree describing the
IPC nodes.
Signed-off-by: Matthias Fend <matthias.fend@emfend.at>
Corrects number of loops mentioned in README of sample
to match NUM_LOOPS in main.c. NUM_LOOPS was lowered in
PR #41123 to reduce the noise the sample produced in CI,
but the PR missed changing the README.
Cleans up one line.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
This fixes an issue where we dropped the send buffer when
ipc_service_send() timed out waiting for a shared memory buffer.
We now wait in the IPC RX endpoint, but this shouldn't be a problem for
other IPC users, as PR #43806 introduces separate workqueues
per instance, with configurable priorities.
This also includes small changes regarding the IPC service return value.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Remove pinmux usage for acmp peripheral on kinetis boards, as mcux_acmp
driver supports pinctrl
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit adds support for the Arduino Nicla Sense ME board.
The board functionality has been tested using the samples:
- hello_world
- philosophers
- peripheral_dis
- spi_flash
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
The nrf52840dk_nrf52840 board has been ported to pinctrl, so there's no
need to keep duplicated definitions in the sample anymore.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Include a pointer to the CAN controller device for the CAN
transmit, receive, and state change callback functions.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Extend the macro with checks for DT properties related to pin
assignments that are defined but would be ignored, depending on
whether PINCTRL is enabled or not, what presumably indicates
a resulting configuration different from what the user expects.
Add also a possibility to indicate that the pinctrl-1 property
should not be checked because the caller does not support the
sleep state.
Rename the macro so that its name better reflects its function.
Update accordingly all drivers that use it.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Adds antenna description for the nrf5340dk_nrf5340_cpunet
target. It allows to performthe Direct Test Mode with the
CTE feature on this target.
Signed-off-by: Kamil Gawor <Kamil.Gawor@nordicsemi.no>
Adds support for the nrf52833dk_nrf52833 which supports
the Direction Finding feature. It allows also to perform
the Direct Test Mode with the CTE feature.
Signed-off-by: Kamil Gawor <Kamil.Gawor@nordicsemi.no>
There were wrong GPIOs assigned for antenna switches.
Used pins were assigned to other peripehrals so that
there were no outpus printed.
The samples should use GPIOs that are not assigned to any
peripheral.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
<zephyr.h> ends up pulling <sys/printk.h> via <kernel_includes.h>, so
simplify the sample.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The SOF System Agent is redundant under Zephyr, we're using different
performance monitors there.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The pm_constraint_* APIs were effectively used by the policy manager
only. This patch renames the API to the policy namespace and makes its
naming more explicit:
- pm_constraint_set -> pm_policy_state_lock_get()
- pm_constraint_release -> pm_policy_state_lock_put()
- pm_constraint_get -> pm_policy_state_lock_is_active()
The reason for these changes is that constraints can be of many types:
allow/disallow states, impose latency requirements, etc. The new naming
also makes explicit that the API calls will influence the PM policy
behavior.
All drivers and documentation have been updated accordingly.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
There are no more context defines specific to metadata, the ones
coming from Assigned Numbers shall be used.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
Some build configurations in direction finding samples
sample.yaml didn't have harness=bluetooth. That enables
these configurationsto be be executed on hardware by
CI. Those runs end causing CI failures.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
The littlefs_mount() function sets the mount point for block devices,
so fname[12] shall be generated after calling it.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Up till now, the littlefs sample program was only supporting the flash
medium. However, it would be also welcome to be able to test reading and
writing data from littlefs stored on block devices - like SD card.
In this case we do use the block API, to read and write data to it.
To achieve this goal - the CONFIG_APP_LITTLEFS_STORAGE_BLK_SDMMC define
has been introduced.
One can change the disk mount point by defining board specific
CONFIG_SDMMC_VOLUME_NAME.
The test for nucleo board equipped with SD card shall be built with:
west build -p always -b nucleo_h743zi ./zephyr/samples/subsys/fs/littlefs \
-DCONF_FILE=prj_blk.conf
Moreover, the README.rst has been extended to describe running this
test on block devices.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
The littlefs_flash_erase() function shall be called from flash specific
littlefs_mount function. This allows removal of the stub function
when block device support is added.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
This KConfig define (by default defined) is necessary to extend the
littlefs test functionality to support other test scenarios - for
example running it on device with block device (i.e. SD card) backend.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
This commit extends the littlefs test to use binary pattern file.
This file has the 0x55 and 0xAA patterns (to avoid fast wear leveling)
written alternately with special "marks" bytes on each eight position.
Those values are incremented each time the board boots. One can adjust
the size of this file with the TEST_FILE_SIZE define.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
The code responsible for incrementing the in-file value has been moved
to the separate function for better readability and reusage.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
The code for presenting content of the directory, has been moved to the
separate function to be easily reusable.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Replace calls to printk with LOG_PRINTK to use the logging Zephyr
infrastructure. After this change it would be possible to set the
logging mode (to e.g. reduce the verbosity of output and final size
of the binary).
Signed-off-by: Lukasz Majewski <lukma@denx.de>
The gsm modem should be able to be started or stopped freely,
independent from the networking state.
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
The `starting` flag causes the sample to work only if
GSM_PPP_AUTOSTART is enabled, its initial value should be
dependent on GSM_PPP_AUTOSTART.
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Rename
BT_CTLR_LLCP_PROC_CTX_BUF_NUM
to
BT_CTLR_LLCP_LOCAL_PROC_CTX_BUF_NUM
to match naming scheme of
BT_CTLR_LLCP_REMOTE_PROC_CTX_BUF_NUM
Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
Use NRF_DT_GPIOS_TO_PSEL() in calls to nRF GPIO HAL functions as they
need a psel value, a pin number combined with the corresponding GPIO
port number, not only the pin number as provided by DT_GPIO_PIN().
This way buttons connected to pins in the P1 port can also be handled
properly.
Replace also DT_NODELABEL(button0) with DT_ALIAS(sw0) for consistency
with other samples that use the standard button.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
To give control over GPIO pins for Direction Finding Extension of
Radio peripheral when build for nRF53 network core, the application
core has to assign those pins to network core.
There is a mechanism that uses a device tree overlay to get
information about GPIO pins to be assigned to network core.
The commit adds overlays with appropriate configuration
to assign GPIO pins in all DF related samples.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
As the receive window is now decreased at the TCP module level, other
direct net_context users are also responsible for acknowledging the
received data with net_context_update_recv_wnd() - otherwise, the
communication will stall.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The capabilities callback did not provide information about
the type of the endpoint being configured, making it
impossible for the application to determine if it is a
sink or source endpoint.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Audio streams as defined by the BAP spec does not
support bidirectional audio streams. This commit
updates the API and implementation to match that.
The use a bidirectional CIS with 2 audio stream will
be added in a future commit.
This removes the _IN_ and _OUT_ and _INOUT_ QOS
values, as well as the direction of the codec QOS
struct.
To keep direction for internal use, the direction
has been added to the endpoint struct.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Make it consistent for audio.h and capabilities.h that the
array size parameter appear after the array parameter.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This enables CONFIG_LOG_BACKEND_UART_OUTPUT_DICTIONARY so that
the UART backend is in dictionary logging mode.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Reserve the upper 8 bits of gpio_dt_flags_t for SoC specific flags and
move the non-standard, hardware-specific GPIO devicetree flags (IO
voltage level, drive strength, debounce filter) from the generic
dt-bindings/gpio/gpio.h header to SoC specific dt-bindings headers.
Some of the SoC specific dt-bindings flags take up more bits than
necessary in order to retain backwards compatibility with the deprecated
GPIO flags. The width of these fields can be reduced/optimized once the
deprecated flags are removed.
Remove hardcoded use of GPIO_INT_DEBOUNCE in GPIO client drivers. This
flag can now be set in the devicetree for boards/SoCs with debounce
filter support. The SoC specific debounce flags have had the _INT part
of their name removed since these flag must be passed to
gpio_pin_configure(), not gpio_pin_interrupt_configure().
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The overlay are defined to run the samples application with PWM
feature on the nucleo_l073rz,nucleo_f091rc, nucleo_g474re
Signed-off-by: Francois Ramu <francois.ramu@st.com>
The metairq sample sometimes failed due to stuck because it has a
potential race when recording the latencies. The previous solution
checks whether the stats.mirq greater than MAX_EVENT. But stats.mirq
might also have a race here. So we change to check the msg sequence,
its correctness ensured by the kernel's message queue.
And also remove the spinlock in previous fix because tests only use
1 CPU, no need to add this. It also improves the fix for #40889,
to prevent test failed sporadically on acrn_ehl_crb and ehl_crb.
Fix#42874.
Signed-off-by: Enjia Mai <enjia.mai@intel.com>
According to Kconfig guidelines, boolean prompts must not start with
"Enable...". The following command has been used to automate the changes
in this patch:
sed -i "s/bool \"[Ee]nables\? \(\w\)/bool \"\U\1/g" **/Kconfig*
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add build assertions that will ensure that every peripheral for
which a driver instance is created has some pins assigned to it.
Neither pinctrl-0 nor *-pin properties can be currently marked as
required in devicetree, so these assertions will help users avoid
invalid configurations where it could be hard to figure out why
the UART is not working.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Pinnacle 100 DVK uses QSPI to store slot1 partition.
Add board config overlay to ensure QSPI is enabled
so slot1 can be read/written.
Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
This sample application uses the STM32 USB TCPC Driver to create a USBC
Sink Application for the STM32G081b_eval board.
Signed-off-by: Sam Hurst <sbh1187@gmail.com>
the icm42605 defaults to a global thread for trigger processing,
the CONFIG_ICM42605_TRIGGER_OWN_THREAD is deprecated.
Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@escolifesciences.com>
Add the support of a rpmsg tty channel that responds to the generic
Linux rpmsg_tty driver.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Restructure to separate the management of the rpmsg stack
add the rpmsg client into 2 threads.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
The Bluetooth HCI driver based on the RPMsg transport now uses the IPC
service module. The compatible Bluetooth sample - HCI RPMsg - has also
been migrated to the new IPC solution.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Kconfig options now belong to the Kconfig domain, therefore, the
:kconfig:option: role needs to be used.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This file defines the crypto driver API, cipher is supposed to be just
one type of capability (other can be hash) of these drivers, just
change the file name to be consistent with it.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Differentiate integration)platforms list per each sample test.
Removed sample.mcumg.smp_svr.bt_tiny as it can not fit in
nr51422 flash anymore, even with configuration tweeks.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
The sample cannot spin in an infinity loop because the idle thread will
not run and consequently the forced state will not be used.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
By default, the Connection Parameters control feature is enabled for the
SMP Server sample with the Bluetooth transport.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
The callbacks were implemented to notify the application
about the state of the ISO. However, since then, callbacks
such as `started` and `stopped` have been implemented,
and as such the `connected` and `disconnected` callbacks
no longer server any purpose.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a new board to support Intel Tiger Lake H PCH variant of cAVS2.5.
Move common Kconfig options for cavs25 to soc level. No need to
replicate these for every board.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
sensor_value_from_double had a early overflow when converting the
fractional part (val2). This occured when input was more then
2147.493647 (inp >= INT32_MAX/1000000.0 + 0.01).
return value -ERANGE as this is what errno is set to by `strtod` and
similar posix functions.
fixes issue #39176
Signed-off-by: Simon Frank <simon.frank@lohmega.com>
Add a couple of extra shield configurations to catch regressions with
the st7735r, gd7965 and ls0xx drivers.
Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
- Filter out the remaining CAN tests if no zephyr,canbus chosen node is
enabled in the devicetree.
- Rename the tests to shorten the name a bit.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
- Filter out the CANopenNode tests if no zephyr,canbus chosen node is
enabled in the devicetree.
- Enable the program download build-only test on all boards with the
necessary fixed partions.
- Explicitly exclude boards without the needed flash support from the
program download build-only test as these do not even pass Kconfig and
thus fail to complete the twister filter stage.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
We're now using the Kconfig copied from the upstream lvgl repository. It
uses the LV_ prefix for all options while we're using LVGL_ for
Zephyr-specific ones. Make the latter consistent with upstream but also
make sure they're distinct from lvgl's by using LV_Z_ as the prefix.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@huawei.com>
Start using the upstream Kconfig from LVGL and move the glue code out
of the zephyr tree and put it under lvgl/zephyr/ in modules.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@huawei.com>
This updates the lvgl in-tree glue code to work with version v8.1.0 and
bumps the west manifest accordingly.
The following are the most significant changes:
- The logging callback has changes in lvgl and no longer provides the
caller with an integer log level code. We now need to parse the log
string's prefix to determine the level.
- Several Kconfig options (mostly for default values of various settings)
have been removed because these values are no longer configurable in
lvgl.
- The library no longer performs a deep copy of the display and input
device driver structs, so these must no longer be allocated on the
stack in the init func.
Other than that it's mostly about renaming of various structures and
functions and adjusting the calls if function's signatures have changed.
This patch allows all in-tree users to work correctly but it's likely
it doesn't support all new widgets and layouts added in lvgl v8. These
however can be added gradually once this is upstream.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@huawei.com>
Current lvgl code allows to use the kernel heap for dynamic memory
allocation. The k_heap API doesn't however provide k_realloc() which
will be needed in order to update lvgl to v8. Nico suggested there's
no good reason for lvgl to use k_heap and it should stick to either
the libc's allocator or depend on its own private sys_heap.
The alternative would be to extend the k_heap API to provide k_realloc()
but this may be tricky for several reasons and for now there would
be a single user anyway.
This removes the choice of using k_heap for lvgl and renames the user
pool to SYS_HEAP in Kconfig and makes it the default option.
The prj.conf for the lvgl sample is modifed to specify the number of
memory pool blocks instead of the total size as the default block
size is 2048 and it results in the same size of memory.
Suggested-by: Nicolas Pitre <npitre@baylibre.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@huawei.com>
The sample graphical Hello World program uses the image widget as well as
the Montserrat font size 14. While currently those are being selected by
default, it won't be the case once we update to lvgl v8. Select relevant
Kconfig option in prj.conf.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@huawei.com>
Adding mechanism to all the backends to switch the logging formats
at runtime while leveraging the function pointer table based upon
the Kconfigs which also cleans up the logging backend design.
Also demonstrate the working API with the changes
to syst sample. Clean up Kconfig for backends and add a standard
template to generate the Kconfigs for logging formats to be used
by all backends.
Signed-off-by: Aastha Grover <aastha.grover@intel.com>
The sample enabled the Grove LCD by default in prj.conf, and in the
README it is clearly stated that the sample is intended to work using
the LCD module. This patch remove the unnecessary ifdeffery and obtains
a reference to the display at compile time.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The driver was never migrated to Devicetree, this patch converts the
driver to a proper Devicetree based device.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The driver does not implement a display API, it has a custom API. Having
it under display is confusing, since display API consumers may expect
they can use it. These sort of custom drivers fit better under
drivers/misc.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The nRF5340dk is shipping an external QSPI flash that can be used to do
XIP from. Extend the code_relocation nocopy sample to support this
platform so that part of the functions are executed from internal flash
and others from external flash.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
* Use case of interest:
Some platforms are shipping in parallel to the internal FLASH some other
storage / external FLASH (usually a QSPI FLASH) that can be used to
execute (XIP) code from.
The content of this external FLASH can usually be written at flash time
using proper tools (see for example the case of the external FLASH on
the nRF5340DK that can be written at flash time using nrfjprog).
The external FLASH is a nice addition that is extremely useful when a
large application code doesn't entirely fit on the internal FLASH so
that we could want to move part of it in the auxiliary FLASH to XIP the
code from there.
* The problem:
Right now Zephyr doesn't have a formal and generic way to move at build
time part of the code to a different memory region.
* The current status:
Zephyr is indeed shipping a code_relocation feature but that doesn't
entirely match our needs.
When XIP is enabled, the code_relocation feature is used in Zephyr to
move the selected code (that is to copy text section, to initialize data
and zero bss) from FLASH to SRAM at run time and execute code from SRAM.
The relocation is done by a generated snippet of code that is
memcpy()-ing the right content to the destination region also using some
build-time generated portions of linker script to retrieve start and
destination addresses and regions.
* This patch:
This patch is leveraging the code_relocation code and adding a NOCOPY
feature. This feature is using the code_relocation feature to
dynamically build the linker script snippets but entirely skipping the
run-time code relocation so that the code can be XIP-ed from the
destination region.
* Example:
Let's say that we have a big file called `huge_file.c` that we want to
XIP from the external FLASH that is mapped in an EXTFLASH region.
In this case we should enable `CONFIG_XIP` and
`CONFIG_CODE_DATA_RELOCATION` and instruct cmake as follows:
zephyr_code_relocate(src/huge_file.c EXTFLASH_TEXT NOCOPY)
zephyr_code_relocate(src/huge_file.c SRAM_DATA)
this means that:
- The .text section of the `huge_file.c` must reside in the EXTFLASH
memory region and we do not need to copy the section there because we
are going to XIP it (and we assume that the file is going to be placed
in the external FLASH at flash time).
- The .data section of the `huge_file.c` must still reside in the SRAM
memory region.
* TODOs:
It's desirable to have the possibility to relocate libraries and
pre-build files instead of source code files.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Zephyr docs should mention OTA:
- Define Over-the-Air update
- Indicate OTA can be used with MCUboot
- Link examples of the OTA DFU process
Signed-off-by: Mike Szczys <mike@golioth.io>
CONFIG_BT_ISO_TX_MTU=230 had been added to deal with the RX
buffers not fitting TX's of same size, which is fixed now.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Register modem power callbacks to show how it can be
used to provide e.g modem power on and off sequences.
Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
XCC (based on GCC 4.2) doesn't support C++11, and can't build those
tests. So exclude them from twister.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Both drivers enable device runtime on init, so they will be suspended
in the very beginning. The async get operation no longer exists, so
just remove the message related with this.
Fixes#42740
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Firmware uploading to the host may not always be desired,
disable it by default.
Enable it for existing USB DFU sample to keep
the usual behavior, add note about new option to README.rst.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Add missing integration plaforms in direction finding samples.
There were no nRF52820 and nRF5340 added.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Direction finding connectionless RX sample didn't fit into
nRF52820 SRAM. The sample will not be able to store IQ samples
for maximum number of CTEs allowed by Bluetooth Core 5.3
specification.
For nRF52820 the new allowed maximum number of scanned CTEs
is set to one, to save more space in SRAM for an application.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Fix problem with building sample applications where Host is
split from Controller into separate binaries. In that situation
samples does not have access to controllers Kconfig options.
To optimize memory usage by an application, disable not needed
features (angle of arrival or angle of departure).
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add missing integration plaforms in direction finding samples.
There were no nRF52820 and nRF5340 added.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
To give control over GPIO pins for Direction Finding Extension of
Radio peripheral when build for nRF53 network core, the application
core has to assign those pins to network core.
There is a mechanism that uses a device tree overlay to get
information about GPIO pins to be assigned to network core.
The commit adds overlays with appropriate configuration
to assign GPIO pins in all DF related samples.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
There was a bug it periodic advertising sync termination handling.
If a sync was terminated before sync established was reported,
for example sync may be filtered out by CTE type, then sample
will wait until sync_create_timeout_ms is reached.
Also sem_per_sync_lost semaphore is given in term_cb.
Result of the bug is next time a sync is established, CTE sampling
is enabled, sample starts waiting for periodic sync lost and
immediately ends waiting because sem_per_sync_lost is given.
Scan is restarted and already synchronized sync is terminated.
Correct behavior is, when term_cb is executed sem_per_sync_lost
may be given only if sync established was already reported.
Also sample must not wait for sem_per_sync if sync is terminated
due to wrong CTE type. It can end wait immediately.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
In applications where timing is critical it seems like enabling
deferred log mode could be desirable.
Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
Co-authored-by: Seb Laveze <sebastien.laveze@nxp.com>
Signed-off-by: Xabier Marquiegui <xmarquiegui@ainguraiiot.com>
Blinky PWM sample minimum pwm period was too high for iMX.RT PWM module.
decrease the minimum pwm period so sample will pass pwm calibration
phase.
Fixes#38954
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
The samples/kernel/metairq_dispatch runs failed on acrn_ehl_crb
due to the potential race condition in accessing the global stat
data. Add a spinlock to prevent this.
Fixes#40889
Signed-off-by: Enjia Mai <enjia.mai@intel.com>
Mark MODBUS samples as build only, otherwise they would
need different fixtures for each sample.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
MCUX watchdog timer supports min window of 500ms. Increase maximum task
watchdog timeout window to 500ms by default, so that this sample can run
on iMX RT SOCs. Also update iMX RT watchdog driver to reject timeout
maximums under 500ms with a useful error message
Fixes#40153
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
As described in #42403, there was an issue with the existing crc16_ansi()
implementation, since it was not calculating the CRC-16-ANSI (aka
CRC-16-MODBUS). This is because the existing crc16() function only
supported non-reflected input and output (and the CRC-16-ANSI requires
reflection on both) and also it did not seem to support correctly inial
seeds different from 0x0000 (and, again, the CRC-16-ANSI requires 0xffff
as an initial seed).
This commit replaces the existing crc16() with a functional pair,
crc16() and crc16_reflect(), that also work with any poly, any initial seed
and allow to select whether reflection is performed.
It also adapts crc16_ansi() so that it actually returns the correct CRC.
Fixes#42403.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Using a gpio_dt_spec is the current best practice for getting at pins
defined in the DT, because it gets all the boilerplate and flags right
for you. Use that in blinky, keeping the documentation in sync with
the code.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This expands the sample to do both v1 and v2, and both immediate
and deferred modes for each logging verion. This is to make sure
MIPI Sys-T output is not broken for all combinations. Default is
v2/immediate using prj.conf. Deferred mode is enabled via
overlay.
Also add qemu_x86 as an allowed platform as the samples are
working there too.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This adds a few log lines to show how string processing works
with Sys-T.
Note that CONFIG_LOG_BLOCK_IN_THREAD=y to make sure all log
messages are printed instead of being dropped.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add a basic device tree overlay to support the use of the ATSAMD21 XPro
dev board with the ADC sample application.
Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
All drivers that require input_positive to be set should be given it.
Some parts may require an offset, so abstract this away too.
Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
Direction finding samples had dependency on KConfig option defined
in Controller. That caused a problem for split builds where
an application and host are not part of the same binary as
controller. The code dependend on the Kconfig option
was always disabled.
To fix that issue new Kconfig options were introduced to
Host. The dependency is removed. Unwanted features may stil be
disabled and samples binaier will be smaller.
The commit aligns all direction finding samples code.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
A common pattern here was to take the work item as the subfield of a
containing object. But the contained field is not a k_work, it's a
k_work_delayable.
Things were working only because the work field was first, so the
pointers had the same value. Do things right and fix things to
produce correct code if/when that field ever moves within delayable.
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Use the set of headers that the TF-M build system places in the
install output. Not all public header files are available in the
interface/include directory and the TF-M build system uses the install
mechanism of cmake to include additional headers based on platform
or configuration.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Lora samples are missing harnesses and hence are reported
failed by default by twister.
Add required harnesses to be able to detect correct and faulty
test executions.
Fixes#42159
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
The ip_k66f doesn't have I2C_0 status set to OKAY so the build of
this sample generates warnings in the nightly build. Root problem
is that the groove display is not ported to the device tree so
there isn't a standard way of filtering on the display being
part of the platform.
fixes#41523
Signed-off-by: David Leach <david.leach@nxp.com>
Increase minimum RAM requirements on this test as it appears
that 32 is too low and 40 is verified ok.
Fixes#42161
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
When moving the samples to samples/modules the example code was not
updated accordingly.
Fixes: 613f1cde4a
Signed-off-by: Moritz Fischer <moritzf@google.com>
The CAN_BUS_UNKNOWN CAN controller state is only used to indicate that
the current CAN controller state could not be read.
Remove it and change the signature of the can_get_state() API function
to return an integer indicating success or failure.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Adds Basic Audio Profile (BAP) unicast server and client samples.
These are the barebones versions of what is needed to scan/advertise
for audio and setup a stream using the mandatory LC3 preset defined by
the BAP spec.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add reference to specific CONFIG_BT_CTLR_ Kconfig options
for the ISO samples. This is due to the fact that ISO
isn't fully supported in the Zephyr controller yet, and
won't be enabled by default for a while yet.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
For tracing_user, the sys_trace_isr_enter() & sys_trace_isr_exit()
block any nest interrupts & most SMP interrupts for the user. It is
hard to analyze the IRQ preemption(e.g., each IRQ counter and execution
time). This commit adds ISR nest level for each CPU to the user instead
of blocking user call back when nest interrupts.
Signed-off-by: Wealian Liao <WHLIAO@nuvoton.com>
Remove the only_tags filter for the board and add ignore_tags for net
and bt.
Adds a filter to a userspace sample that didn't correctly filter on
usermode being Kconfiged.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Add a check for SDU size and tx qos to ensure that we do not
attempt to send any data and neither central or peripheral
if the benchmark has been setup to be rx-only.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Periodic advertising synchronization create had a timeout set
to fixed value of 10 seconds. BT 5.3 Core specification defines
synchronization timeout as 6 consecutive periodic advertising
events. When advertiser set the periodic interval to be more than
1.6 second it was possible the application timeout is reached
before time allowed by BT Core specification.
Changed implementation of timeout to depend on the periodic
advertising interval.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add new sample application for direction finding to show
how the functionality works in connected mode for peripheral role.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add new sample application for direction finding to show
how the functionality works in connected mode for central role.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Stop using redundant DEV_DATA/DEV_CFG macros and use dev->data and
dev->config instead.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add sample which demonstrates how RTC clocks are synchronized
between application and network core.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Add a simple sample that tries to answer the silly question: how fast
can I move data from one core to another using OpenAMP?
It depends on a lot of factors but at least we can use this sample as a
skeleton to build tests on top.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
In order to align with macros used to obtain a device reference (e.g.
DEVICE_DT_GET), align the PM macros to use "GET" instead of "REF". This
change should have low impact since no official release has gone out yet
with the "REF" macros.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Following the work done to add TFM support on b_u585i_iot02a,
update other STM32 TFM enabled boards to benefit from the
progress made on TFM flashing instructions.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Disable Ethernet on SocketCAN sample because some Ethernet
drivers cannot operate on such small buffers.
Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
Reduced logging mode selection to deferred, immediate, minimal and
frontend. Decoupled logging version from mode and created CONFIG_LOG1
which can be used to explicitly select deprecated version.
From now on, chosing CONFIG_LOG_MODE_{IMMEDIATE,DEFERRED} will result
in version2.
Deprecated CONFIG_LOG2_MODE_{IMMEDIATE,DEFERRED} with cmake warning.
Codebase adapted to those changes.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Host receive thread has small default stack size.
Attempt to convert data from binany to string requires
large array. Allocation of such array on stack could
cause stack overflow.
To limit the scope of the array and avoid stack overflow
the array is changed to be static local variable in a function.
Also the array has been prepared to accept max advertising
data sieze of 1650 bytes.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
The spi node of the led_ws2812 now includes the frame format
as defined by the dts bindings spi-device.yaml
SPI_FRAME_FORMAT_TI is selected with overlay for target boards.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
The STM32 single_wire example was merged in parallel to this sample
and ended up as a sub-folder of this one. Separate both into their
own folders.
Signed-off-by: Martin Jäger <martin@libre.solar>
This PR adds the different handling of temperature sensor for the
STM32L5 soc. In this soc, there are some calibration settings which
need to be applied for temperature conversion.
Signed-off-by: Wouter Cappelle <wouter.cappelle@crodeon.com>
For functions returning nothing, there is no need to document
with @return, as Doxgen complains about "documented empty
return type of ...".
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
For functions returning nothing, there is no need to document
with @return, as Doxgen complains about "documented empty
return type of ...".
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
For functions returning nothing, there is no need to document
with @return, as Doxgen complains about "documented empty
return type of ...".
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
`tracing_user.h` lost several definitions, which made
CONFIG_TRACING_USER build fail. This fixes the TRACING_USER
config & adds it to the test case.
Moreover, the idle task stack is overflow on qemu_x86, qemu_cortex_m0 &
qemu_riscv64. This makes the test fail. So this commit sets the idle
stack size to 2048 for this sample to avoid it.
Signed-off-by: Wealian Liao <WHLIAO@nuvoton.com>
Add optional user data argument to can_set_state_change_callback() to
comply with Zephyr API design guidelines.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
1. Test suites in prior ztest serve no purpose other than logical
ordering of tests into a named-group. Move the construct of setup and
teardown into the test suite and away from individual tests.
Additionally, add the constructs of before/after to the test suites.
This model more closely resembels other testing frameworks such as gTest
and Junit.
2. Test can be added to a suite by using ZTEST() or ZTEST_F() where _F
stands for fixture. In the case where _F is used, the argument `this`
will be provided with the type `struct suite_name##_fixture*`. Again,
this models other modern testing frameworks and allows the test to
directly access the already set up data related to the test suite.
3. Add the concept of test rules (from Junit). Rules are similar to the
before/after functions of the test suites but are global and run on all
suites. An example of a test rule can be to check that nothing was
logged to ERROR. The rule can cause the test to fail if anything was
logged to ERROR during an integration test. Another example would be a
rule that verifies that tests ran within some defined timeout.
Signed-off-by: Yuval Peress <peress@google.com>
Use default arduino header UART in DT overlay for FRDM-K64F board.
This is also consistent with documentation if a shield is to be
used for communication.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This sample demonstrates the use of the UART driver. The data is
received using an ISR callback and a message queue. For sending data,
the polling API is used.
Signed-off-by: Martin Jäger <martin@libre.solar>
Rename a few CAN API functions for clarity and consistency with other
Zephyr RTOS APIs.
CAN_DEFINE_MSGQ() becomes CAN_MSGQ_DEFINE() to match K_MSGQ_DEFINE().
can_attach_isr() becomes can_add_rx_filter() since a filter callback
function is not an interrupt service routine (although it is called in
isr context). The word "attach" is replaced with "add" since filters are
added, not attached. This matches the terminology used is other Zephyr
APIs better.
can_detach() becomes can_remove_rx_filter() to pair with
can_add_rx_filter().
can_attach_msgq() becomes can_add_rx_filter_msgq() and documentation is
updated to mention its relationship with can_add_rx_filter().
can_register_state_change_isr() becomes can_set_state_change_callback()
since a state change callback function is not an interrupt service
routine (although it is called in isr context). The word "register" is
replaced with "set" since only one state change callback can be in
place.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Align compiler flags of SOF Zephyr build with the build SOF XTOS
and use -fstrict-overflow.
With -fno-strict-overflow, some versions of XCC compiler (e.g. xt-xcc
12.0.8) always emit a "bltu" instruction to check for overflow in loops
like:
unsigned int n;
for(n = 0; n < 1024; n++)
do_arithmetic();
With "-fno-strict-overflow", you'll have:
18: 068076 loop a0, 22 <dummy_dspload+0x22>
1b: 445a add.n a4, a4, a5
1d: 551b addi.n a5, a5, 1
1f: 023657 bltu a6, a5, 25 <dummy_dspload+0x25>
22: fffc86 j 18 <dummy_dspload+0x18>
With "-fstrict-overflow":
16: 038476 loop a4, 1d <dummy_dspload+0x1d>
19: 223a add.n a2, a2, a3
1b: 331b addi.n a3, a3, 1
As this is a common pattern in audio DSP code, change the default
for SOF builds to -fstrict-overflow.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The inner loops of SOF audio algorithms benefit from
compiler optimizations. On Intel cAVS platforms, it was noted
zero-overhead loops ("loop" family of instructions) is not
used for fixed-size inner loops when using -Os (optimize for
size) and the XCC xtensa toolchain.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Getopt has been rework in this way that calling it does not require
extra state parameter and its execution is thread safe.
Global parameters describing the state of the getopt function have been
made available to ensure full API compatibility in using this library.
However, referencing these global variables directly is not thread
safe. In order to get the state of the getopt function for the thread
that is currently using it, call: getopt_state_get();
Extended the library with getopt_long and getopt_long_only functions.
Moved getopt libary from utils to posix.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
It is documented as unsigned in
samples/net/sockets/big_http_download/Kconfig
Signed overflow is undefined behavior, unsigned is not. This fixes the
following warning:
-Wstrict-overflow=1
samples/net/sockets/big_http_download/src/big_http_download.c:346:2:
In function 'main':
error: iteration 2147483648 invokes undefined behavior
[-Werror=aggressive-loop-optimizations]
346 | } while (--num_iterations != 0);
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Excluded due to conflicts with adafruit_2_8_tft_touch_v2.
Both boards got a touch controller.
Signed-off-by: Konstantinos Papadopoulos <kostas.papadopulos@gmail.com>
Adding #ifndef CONFIG_LOG2 condition for log_msg_ids and
log_string_sync in sys-t sample. Extending support for
v2 logging in sys-t sample.
Signed-off-by: Aastha Grover <aastha.grover@intel.com>
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
The nucleo_h743 allows extra capes to extend its functionality.
In our case it has been extended to use 32MiB SPI-NOR memory
connected to QUADSPI dedicated pins from block2.
Moreover, upper 16MiB of SPI-NOR memory has been used to store
littlefs data to test 4B addressing mode (which may cause problems
when NOR-flash is larger than 16 MiB).
Now the littlefs sample can be used to test this extension:
west build -p always -b nucleo_h743zi ./zephyr/samples/subsys/fs/littlefs
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Fix wrong extra_args definitions wich cause that this args were not used
by CMake during building this samples via Twister in CI.
Signed-off-by: Piotr Golyzniak <piotr.golyzniak@nordicsemi.no>
The syscall_perf test cannot be built successfully due to region RAM
overflow on qemu_riscv32_xip and hifive1_revb. The dtim is only 16KB,
To reduce the main stack size to make it can be built successfully.
Base on the spec(fe310-g002-manual-v1p1.pdf), the size of itim should
be 8KB. Modify the definition in its DTS file.
And it also fix some of the gcc warning when testing it by twister.
This PR partially fixes#41399.
Signed-off-by: Enjia Mai <enjia.mai@intel.com>
The CTE type is used in two ways by HCI layer:
1) single value representing particular CTE type: AoA, AoD 1 us,
AoD 2 us
2) bit-filed where bits 0-2 represent particular CTE types AoA
AoD 1 us, AoD 2 us
The bit-field is used to inform Controller about allowed types
of CTE, hence single value carries more than one value.
To avoid confusion between these use cases in code that refers
to case 1) all named cte_type (singular form). For case 2)
cte_types (plural form) is used.
There is an enumeration that is used for both cases:
bt_df_cte_type. For cte_type only single value from the
enumeration may be assigned to variable except
BT_DF_CTE_TYPE_NONE and BT_DF_CTE_TYPE_ALL.
For cte_types all enum members may be used. Ocasionally
BT_DF_CTE_TYPE_NONE may be excluded. If that is true,
it is described in code documentation.
Thanks to that applications are released from requirement
to include hci.h header file.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
This sample requires to much flash compared to nucleo_l552ze_q
available resources.
Remove it from this sample.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Due to a recent change in TFM, some more space should be allocated
to mcuboot flash partition (some space should be allocate for OTP)
(Cf commit db07170a34f ("Platform: Allocate space in flash for OTP")
in trusted-firmware-m repo)
Take this into account and increase mcuboot flash partition for
nucleo_l552ze_q_ns target.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
OS_MGMT_TASKSTAT depends on THREAD_MONITOR, so when it defaults to y
and THREAD_MONITOR is disabled we get a build error.
Add a depends on to enforce a correct configuration.
Remove default y, as features should be default n.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Change the can_tx_callback_t function signature to use an "int" (not an
uint32_t) for representing transmission errors.
The "error" callback function parameter is functionally equivalent to
the return value from can_send() and thus needs to use the same data
type and needs to be able to hold negative errno values.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
SYS_INIT can be used for the same purpose, what is being run is simply
an initialization hook.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Specify in the API that the callback must be registered before the
channel is enabled, fix the NRFX IPC driver to be compliant and change
the MBOX sample.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Convert the CAN sample from using can_attach_workq() to using
can_attach_msgq() and triggered work via k_work_poll_submit().
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Adds notes on how to run the two main test suites for TF-M using
the supplied sample applications.
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Place the nodes to the proper place into the DT. The driver is calling
directly into the NRFX without using any direct memory addressing so
this is mostly a cosmetic fix.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
This sample writes the tmp108 temperature to the console
once every 3 seconds. There are macro definitions included
for turning off and on alerts if that is set up, and
also using low power one shot mode.
Signed-off-by: Jimmy Johnson <catch22@fastmail.net>
Various obsolote and misnamed platfomrs in test filters theat went
undetected for a while.
Fixes#41222
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add a sample that can be used to see the nRF LED matrix display driver
in action and that will prove that the driver is buildable for both the
bbc_microbit_v2 and bbc_microbit boards.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
- adds overlayed board info to support PWM LED
- adds support for blinky_pwm sample code.
Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
Added dts overlay and config to support using
samples/driver/apa201 with blueclover_plt_demo_v2_nrf52832.
Signed-off-by: Jeremy Wood <jeremy@bcdevices.com>
CMSIS limits the stack size, but for qemu_x86_64, qemu_xtensa, qemu_leon3
and the boards sunch as up_squared, ehl_crb, acrn_ehl_crb need more
stack size to run this successfully, or the stack overflow will happened.
So we enlarge the stack size to 1024 for this sample case.
For other boards the original 512 is enough.
Signed-off-by: Enjia Mai <enjia.mai@intel.com>
Search and replace `message(INFO " ` with `message(STATUS "`.
This would otherwise print "INFO <message"
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Change the function pm_device_runtime_enable() to return 0 on
success or an error code in case of error.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
samples/boards/pine64_pinetime has the same functionality as the more
general samples/basic/button application with the board specific
driver `pinetime-key-out`.
Signed-off-by: Casper Meijn <casper@meijn.net>
Avoid endless loop in `case MQTT_EVT_PUBLISH`
Fail on any error for mqtt_read_publish_payload_blocking, inc. -EAGAIN.
Fixes zephyrproject-rtos#40965
Signed-off-by: Jeffrey Urban <jeffrey@jeffreyurban.com>
The sample did not specify any tests in its sample.yaml file, causing CI
failures.
Additionally, the sample requires to generate secure key before building
the sample, otherwise the build fails. For the CI needs, specify a dummy
test key, which is only included if the build was triggered by Twister.
For this, specify a USE_DUMMY_KEY variable in the sample.yaml file.
Finally, fix some minor build issues in the sample itself - remove
unused variable, and remove deleted (and also unneeded) mbed TLS header
inclusion.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
- fixes sample codes' relative paths
- updates instructions to build and run for native posix
platforms on its 64 flavor.
Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
Sample should only be run if led is present on board.
Since, this is not the case on any of the in tree boards,
set the sample as build-only.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Many documents relied on single quotes to create references, e.g.
`my_reference`. This is possible because `default_role = "any"` is
enabled in Sphinx conf.py. However, this method comes with its problems:
- It mixes all domains together, so it's not clear to what are you
referencing: a document? a Kconfig option? a C function?...
- It creates inconsistencies: in some places explicit roles are used
(e.g. :ref:`my_page`) while in some others not.
- _Conflictis_ with markdown. Single quotes are used for literals in
Markdown, so people tend to use the same syntax in Sphinx, even though
it has a different purpose.
Usages have been found using `git grep ' `[^`]*` ' -- **/*.rst`.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Replace deprecated macro USBD_CFG_DATA_DEFINE by
USBD_DEFINE_CFG_DATA which places usb_cfg_data structures
in specific iterable section.
Replace __usb_data_start, __usb_data_end usage patterns
size_t size = (__usb_data_end - __usb_data_start);
for (size_t i = 0; i < size; i++) {...}
by
STRUCT_SECTION_FOREACH(usb_cfg_data, ...) {...}
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Rework samples to use DEVICE_DT_GET and DT_CHOSEN
to get default display controller device.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Enable the flash on RT1170 and RT1160. When booting from the CM7 core,
flash will be started in XIP mode and used as storage as well as boot
memory. When booting from the CM4 core, flash is available as storage
only, and does not run in XIP mode.
This commit was tested with the following samples
-flash_shell
-littlefs
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Deprecate the use of CAN-specific error return values and replace them
with standard errno values.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The gsm_ppp.h is currently in include/drivers/modem directory
so change the path accordingly.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add read access to internal tmp116 eeprom which
contains the device unique id after manufacturing
Signed-off-by: Guillaume Lager <g.lager@innoseis.com>
The sample oversimplified the observe mechanism a bit - instead of
making use of CoAP APIs to verify the packets received (if they are
actually notifications for the observe) it blindly assumed that any
received packet was a notification. This could be misleading for
potential users of the CoAP library, as the sample had little use as
a reference for the Observer functionality.
Fix this by making use of `coap_reply` structure and a corresponding
`coap_response_received()` function.
Additionally, make the observe cancellation compliant with the CoAP
specification - it should be either an empty Reset message, or a GET
request with Observe option set to 1. The sample used invalid
construct of a Reset message with Observe option. For the purpose of
the sample, use the latter option.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The sample intended to send an empty ACK for the notification message
(response code equal to 0), yet it included a token in the ACK reply
(which is not correct for an empty ACK).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add support for both Observe cancellation methods - empty Reset reply
(in place of ACK) and GET message with Observe option set to 1.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The documentation of the sample refers IPv6 instead of IPv4.
Additionally, the coexisting coap_client sample also uses IPv6 by
default. Therefore, switch the sample default configuration to use IPv6
instead of IPv4.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This adds an spi master mode driver via bitbanged gpio. Only syncronous
transfers are implemented. Clock signal timing is accomplished via busy
waits, the gpios are manipulated via the standard gpio interface; these
two factors limit the frequency at which it can operate - but here
a simple and generic implementation was chosen over performance.
The driver supports the various clock polarity and phase
configurations, and can also work with word sizes which are non
multiples of 8bits, currently up to 16 bits.
A sample program is also added demonstrating basic use of the driver
with 9bit data words.
Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
Rename PM_STATE_DT_ITEMS_LEN to DT_NUM_CPU_POWER_STATES to make its
purpose more clear. This macro could be made part of a Devicetree API
for PM in the future.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Rename the PM_STATE_INFO_DT_ITEMS_LIST macro to
PM_STATE_INFO_LIST_FROM_DT_CPU to make its purpose more clear. Similar
naming scheme is found e.g. in the GPIO API.
Associated internal macros and docstrings have been adjusted, too.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Normally main.c file doesn't have a header file, because it doesn't
need to declare any interfaces to other modules.
In this sample, it's better to put the shared variables in one place,
and provide the interfaces to other modules, such as app_a, app_b,
and main.
Signed-off-by: Paul He <pawpawhe@gmail.com>
Remove the conditional attribute from the sample partition manifest.
The conditional behavior will change with TF-M 1.5 to only accept
cmake bool values on/off enabled/disabled true/false and is intended
to be generated by the build system.
Since the partition is supposed to always be enabled in the sample
there is no need to have a conditional for it.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Added board specific configuration which enables use of
asynchronous UART API in UART log backend.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This corrects the directory pointing to sample in the README
file. Also changes the TCP port number for the second serial
port exposing the GDB stub. This allows QEMU itself to expose
GDB interface through port 1234, and Zephyr's GDB stub at
port 5678.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Arduino compatible boards should have a working UART on pin 0 & 1.
On frdm_k64f this is handled by uart3
Unfortunately pinmuxing of uart3 was destroyed when enabling NETWORKING,
because the uart3 RX/TX pins was reconfigured for 1588 timers.
1588 timers are enabled by the enet child node, ptp which by some reason
is enabled by default.
1588 timers aren't needed in most cases when ethernet is being used,
so this fix ensures ptp is by default disabled. Likewise pinmuxing of
the 1588 timer functionality is now dependant of ptp being active
Signed-off-by: Kim Bøndergaard <kim.boendergaard@escoglobal.com>
Remove this line because the pm_device_busy_set function will
prevent the system to enter low power.
This sample application wants to.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Previously cycle64 was under `samples/`. It's been moved to
`tests/` and has been marked with `slow: True` so that it
will not disrupt CI by adding excessive delays.
Fixes#40367
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
The device PM subsystem _depends_ on device, not vice-versa. Devices
only hold a reference to struct pm_device now, and initialize this
reference with the value provided in Z_DEVICE_DEFINE. This requirement
can be solved with a forward struct declaration, meaning there is no
need to include device PM headers.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The supported protocol must be delivered to the firmware update object
as optional, then configured in the application.
This information is device/server dependent so does not can be fixed
in library.
Signed-off-by: Jair Jack <jack@icatorze.com.br>
Add a sample that shows how dynamic pin control can be useful to remap a
peripheral to a different set of pins.
NOTE: default pin configuration is provided for the nRF52840-DK board.
Such configuration will be removed once all nRF-based boards are ported
to pinctrl.
Thanks to Francesco for documentation suggestions.
Co-authored-by: Francesco D. Servidio <francesco.servidio@nordicsemi.no>
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Pinctrl is missing in i2c1 device description on stm32373c_eval
ovderlay file, besides using I2C1 this board (as mentioned in readme)
requires to remove 2 resistors on the board.
Make it simple and instead use a board with arduino_i2c port
available.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Replace unpacked in6_addr structures with raw buffers in net_ipv6_hdr
struct, to prevent compiler warnings about unaligned access.
Remove __packed parameter from `struct net_6lo_context` since the
structure isn't really serialized.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Replace unpacked in_addr structures with raw buffers in net_ipv4_hdr
struct, to prevent compiler warnings about unaligned access.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Added an observe callback so that the application can register to
receive events like observer added/deleted, and notification acked/
timed out. The notifications can be traced back to the exact data
contained within them by use of the user_data pointer.
Fixes#38531.
Signed-off-by: Maik Vermeulen <maik.vermeulen@innotractor.com>
This sample scans for nearby BLE devices and prints the address of the
device found and the RSSI value to the UART terminal.
Uses passive scanning and demonstrates the role of the observer.
Signed-off-by: Yeshvanth M <yeshvanthmuniraj@gmail.com>
This sample periodically sends out advertising data packets with
manufacturer data element.
The content of data sent is a single byte indicating how many
advertising packets the device has sent which rolls back to 0 after 255.
Demonstrates role of broadcaster.
Signed-off-by: Yeshvanth M <yeshvanthmuniraj@gmail.com>
This commit increases the main stack size to 2048 since the current
stack size is insufficient for the `qemu_x86` board (the default stack
size is 1024 for that board) and results in a stack overflow in the
main thread.
Note that this is required because the newlib full variant, which is
used by this sample, included in the Zephyr SDK 0.13.2 now has an
increased stack usage requirement due to enabling the C99 format
specifier support.
For more details, refer to the issue #40469 [1].
[1] https://github.com/zephyrproject-rtos/zephyr/pull/40469#issuecomment-977854095
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Since drivers implement a callback based on action and not the state,
we should be using the API based on the action instead of the one based
on the state.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Update the macro prototype to explicitly require the length of the
desired user data. Update all in-tree usage of this macro.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
In the current USB device support, the sizes of bulk endpoint
are mostly configure through Kconfig and do not care if a device
is high-speed capable. The information if a USB device controller
supports high-speed comes from devicetree. Add a Kconfig option to
map this information and configure bulk endpoint sizes
accordingly.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
uart_fifo_read() can return negative values in case
it is not implemented or CONFIG_UART_INTERRUPT_DRIVEN
is not enabled. Both cases can not actually happen in the
case of CDC ACM UART, check it anyway in case behavior
of the UART API changes unnoticed.
Align the code in RX path code of both camples and
enable TX interrupt only if data was received successfully.
Fixes: #39835Fixes: #39824Fixes: #39809
Coverity-CID: 240667
Coverity-CID: 240679
Coverity-CID: 240697
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
The sample implements a dummy ARoT (Application Root of Trust) partition
in TF-M and calls it from the app.
Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This changes both k_mem_domain_add_partition() and
k_mem_domain_remove_partition() to return errors instead of
asserting when errors are encountered. This gives the application
chance to recover.
The arch_mem_domain_parition_add()/_remove() will be modified
later together with all the other arch_mem_domain_*() changes
since the architecture code for partition addition and removal
functions usually cannot be separately changed.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This changes k_mem_domain_init() to return error values
instead of asserting when errors are encountered.
This gives applications a chance to recover if needed.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The macro already mentions in the docstrings that PM is not supported:
"Invokes DEVICE_DEFINE() with no power management support".
This patch removed the PM entry from the macro and ajusts its uses.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Remove option CONFIG_USB_UART_CONSOLE where it has no influence
or enable CONFIG_SHELL_BACKEND_SERIAL_CHECK_DTR without taking
a detour through CONFIG_USB_UART_CONSOLE.
Check the compatibility of chosen property instead
of usage of CONFIG_USB_UART_CONSOLE option.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This sample uses console driver and therefore
Kconfig option CONFIG_CONSOLE and CONFIG_UART_CONSOLE
are required.
Kconfig option CONFIG_USB_UART_CONSOLE no longer has
any influence here and should be removed.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Change pm_power_state_force to receive which cpu the state should be
forced. Also, it changed the API behavior to force the given state only
when the idle thread for that core is executed.
In a multicore environment force arbitrarily a core to suspend is not
safe because the kernel cannot infer what that cpu is running and how it
impacts the overall system, for example, if it is holding a lock that is
required by a thread that is running in another cpu.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Renames the struct from bt_iso_cig_create_param to
bt_iso_cig_param as the same struct can, without
modification, be used to update the CIG as well
(function to support that will come in a later commit).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
A CIG may be updated later to include more CIS, and thus a slist
makes more sense.
The BIG doesn't need the change, but it makes more sense to
have similar handling for both.
This change also removes the requirement that the arrays
used to create the CIG/BIG need to static.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a macro to retrieve the iso data load length (the
length stored in the iso header) with a bit mask that
ensures that we only take the first 14 bits.
This is to remove any RFU bits that may have been set.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
There were a few cases where bt_hci_iso_data_hdr was used
instead of the proper struct bt_hci_iso_hdr.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Currently the IPM samples are hosted in the IPC sample location. Clean
this situation up by moving the IPM samples to a new location.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Update TF-M documentation to match the current integrated TF-M version.
Include mention of the Platform secure partition that can be enabled.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Switch the LED and button code to the gpio_dt_spec APIs. This also gets
rid of the code conditionals, so that the entire sample code is always
compiled.
Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
Bump up the main stack size from 1kB to 2kB, seems like the settings
restore function right now goes above the default stack size for SPI
flash devices:
0x20000aa8 main (real size 2048): unused 864 usage 1184 / 2048 (57 %)
Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
Not handling telnet commands may lead to some unexpected behaviour, like
telnet client locking when it does not receive a response for DO TIMING
MARK command.
Therefore enable it by default in the sample to improve user exprience.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
TCP2 is no longer needed as it is the unique implementation since the
legacy one has been removed.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This change implements qsort() for the minimal libc via Heapsort.
Heapsort time complexity is O(n log(n)) in the best, average,
and worst cases. It is O(1) in space complexity (i.e. sorts
in-place) and is iterative rather than recursive. Heapsort is
not stable (i.e. does not preserve order of identical elements).
On cortex-m0, this implementation occupies ~240 bytes.
Fixes#28896
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
This is a first step towards demonstrating provisioning of X.509
certificates. The device certificate signing request is created using
Mbed TLS X.509 APIs. The elliptic curve key `SECP256R1` used to sign the
CSR is generated inside TF-M and Mbed TLS is configured to use TF-M for
crypto services. This approach will ensure that private key never
leaves secure side.
The CSR is encoded in JSON and is printed on the console.
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@linaro.org>
Remove the DT_CHOSEN_ZEPHYR_CANBUS_LABEL macro and replace it with
DEVICE_DT_GET(DT_CHOSEN(zephyr_canbus)) were possible.
Where both devicetree CAN controllers and Kconfig specified CAN loopback
controllers are supported, the macro is replaced with
DT_LABEL(DT_CHOSEN(zephyr_canbus)) for now.
This is the first pass for removing the requirement for devicetree
labels for CAN controllers.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The cycle64 sample is intended to complement
`test_clock_cycle_64()` in `tests/kernel/common`.
The sample demonstrates the upper 32-bits of the 64-bit cycle
counter incrementing when the bottom 32-bits roll over from
`UINT32_MAX` to 0.
If the upper 32-bits of the 64-bit cycle counter does not
increment, then an error message is printed.
```
west build -p auto -b qemu_cortex_a53 -t run \
samples/kernel/cycle64
...
*** Booting Zephyr OS build v2.7.99-1124-gd7ba4e394832 ***
wrap-around should occur in 68s
[ddd:hh:mm:ss.0ms]
[000:00:00:00.020]: c64: 0000000000174258
[000:00:01:08.760]: c64: 000000010027f8bb
[000:00:02:17.490]: c64: 0000000200348c85
```
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
Kconfig USB_DEVICE_REMOTE_WAKEUP option depends only on
USB device controller capability, but is not controlled
by the USB device controller drivers configuration.
Move USB_DEVICE_REMOTE_WAKEUP option to drivers and
make it promptless.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Rename the Zephyr chosen property for specifying the default CAN bus
controller from "zephyr,can-primary" to "zephyr,canbus".
The "zephyr,can-primary" property name was selected in antipation of
adding support for redundant CAN networks, which we have yet to
add. Meanwhile, the "primary" term causes confusion for non-redundant
CAN bus configurations (and the "can" term doesn't match the name of the
Zephyr CAN bus subsystem).
The CAN in Automation (CiA) 302-6, which deals with CANopen network
redundancy, uses the terms "default interface" and "redundant
interface". If/when we add support for redundant CAN networks, the
"zephyr,canbus" chosen property can be supplemented with a
"zephyr,canbus-redundant" chosen property.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
As the already existing macro K_MEM_SLAB_DEFINE results in
two variable definitions, the preceding static modifier leads to
a seemingly working solution, though linkage conflicts will occur
when the same memory slab name is used across multiple modules.
The new K_MEM_SLAB_DEFINE_STATIC macro duplicates the functionality of
K_MEM_SLAB_DEFINE with the difference that the static keywords are
internally prepended before both variable definitions.
The implementation has been tested on my Zephyr project (the build
issue faded out). The documentation has been updated altogether
with all incorrect occurences of static K_MEM_SLAB_DEFINE.
Signed-off-by: Pavel Hübner <pavel.hubner@hardwario.com>
With the maximum number set to 20, the sample fails to build for
both platforms set as allowed for this sample and mentioned in its
documentation, i.e. 96b_carbon_nrf51 and nrf51dk_nrf51422 (a build
attempt ends up with an SRAM region overflow). Use a lower number
to prevent this failure and set both those boards as integration
platforms, so that such problem, if it was to appear again, could be
caught by CI.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
As part of the work to support multiple IPC instances / backends using
IPC service, the static vrings mi code must be reworked to resemble a
classic device driver.
Fix also the sample using it.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
The PM callback is no longer referenced as "pm_control" but
"pm_action_cb", so reflect this new naming on the callbacks.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Move all PM device runtime API calls from pm_device* to the
pm_device_runtime* namespace.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
After the removal of pm_device_get_async, the pm_device_wait API has
become redundant. Its usage after pm_device_put_async should not be
considered a valid usecase, since after that call what will happen is a
pm_device_get (which is blocking).
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
As of today there is no clear usage of asynchronous gets, since in
general, a resume operation should be synchronous (we are about to use
the device immediately after resuming it). Removing this API simplifies
the runtime implementation in a significant way (refer to future
commits).
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Enable watchdog timer on RT1160 evk. This was tested using
the watchdog timer api test (tests/drivers/watchdog/wdt_basic_api)
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
ADC support verified with driver sample. LPADC1 channel 0 pin used,
which maps to pin 10 on J9 on the EVK.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add iterations of connections and disconnections to
Babblesim test of Bluetooth Low Energy Central role
functionality by scanning for other devices and establishing
connection to upto 62 peripherals with a strong enough
signal.
Enable Auto PHY Update and Auto Data Length Update procedure
in the central_multilink sample.
Enable Auto PHY Update and Auto Data Length Update procedure
in the peripheral_identity sample. Fixed issues related to
rotation of identities after maximum number of connection
iterations are repeated.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add implementation to iteratively perform Extended
Advertising enable and disable while Periodic Advertising is
active.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Enabling hci_uart sample requires changing
max BT connections and proper uart overlay. Use
this as sample for ESP32 soc.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
This commit adds the support to run the SPI NOR sample code on the
npcx7m6fb_evb and npcx9m6f_evb boards.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Change-Id: I780c5dfcf53f3ac537da946673fc03f5ee24e90c
- Add a `log_strdup` to the role text output for logging V1
compatibility
- Fix style issues
- Change where the documentation refers to an OpenThread device as
"himself" to "itself"
Signed-off-by: Chris Pearson <ctpearson@gmail.com>
If CONFIG_NET_LOG=y is set, OpenThread will output the current OT
role whenever the state changes.
To simplify understanding of the log output, this change replaces
the numerical role ID with the text name of the role. This also
required a change to a documentation file to replace an instance
of a numerical ID.
NOTE: This is potentially a breaking change should anyone be using
test scripts that monitor the OpenThread state changes and look
for the numerical ID. This does not seem to be the case for the
Zephyr tests, however.
Signed-off-by: Chris Pearson <ctpearson@gmail.com>
Use a more precise Kconfig symbol name to avoid namespace conflicts when
more NRFX-dependent drivers will be added.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Split the zephyr project maintained repository trusted-firmware-m into
forks of the individual upstream repositories.
https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git
Upstream: TF-Mv1.4.1
Additions:
zephyr: module: Add zephyr module file
trusted-firmware-m: platform: lpcxpresso55s69: Update SDK
https://git.trustedfirmware.org/TF-M/tf-m-tests.git
Upstream: 51ff2bdfae043f6dd0813b000d928c4bda172660
Additions:
zephyr: module: Add module file for tf-m-tests
https://github.com/ARM-software/psa-arch-tests.git
Upstream: 60faad2ead1b967ec8e73accd793d3ed0e5c56bd
Additions:
zephyr: module: Add module file for psa-arch-tests
psa-arch-tests: Allow overriding of toolchain file
The organization of folders remain the same with the following
exceptions:
Moved:
root folder moved from modules/tee/tfm to modules/tee/tf-m to avoid
problems with west update.
zephyr/module.yml to trusted-firmware-m/zephyr/module.yml and
${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR} points to what was previously
${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/trusted-firmware-m.
Added:
psa-arch-tests/zephyr/module.yml and ${ZEPHYR_PSA_ARCH_TESTS_MODULE_DIR}
tf-m-tests/zephyr/module/ and ${ZEPHYR_TF_M_TESTS_MODULE_DIR}
Removed:
init-git.sh
README.rst
Fixes: #39353
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Convert remaining tests and samples to using find_package() instead of
literally including the CMake boilerplate code.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
The root CA used so far (GlobalSign R2) is about to expire soon
(December 2021) and Google have switched to a new certificate, signed by
GlobalSign R1 (valid until 2028). Therefore we need to replace the
root CA used by the sample to the new one, in order to establish secure
connection to with google.com.
Additionally, the new certificate chain sent by Google is larger again,
so it's needed to increase mbed TLS max content length parameter in
order to process it correctly. This also implies an increase in heap
usage, so increase the heap size as well.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
After commit eeb15aa393 ("timer: hpet: enable 64 bit mode for
better usages") was applied, main thread stack usage on qemu_x86
platform increased from 984 to 1040 bytes.
Default stack size, which is 1024, is no longer enough. Change that to
1536 to make sure this sample runs correctly on qemu_x86.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Enables ADC1 on the RT1020 evaluation board. Channels 10 and 11 of this
ADC are exposed as pins 1 and 2 of J18 on the evk.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Enables ADC on RT1015 evaluation board. Channels 1 and 13 are exposed as
pins 2 and 1 of J18 on the EVK.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Added ADC support to RT1010 evaluation board. ADC channels 1 and 2 are
exposed as pins 10 and 12 of J26.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Adds ADC support to RT1024 EVK. ADC channels 10 and 11 are enabled as
pins 2 and 4 on J18 of the evaluation board
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Enables the ADC on the RT1060 evaluation board. Channels 0 and 15 of
ADC1 are available on pins 1 and 0 of J23, respectively.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit adds const modifier in second argument for
sensor trigger handler.
There is no reason to modify this data and this change
would allow to store trigger configuration also in FLASH.
Fixes: #38929
Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
Make use of the new MBOX APIs to create a ping-pong sample application.
This sample is using the NRFX IPC peripheral to send and receive signals
on different channels
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Adds a config flag to enable floating point support for fxos8700
compatible accelerometer devices.
Signed-off-by: Jordan Stein <jordan.stein@fortrobotics.com>
Moves DAC driver configuration defaults from the application level to
the board level for the bl5340_dvk board.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
Moves DAC dts node and driver configuration defaults from the
application level to the board level for the bl654_dvk board.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
Moves DAC dts node and driver configuration defaults from the
application level to the board level for the bl653_dvk board.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
Moves DAC dts node and driver configuration defaults from the
application level to the board level for the bl652_dvk board.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
THis patch fixes multiple issues when referencing to the C domain. In
some cases there were typos (e.g. missing :), in some others no domain
syntax was used for referencing, etc.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Refactors all of the counter drivers to use a shared driver class
initialization priority configuration, CONFIG_COUNTER_INIT_PRIORITY, to
allow configuring counter drivers separately from other devices. This is
similar to other driver classes like I2C and SPI.
The default is set to CONFIG_KERNEL_INIT_PRIORITY_DEVICE to preserve the
existing default initialization priority for most drivers. The
exceptions are the maxim_ds3231 and mcp7940n drivers which have a
dependency on a SPI driver and must therefore initialize later than the
default device priority.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
add adc to board dts file,
update yaml files and documentation,
add adc 1 channel pins 1 and 15 to the pinmux file,
add overlay file to the board adc sample,
add board to the adc test file and
Signed-off-by: Andrei Auchynnikau <ovchinnikov@strim-tech.com>
Do not misuse the hello world sample for testing of features, keep it
simple. Create a new test for booting with uefi instead.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Fix compilation and logic issues to allow testing OTS functionality with
assert enabled.
The compilation fixes are simple and do not require an explanation.
The assertion in bt_ots_dir_list_init was logically reversed. Its
purpose is to ensure the directory list is not already initialized
and as such should assert that the dir_list is not set (i.e. is NULL).
Signed-off-by: Abe Kohandel <abe.kohandel@gmail.com>
After the __printf_like validation was added to the shell_fprintf
functions we got warnings while building the
'samples/subsys/shell/shell_module' due to incorrect specifiers
while printing size_t variables. Fix that.
Fixes: #39386
Fixes: fe2075d140 "shell: Add __printf_like to shell_fprintf"
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Splitt he ISO broadcast config into broadcaster and
sync receiver. This will allow a device that only
wants to one of the roles to have a much more optimized
configuration.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Uses the stats subsys to provide simple but useful debugging stats for
power management state changes and timing.
Removes the no longer needed PM_DEBUG config option
Replaces the use of PM_DEBUG for a test clock output pin for mec1501 and
adds in its place an SoC Kconfig option to enable it.
Adds a STATS_SET macro for assigning a value to a stat group field
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
This commit adds a new subcommand to the `demo` command that prints out
the name of the used board.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
Add __printf_like modifier to validate strings used by shell.
Fixing warnings triggered by this change.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Replace the custom float32_value_t LwM2M type with native double, to
facilitate LwM2M API and improve floating point precission.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
cAVS 1.5 has little RAM, force COMP_SRC_TINY to fix SOF build
failures under Zephyr with XCC.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
tracing.osawareness.openocd relies on the CONFIG_THREAD_NAME is
enabled, however we don't enable it in test config.
Fix that.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
The tracing.osawareness.openocd doesn't support executing
on multicore Zephyr. However we disable multiple CPUs
usage in two different ways for this test:
- by setting CONFIG_MP_NUM_CPUS to 1
- by setting CONFIG_SMP to n
It's not correct for all SMP platforms to disable SMP. As
it is also excessive (we can guarantee the execution on
single core by setting CONFIG_MP_NUM_CPUS=1) let's drop
SMP disabling.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Only one single IPC service backend is currently present: multi_instance
backend. This backend is heavily relying on the RPMsg multi_instance
code to instanciate and manage instances and endpoints. Samples exist
for both in the samples/subsys/ipc/ directory.
With this patch we are "unpacking" the RPMsg multi_service code to make
it more modular and reusable by different backends.
In particular we are re-organizing the code into two helper libraries:
an RPMsg library and a VRING / virtqueues static allocation library. At
the same time we rewrite the multi_instance backend to make fully use of
those new libraries and remove the old multi_instance sample.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Enable filtering of periodic advertisements to synchronize
with advertisenemts that include CTE.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Moving to Mbed TLS 3.0 changes some of the Mbed TLS to better match the
PSA spec. Fix up the things where we are affected by these API changes.
Signed-off-by: David Brown <david.brown@linaro.org>
This commit allows let build echo_server sample with
overlay-netusb.conf.
USB subsystem must be enabled by the application.
Signed-off-by: Stephan Linz <linz@li-pro.net>
The samples/subsys/mgmt/osdp utilize GPIO so having it set in the
prj.conf is needed since not all platforms enable GPIO by default.
To address the 'No SOURCES given to Zephyr library: drivers__gpio'
add a 'depends on gpio' to the sample.yaml to only build this on
platforms that have GPIO driver support.
Fixes#39180
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Move related areas to their own files and order
documentation logically from lower to upper layer.
Fix gross errors and inconsistencies.
Co-authored-by: Carles Cufí <carles.cufi@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Both ARG_UNUSED in pm_info(), cause errors when using PM_DEVICE=y.
Added a default case in pm_info(), to fix warnings.
Signed-off-by: Igor Knippenberg <igor.knippenberg@gmail.com>
The task_wdt_init() API can fail to install a timeout for the fallback
hardware WDT (hw_wdt) without returning an error code. This patch
enables task_wdt_init() to return the hw_wdt install timeout error code
if the hw_wdt install timeout fails.
Signed-off-by: Nick Ward <nick.ward@setec.com.au>
Add configuration for the mimxrt1024_evk board. This board does not have
any of the FXOS8700 interrupt pins connected by default, so triggers are
not available.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add a new struct that provides information to the upper
layer when accepting an connected isochronous stream.
The CIG ID and CIS ID makes it possible for the upper layer
to determine which ISO channels are "together" in a group.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Some build variants will fail runtime for certain boards (e.g. nRF52832)
due to stack overflow. Avoid this by increasing the stack size.
Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
Add the BT_ISO_SDU_BUF_SIZE which can be used to declare
the TX buffers for ISO, similar to the BT_L2CAP_SDU_BUF_SIZE
macro for L2CAP.
This also updates the ISO samples to use this as well
updating the SDU check to use
CONFIG_BT_ISO_TX_MTU/CONFIG_BT_ISO_RX_MTU without
subtracting the BT_ISO_CHAN_SEND_RESERVE to make the
API more clear.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
As this makes no difference, it's misleading so let's remove it to stop
being misled. I don't know why initial commit efa794dbc5 added it but
the build directory is strictly identical with or without this line.
The SOF code is included in the build thanks to CONFIG_SOF in prj.conf,
not this.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Each backend can configure separately features like colors on/off, VT100
handling and so on. This can be very handy for planned MQTT backend.
Shell will not send VT100 commands when VT100 is not enabled globally or
for particular backend.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
Move memory.h out of the way in a more "private" space
(include/linker/devicetree_reserved.h) to prevent polluting the
devicetree space.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Fixes: #38403
Removing unneeded `imply GPIO` and `CONFIG_GPIO=y` occurrences where no
files are added to the gpio zephyr library.
Also removed `CONFIG_GPIO=y` occurences where this is handled by
defconfigs for the soc or board.
Selection of GPIO without selecting any drivers results in the warning:
> No SOURCES given to Zephyr library: drivers__gpio
>
> Excluding target from build.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Fixes: #38403
Adding NET_DRIVERS menuconfig so that network drivers are grouped
together in its own menu entry under drivers, similar to most other
drivers.
This further has the advantages that `CONFIG_NET_DRIVERS` can be used
for testing to determine if network drivers has been selected.
This changed revealed a dependency loop where both `select` (for SLIP)
and `depends` (for PPP) which both depends on NET_DRIVERS` where in use
in the dependency tree for Qemu networking, especially NET_SLIP_TAP.
This is handled by defaulting `NET_DRIVERS` to `y` when building for a
Qemu target.
`SLIP` had a dependency to `!QEMU_TARGET || NET_QEMU_SLIP`. This is
changed so that SLIP prompt depends on `!QEMU_TARGET` which provides
full user control in hardware but makes the symbol promptless on Qemu
targets.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Update the sample.yaml files for the modbus samples:
- depends_on entries should just be space separated, drop the comma
- add the platform referenced in the documentation to platform_allow
- replace the deprecated dt_compat_enabled_with_alias with
dt_enabled_alias_with_parent_compat
Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
This has been unreferenced since:
4ff616b647 modbus: rework interface configuration
This generates a compiler warning, but it went unnoticed because the
sample test is configured incorrectly and not running.
Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
Finetune coap_server sample parameters for better user experience.
Reduce the maximum retransmission count to release resources earilier in
case client is unreachable and no longer responds. Increase the maximum
number of pending retransmissions, along with the heap size (the buffers
for messages are allocated on a heap), to improve sample responsiveness,
in case multiple unreplied messages are pending retransmission.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
In case no reply is received for notification message, remove the
corresponsding observer since it's no longer reachable, freeing slot for
another one.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The retransmission handler only increased the retransmission count, w/o
sending the actual message again. Additionally, the next retransmission
time calculation was broken - it did not take into consideration the
time that has already passed since before retransmission, and re-applied
the entire timeout value.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
There is a copy-paste error in this sample code that results
in a function for input events being called for an output pin.
By chance, this has no influence on the behavior of the sample,
as the function returns a register offset that for events and
tasks is the same for a given channel, but obviously the code
is confusing.
This is fixed by replacing the relevant part with more suitable
function calls, to also simplify the code a little.
On the occasion, also a remark is added about no button debouncing
used in the sample, to prevent users from being surprised by its
possible behavior.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Enable CONFIG_DEBUG when test is run in CI.
This will allow DGB access in stop modes (and specially flashing)
and avoid potential issues when test in run in a test suite.
Note that on some targets (stm32wb for instance) openocd is able
to do the same operation, and which allows to reflash the target
even if switch was not enabled, but this could not be the case
on all targets.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
The board name used in the zephyr-app-commands directive was the old
name for the Thingy52 board.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The nRF battery sample claims that it works without the need of a vbatt
node (voltage divider). However, this was currently not possible because
the sample code did have no means to extract the necessary ADC details
(instance and channel) from Devicetree unless vbatt was present. Similar
to other ADC samples, the zephyr,user node is used to define io-channels
property in this case. The sample README has been updated with an
example of how measurement without a voltage divider can be achieved.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
When using the IEEE802154 radio interface in CONFIG_IEEE802154_RAW_MODE,
there is no way to handle ack frames because of the dummy implementation
of ieee802154_radio_handle_ack() in the ieee802154_radio header file.
Removed the dummy implementation from the header so you can/need to
implement it in the application.
samples: added implementation of ieee802154_radio_handle_ack() to
wpan_serial and wpanusb sample
Signed-off-by: Gerhard Jörges <joerges@metratec.com>
The TensorFlow Lite module makes use of the features provided by the
standard C++ library (e.g. `#include <functional>`), so the standard
C++ library config must be enabled for it.
This used to work without `CONFIG_LIB_CPLUSPLUS=y` due to the bug
described in the issue #36644.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
With "Incompatible (u)intptr_t type and PRIxPTR definitions",
https://github.com/zephyrproject-rtos/zephyr/issues/37718,
issue resolved the FIXME code is no longer needed.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
This test makes use of dynamic RAM allocation done on the leftover
SRAM. Similarly to test/posix/eventfd, limit this test execution on
platforms with at least 32K of RAM available.
Fixes#38601
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
From 2.4 to 2.7 the net samples pair echo-server/client increase the
SRAM requirements. This adjusts example features to free necessary SRAM
to run example.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
The sample from samples/drivers/misc/ft800/ causes twister to
timeout as it has no pass conditions defiend nor producess any
output that can be verified. What is more, it requires a shield
which is not reflected in the sample.yaml. This fix sets test harness
to display and adds an entry for the required fixture.
Fixes: #38536
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
The Bluetooth Core Specification, version 5.3, has introduced multiple
changes to several widely-used terms in order to make them inclusive.
Update the public API to reflect this, excluding hci.h, which will be
done in a subsequent commit.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add a warning if the image is unconfirmed. Add a delay before rebooting
so that the user knows what happened.
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Twister was failing for samples/drivers/audio/dmic with timeout
because there were no pass conditions defined. This patch sets
harness to console and adds regex entries to be checked.
Fixes: #38532
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
Since commit 718c77a4cd ("dts: arm: stm32f0 soc serie has dma of type
V2bis"), the DMA DT cell of STM32F0 MCU has been fixed. It now has three
elements instead of five previously.
This patch fixes the dma property used in nucleo_f070rb.overlay
accordingly.
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
When using the stack fork type in the philosophers sample,
there were a few pointer type mismatch since the k_stack_*()
functions are using stack_data_t but the parameters are uint32_t.
So cast them to void pointer to suppress compiler warnings.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Due to a historical error introduced during an hci_uart refactor, the
get_len() function was using the wrong HCI H4 packet identifier for
commands. Instead of using H4_CMD (0x01) it was trying to match
BT_BUF_CMD (0x00).
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This adds shell support for FPGA drivers.
Signed-off-by: Mateusz Sierszulski <msierszulski@internships.antmicro.com>
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
This adds driver for EOS_S3 SoC FPGA.
Signed-off-by: Mateusz Sierszulski <msierszulski@internships.antmicro.com>
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
The HiFive Unleashed and HiFive Unmatched boards do not enable the
SPI0 controller that the flash is connected to. This test will not
build on these platforms because SPI0 bus controller is missing.
Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
This patch fixes printf format specifier "%u" -> "%zu" for printing
an argument of size_t on 64bit environment.
Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
Add a very simple application intended to show how to use the Audio
DMIC API and also to be an aid in developing drivers to implement
this API.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
These are getting build failures due to some kind of devicetree
console definition missing. These devices don't do networking, and
strictly don't even have a proper console device (logging is done via
a host mechanism). Probably fixable. Not worth the trouble. Filter.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Fix two typos in documentation, one in a sample's comment, and one in a
sample's console message. Found while learning Zephyr and exploring the
sources.
Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Improve the disconnect handling in the sample, and
avoid creating a new cig for each connection.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The disconnect handling of ACL connects in the sample was done
incorrect, and caused a call to bt_conn_unref with a NULL
pointer.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The additional depends on SOC_FAMILY_SAM was redundant.
Add sam4l_ek to dfu sample exclude since it was failing on
arduino_due.
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
The user tracing backend allows one to implement weak symbols to perform
user specific tracing, e.g gpio toggling or spi transactions. This adds
a qemu sample that just does a simple printk for each of the traced
functions, but could be changed to do whatever function the user
desires.
Signed-off-by: Bradley Bolen <bbolen@lexmark.com>
The HCI spec defines the BIS index range as starting from
index 0x01. We had previously implemented it such that it
starts from 0x00, and then simply adding 1 to the index
when sending over HCI. However, this may cause issue with
other HCI, or other SIG defined specification, commands
and events, and thus it is probably simpler if we just
use the HCI defined range.
This commit disallows BIT(0) (representing the BIS
index 0x00) to be set, and removes the addition
of 1 when sending over HCI.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Create a board overlay file in the application directory to add
pwm-led0 entry over default device tree. Also, include instruction
in the README file that connection of external LED at pin PA8 is
required for the demo to work.
Signed-off-by: Waqas Mazhar <waqas.mazhar@planetinnovation.com.au>
Enable thread awareness by default on philosophers sample. It shows
gdb debugging output using the feature as reference.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Update the name of the bt_conn pointers to make it clear
whether the connection pointers are ACL or ISO connections.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This patch is the first step to make the rpmsg_multi_instance usable in
a multi-core scenario.
The current driver is using a local driver variable (instance) to track
the number of allocated instances. This counter is practically used to
allocate to the instance the correct portion of the shared memory.
This is fundamentally wrong because this is assuming that it does exist
only one single shared memory region to split amongs all the allocated
instances. When the platform has more than one core this is obviously
not the case since each couple of cores are communicating using a
different memory region.
To solve this issue we introduce a new struct rpmsg_mi_ctx_shm_cfg that
is doing two things: (1) it's carrying the information about the shared
memory and (2) it's carrying an internal variable used to track the
instances allocated in that region. The same struct should be used every
time a new instance is allocated in the same shared memory region.
We also fix a problem with the current code where there is a race
between threads when accessing the instance variable, so this patch is
adding a serializing mutex.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
For the instance configuration the rpmsg_multi_instance code is
currently using a set of configuration info coming from two different
sources: the rpsmg_mi_ctx_cfg struct and Kconfig.
This is not only confusing but it's preventing to configure the
instances using information not coming from Kconfig (for example if we
want to configure the instance using DT).
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
With demand paging, the main stack is not user mode capable
and it would fail k_thread_user_mode_enter() under
app_b_entry(). So create another thread and stack for app_b
as this stack can be used in user mode.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Since periodic advertising chains are available there is
a possibility to send multiple PDUs including CTE in
a periodic advertising event.
This commit enables such functionality in direction finding
transmitter sample.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Enable support for Atmel SAM DAC driver on the following boards:
- sam_e70_xplained
- sam_e70b_xplained
- sam_v71_xult
- sam_v71b_xult
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
The default latency (0) is an invalid value (minimum is 5).
Set to 10 to match the connected ISO benchmark.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The formatting options, passed to the printk, caused warnings when
compiling for native_posix_64.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Follow up on commit bfd45e5b8c
("drivers: remove Kconfig option CONFIG_UART_CONSOLE_ON_DEV_NAME")
Now we can also remove Kconfig option CONFIG_UART_CONSOLE_ON_DEV_NAME
since all UART drivers are converted to devicetree and we can just use
DEVICE_DT_GET(DT_CHOSEN(zephyr_shell_uart)).
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Commit c79b1a38aa ("samples: display:
Convert driver and lvgl sample.yaml to use depends_on") started using
depends_on in the sample YAML for a lvgl application instead of
platform_allow.
This breaks build testing with twister and overflow checking enabled
on more resource constrained platforms. The test case's .config
ends up with:
CONFIG_LVGL_HOR_RES_MAX=320
CONFIG_LVGL_VER_RES_MAX=240
CONFIG_LVGL_VDB_SIZE=64
CONFIG_LVGL_BITS_PER_PIXEL=24
And lib/gui/lvgl/lvgl.c, where we allocate a buffer of size:
(CONFIG_LVGL_BITS_PER_PIXEL *
((CONFIG_LVGL_VDB_SIZE * CONFIG_LVGL_HOR_RES_MAX *
CONFIG_LVGL_VER_RES_MAX) / 100)
/ 8)
Require 147456 bytes to build the sample, ultimately overflowing RAM
if you run something along the lines of:
twister -T samples -p <constrained_platform> --overflow-as-errors
This is a reasonable test to be doing to make sure that sample RAM
requirements do not get too big for a subset of platforms that are of
interest, and it no longer works.
To fix it, add a min_ram line for this case so that we can still run
overflow tests on a large set of samples without fine-grained special
casing or creating an ever-growing list of platform excludes for this
test.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Fixes accelerometer_handler.cc to import correct header
with TfLiteStatus since c_api_internal.h file was deleted in
the new standalone tflite-micro repo.
Removes import of version.h in main_functions.cc to match
tflite-micro version.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
Changes name of folder from tensorflow to tflite-micro and updates docs
to reference TensorFlow Lite Micro specifically instead of TensorFlow.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
Remove CONFIG_UART_MCUMGR_ON_DEV_NAME and use
DEVICE_DT_GET(DT_CHOSEN(zephyr_uart_mcumgr)).
Add usb.overlay, which contains chosen node and cdc-acm-uart node,
to smp_svr sample.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Add app.overlay which contains chosen node
Rework sample to get CDC ACM UART device from devicetree.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Rework NCP interface configuration and NCP sample. Remove
CONFIG_OPENTHREAD_COPROCESSOR_SPINEL_ON_UART_DEV_NAME and
CONFIG_OPENTHREAD_COPROCESSOR_SPINEL_ON_UART_ACM Kconfig
options in favor of chosen node zephyr,ot-uart usage.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Add usb.overlay which contains chosen node and cdc-acm-uart node.
Change sample to get CDC ACM UART device from devicetree.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Add app.overlay which contains chosen node and cdc-acm-uart node.
Rework sample to get CDC ACM UART device from devicetree.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Add app.overlay which contains cdc-acm-uart nodes.
Rework CDC ACM and HID samples to get CDC ACM UART device
from devicetree.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Add app.overlay which contains cdc-acm-uart node.
Rework sample to get CDC ACM UART device from devicetree.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This adds an example application for the TI INA219 Zero-Drift,
Bidirectional Current/Power Monitor with I2C Interface
Signed-off-by: Leonard Pollak <leonardp@tr-host.de>
Move to CMake 3.20.0.
At the Toolchain WG it was decided to move to CMake 3.20.0.
The main reason for increasing CMake version is better toolchain
support.
Better toolchain support is added in the following CMake versions:
- armclang, CMake 3.15
- Intel oneAPI, CMake 3.20
- IAR, CMake 3.15 and 3.20
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
USB audio class samples are generic and can be built for any
board that supports USB device and isochronous endpoints.
Add app.overlay that uses reference to zephyr_udc0 and remove
board specific overlays.
Note: USB audio is still experimental and even though the sample can
be built for specific platform, it does not mean that it can be run
on it without issues.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This reverts commit e53371bbc0bc37d911884937199733f23c43fb21.
The "usbd0 aliases" approach has not proven to work.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Update periodic advertising data update rate. The periodic advertiser
is configured with a periodic advertising interval of 2.4 seconds but
updating the data every second. This leads to many of the advertising
data values not being sent at all.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Use a semaphore to prevent the hawkbit_probe from running more than once
at the same time since it reset the hawkbit context on entry and will
affect other running instance.
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Fix multiple typos and make the sample's log output consistent
with the subsys.
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Co-Authored-By: Sylvio Alves <sylviojalves@gmail.com>
When there is no grove sensor driver enabled, cmake warns
that the library has no sources. Fix that by adding
a new kconfig to be used by CMake to selectively
include the grove directory.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add workaround for no command buffer available when the host is
transmitting Host Number of Completed Packet Commands.
This command does not follow normal flow control of HCI commands and
the controller side HCI drivers that allocates HCI command buffers with
K_NO_WAIT can end up running out of command buffers.
Increase the command buffer count from 2 to 10 for the HCI uart driver
until the issue has a proper fix
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
The documentation for Bluetooth Direction Finding Extension (DFE)
samples has various issues:
- references to 'child' images, which do not exist in mainline zephyr
- invalid RST syntax: there are missing ` characters to end arguments
to :zephyr_file: roles, creating unintelligible output
- incorrect RST usage:
- using :zephyr_file: instead of :file: when referring to a file
that the user must create, creating broken links to nonexistent
files in the zephyr tree
- using :code: instead of :kconfig: to refer to kconfig options,
creating output without links to the help for those options
- redundant or duplicated information
- grammar, typos, various bits and pieces
Clean this up. As part of that, move various common bits and pieces of
information to the devicetree bindings index so they can just be
linked to from the sample docs.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Rename:
- grove,light to seeed,grove-light
- grove,temperature to seeed,grove-temperature
The "grove" brand applies to a family of products by Seeed (sic):
https://www.seeedstudio.com/category/Grove-c-1003.html
Therefore we should use the existing vendor seeed.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
I can't find any reference anywhere showing that the manufacturer of
the LPD8803 or LPD8806 LED scripts is a company called 'colorway'.
Use 'greeled' instead; these seem to actually be manufactured by
GreeLed corporation.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
It should be "maxim,max30101", because the vendor prefix for this
company is "maxim", not "max".
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Add workaround for no command buffer available when the host is
transmitting Host Number of Completed Packet Commands.
This command does not follow normal flow control of HCI commands and
the controller side HCI drivers that allocates HCI command buffers with
K_NO_WAIT can end up running out of command buffers.
Increase the command buffer count from 2 to 10 for the affected drivers
until the issue has a proper fix.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit adds a devmem load command for shell that allows
users to easily load arbitrary data into the device memory.
Signed-off-by: Mateusz Sierszulski <msierszulski@internships.antmicro.com>
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
This commit adds a high-level overview of Trusted Firmware-M,
describing the basic architecture and integration work with Zephyr.
Co-authored-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
add a config CONFIG_QEMU_UEFI_BOOT to indicate whether
the qemu will use UEFI bootable method;
add a new test "sample.basic.helloworld.uefi" to verify
UEFT bootable method on qemu_x86_64 platform.
Signed-off-by: Chen Peng1 <peng1.chen@intel.com>
The addition of image number parsing, in mcumgr library, requires
increase in the stack size for the smp_svr to work.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The commit adds chapter, to the documentation, that explains
how to select target image to upload, and how does the image number
maps to the DTS image defintion and the slot number.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Instead of passing target states, use actions for device PM control.
Actions represent better the meaning of the callback argument.
Furthermore, they are more future proof as they can be suitable for
other PM actions that have no direct mapping to a state. If we compare
with Linux, we could have a multi-stage suspend/resume. Such scenario
would not have a good mapping when using target states.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
- Return -ENOTSUP if the requested state is not supported
- Remove redundant "noop style" functions.
- Use switch everywhere to handle requested state (not necessary in all
drivers, but better take off with consistency in place after current
changes).
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The verb tense for the suspended state was not consistent with other
states. The likely reason: state was being used as a command/action.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The difference between low power and suspend states is a thin blur line
that is is not clear and most drivers have used indistinctly. This patch
converges to the usage of the suspend state for low power, since
contrary to the low power state, it is used by both system and runtime
device PM. The low power state is still kept, but its future is unclear
and needs some discussion.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Since the state is no longer modified by the device PM callback, just
use the state value.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The callback is now invoked to set the device PM state in all cases, so
the usage of ctrl_command is redundant.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The device PM subsystem already holds the device state, so there is no
need to keep duplicates inside the device. The pm_device_state_get has
been refactored to just return the device state. Note that this is still
not safe, but the same applied to the previous implementation. This
problem will be addressed later.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The sample only supports device-to-host control requests.
Return -ENOTSUP on host-to-device control requests.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
It is desirable to have the read and write like functions follow the
POSIX read and write parameter types.
Signed-off-by: Abe Kohandel <abe.kohandel@gmail.com>
There is no need to include nrf_clock_control.h so remove it as
this fixes a build issue when trying to compile this sample on
litex_vexriscv.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
In the current code the naming of the
CONFIG_RPMSG_MULTI_INSTANCE_?_IPM_{TX,RX}_NAME symbol is 1-based. While
this is not currently an issue, it could easily become such if the
symbol is programmatically used as part of a preprocessor enumeration
(for example when using DT_INST_FOREACH_STATUS_OKAY(...) & co).
To avoid trouble, just make the index starting from 0 instead than 1.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Add a sample that shows how to use in Zephyr nRF peripherals that
share the same ID and base address. Such peripherals cannot be used
simultaneously, but it is possible to switch between them. However,
currently it is not possible with Zephyr APIs, only using nrfx drivers
directly. This sample shows how to realize such switching for selected
peripheral instances while using standard Zephyr drivers for others.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Add Atmel sam0 sercom[uart] pinctrl bindings and implements pinctrl at
driver level. It changes all sam0 boards to use new feature and remove
pinmux driver dependency for sercom[uart]. The samples that require a
binding were update to keep consistency and avoid errors.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
The following device busy APIs:
- device_busy_set()
- device_busy_clear()
- device_busy_check()
- device_any_busy_check()
were used for device PM, so they have been moved to the pm subsystem.
This means they are now prefixed with `pm_` and are defined in
`pm/device.h`.
If device PM is not enabled dummy functions are now provided that do
nothing or return `-ENOSYS`, meaning that the functionality is not
available.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Some devicetre overlays do not reflect the recent rename to make NS
variants of boards with TF-M support have more consistent names; fix
it.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Add a sample intended to show how to use I2S drivers in processing of
audio streams. The sample starts both the RX and TX streams and adds
a simple echo effect to the received audio signal.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
We add a test variant in tfm_ipc test, to validate the
scenario where TF-M is built without BL2 (MCUboot). We
test this on QEMU only (MPS2 AN521).
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Due to changes in flash_layout.h for STM32L562, in the current
TF-M module update, we need to modify the DTS overlay files in
the TF-M samples where the board is supported.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
NS regression tests are hanging on qemu for AN521. The problem is
present in the upstream project as well (issue is filed) so disable
the tests for now on QEMU.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Switch to calling the sys_arch_reboot() API directly,
instead of going through the generic sys_reboot API.
This is to avoid locking the IRQs before the reset is
called, which is breaking the PSA call execution.
Also, align sample code to use the same secure service
(platform reset) to show case the PSA connect and close
APIs, instead of a random one (since the reset service
has to work to ultimately perform the system reset).
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Add support for sam_e70_xplained, sam_v71_xult based on TC0 counter.
Note: TC module is a 16-bit counter. Even with slow, 32768 Hz input
clock the time span counted by the driver is short.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
The test sample.drivers.crypto.stm32 was built only for the stm32 crypto
driver (build_only: true).
This commit changes the configuration to run the test and adds regex for
the supported modes.
Additionally integration_platform native_posix is removed from the
crypto.stm32 test configuration, such that stm32 targets built in CI.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
This commit uses filter instead of allow list for the
sample.drivers.crypto.stm32 test case.
As a result the ci test is not only built on mikroe_mini_m4_for_stm32,
but also on lora_e5_dev_board, nucleo_wl55jc and stm32l562e_dk.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
If BT_ISO is enabled we now compile conn.c which contains a
lot of functionality used by BT_ISO, even for broadcast-iso
builds, i.e. builds that do not require BT_CONN.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Change removes logs and assertions from default configuration.
They can be optionally enabled with debug_overlay.conf.
CONFIG_BT_BUF_CMD_TX_COUNT is increased to avoid dropping
HCI commands.
Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
This adds an example application for Sensirions SGP40 gas sensor
and SHT4X T/RH sensor.
The measured T/RH are used to make use of the on-chip T/RH compensation
of the SGP40.
Signed-off-by: Leonard Pollak <leonardp@tr-host.de>
Option to have continous scanning simultaneously while
advertising and multiple peripheral role is active.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Application demonstrating Bluetooth Low Energy Central role
functionality by scanning for other devices and establishing
connection to upto 62 peripherals with a strong enough
signal.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added sample to demonstrate use of multiple identity and be
able to be connected to multiple times from same central
device.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
reuse the lpc's lpadc driver for rt1170, modify the dts and add
some macro to shield some code of LPC series. Also add the
board support inside the tests/drivers/adc/adc_api/src/test_adc.c,
and a dts node:zephyr,user inside
samples/drivers/adc/boards/mimxrt1170_evk_cm7.overlay
Signed-off-by: Crist Xu <crist.xu@nxp.com>
This patch adds a devicetree configuration example for the Everlight
B1414 LED controller.
An overlay for the nucleo_f070rb board is provided. It assumes that
a B1414 LED controller is connected to the PA7 pin (SPI 1 MOSI). The
WS2812 SPI driver is used.
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
Some devices compatibles with the WS2812 IC have a different channel to
color mappings (e.g. RGB, BGR, RGBW, etc).
This patch introduces the "color-mapping" required property for the
WS2812 DT binding and adds support to the ws2812_gpio and ws2812_spi
drivers. This new property allows to configure the color to channel
mapping of a WS2812 compatible LED strip controller from its DT node.
Since this property also allows to know if a white channel is available,
then this patch removes the "has-white-channel" property.
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
Demonstating usage of IPC Service. Multi-instance RPMsg
was ued as a backed for IPC Service.
Signed-off-by: Marcin Jeliński <marcin.jelinski@nordicsemi.no>
Add nucleo_wl55jc to platform_allow for lora send/receive and class_a
samples. The board has a variation of the sx1262 driver, this should
allow to build test that code path.
Fix the existing config as well to specify the platforms on a single
line, as currently only the last entry is considered.
Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
By default the hifive1 board doesn't enable the SPI controller that
the flash is on. As such this test will not build on that platform
due to lack of a missing SPI bus controller device.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Align the capitalization of the term "Bluetooth Mesh" to Bluetooth mesh"
in the documentation. This is done to to match the new updated naming
convention done in Bluetooth SIG. In the upcoming spec versions, it its
used "Bluetooth mesh" with the lower case convention.
Signed-off-by: Ingar Kulbrandstad <ingar.kulbrandstad@nordicsemi.no>
The callback is not used anymore, so just delete it from the pm_control
callback signature.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
the device PM callback is not used anymore by the device PM subsystem,
so remove it from all drivers/tests using it.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit updates the NS board variant from
`nrf9160dk_nrf9160ns` to `nrf9160dk_nrf9160_ns`
to maintain consistency across zephyr.
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
This commit updates the NS board variant from
`nrf5340dk_nrf5340_cpuappns` to `nrf5340dk_nrf5340_cpuapp_ns`
to maintain consistency across zephyr.
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
This commit update the NS board variant from
`v2m_musca_s1_nonsecure` to `v2m_musca_s1_ns` to maintain
consistency across zephyr.
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
This commit update the NS board variant from
`v2m_musca_b1_nonsecure` to `v2m_musca_b1_ns` to maintain
consistency across zephyr.
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
This commit update the NS board variant from `mps2_an521_nonsecure`
to `mps2_an521_ns` to maintain consistency across zephyr.
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
This commit update the NS board variant from `bl5340_dvk_cpuappns`
to `bl5340_dvk_cpuapp_ns` to maintain consistency across zephyr.
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
This commit fixes the button activity notification not working issue.
The right attribute(4) is used for the button service.
This has been tested on nucleo_wb55rg and disco_l475_iot1 platforms.
Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
Thos tests/samples are used to build any PR onl all available boards to
verify basic sanity. Having the kernel tag means they can get excluded
for random non-kernel changes causing regressions. so remove kernel tag
to keep them in all CI runs.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Move all PM_DEVICE_STATE_* definitions to an enum. The
PM_DEVICE_STATE_SET and PM_DEVICE_STATE_GET definitions have been kept
out of the enum since they do not represent any state. However, their
name has not been changed since they will be removed soon.
All drivers and tests have been adjusted accordingly.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Regular OpenThread upmerge to bring in a fix for a possible
infinite loop and support for DNS service subtypes.
Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
Use the actual minimum timeout used by the sample for task watchdog
channels (100 ms) as the configuration value for the fallback hardware
watchdog, to avoid unnecessary executions of the timer handler.
Add missing indentation in the documentation of the sample so that
the console output is rendered correctly.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit configures ADC sample application using overlay. The ADC
sample has been tested in nucleo_l552ze_q platform.
Signed-off-by: Sidhdharth Yadav <sidhdharth.yadav@hcl.com>
This commit configures ADC sample application using overlay. The ADC
sample has been tested in stm32l562e_dk platform.
Signed-off-by: Sidhdharth Yadav <sidhdharth.yadav@hcl.com>
Move configuration related with BLE controller into board specific file.
That is required to allow building the sample for nRF5340 where BLE
controller is not part of the sample image.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
This is a simple comments fix. This sample code is for the
"Health Thermometer Service", but at one location the comments read
"Heart Rate Service".
The change replaces "Heart Rate" with "Health Thermometer".
Signed-off-by: Chris Pearson <ctpearson@gmail.com>
Add the ability to perform a write on the object name GATT
Characteristic with a notification callback to the application
that the name has been written.
In order for this operation to work the memory backing the
object name must be modifiable. To prevent forcing the user
to always allocate 120 bytes for the name, the maximum name
length is changed from a define to a configuration parameter.
Signed-off-by: Abe Kohandel <abe.kohandel@gmail.com>
This commit configures DAC sample application using overlay to
build and run on nucleo_l552ze_q platform.
This has been tested in nucleo_l552ze_q platform.
Signed-off-by: Sidhdharth Yadav <sidhdharth.yadav@hcl.com>
This commit configures DAC sample application using overlay to
build and run on stm32l562e_dk platform.
This has been tested in stm32l562e_dk platform.
Signed-off-by: Sidhdharth Yadav <sidhdharth.yadav@hcl.com>
Rename the top-level header file from <canbus/canopen.h> to
<canopennode.h>.
Rename CANopenNode related Kconfig options from CONFIG_CANOPEN* to
CONFIG_CANOPENNODE*.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Adds a sample that demonstrates how to transfer a periodic
advertising sync from a device to another device.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Adds a sample of using (in this case subscribing) to periodic
advertising sync transfer (PAST).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Convert pin setting and getting to `struct gpio_dt_spec` variants to
demonstrate usage of the new API.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Demonstrate use of bt_gatt_find_by_uuid in peripheral sample. This
avoids the magical array index.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add a new Kconfig option, BT_ISO_UNICAST, to make it possible
either configure unicast only, broadcast only or both.
This results in some code being moved, but not modified, and
should not effect anything.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Function used for filtering "dt_compat_enabled_with_label" was not
working as expected as it was not taking into account that we're
looking for a children/parent combination:
Provided "compat" with enabled status should be the one of the parent
of the node matching given label.
Function is then reworked to take this into account.
And to make it's usage clear:
- function name is changed to be clearer on the intention
- args order is reversed to be more logical wrt the intention
Users of the function are also updated to take the change into
account.
Fixes#36093
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Convert the keyscan portion of the Holtek HT16K33 driver to adhere to
the kscan API instead of the GPIO API.
When this driver was introduced the kscan API was not present. The
keyscan driver was therefore implemented as a GPIO interrupt driver.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Increase main and system workqueue stack sizes to avoid overflows
as the LoRaMac-node library is quite stack-hungry.
Signed-off-by: Ilya Tagunov <tagunil@gmail.com>
This commit removes a superfluous null pointer check.
The device is accessed via a label.
so in case it is not available a build error arises,
but the pointer won't ever be null.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
CONFIG_DEBUG_OPTIMIZATIONS should not be enabled by default in
prj.conf for tests or samples. Remove it from a few places that it
is.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Include the lpcxpresso55s69_ns board to the list of platforms
that support running the sample for the TF-M regression tests.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Configure a timeout for send/recv operations so that the sample can
recover in case the connection stalls (for instance due to IP address
change on an interface).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Use of CONFIG_THREAD_RUNTIME_STATS was added to this sample, but
caused issue because the call to z_thread_mark_switched_in()
is using k_cycle_get_32() before the timer is initialized.
Enable CONFIG_THREAD_RUNTIME_STATS_USE_TIMING_FUNCTIONS=y to
select hidden config CONFIG_TIMING_FUNCTIONS_NEED_AT_BOOT,
which calls to initialize the timer needed at boot for thread
runtime stats configuration.
Fixes#33275
Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
The CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT must be set for 802154_rpmsg
sample to properly allocate timers for nRF-802154 driver.
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
The Google server that the sample connects to sends a larger certificate
since recently. As the overall size of the message conveying the
ceritificate is ~4700 bytes now, current mbedTLS configuration did not
allow to reassemble the message and thus caused failure during the
handshake.
Fix this by increasing MBEDTLS_SSL_MAX_CONTENT_LEN parameter (with some
extra space for any future changes).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Removing the CONFIG_TEST=y setting from the TF-M
integration samples prj.conf. TEST does not need
to be enabled in these samples.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Use UUID encode macro fro 128-bit UUIDs for readability. This makes
it easier to see which service you are working with as the
bt_uuid_to_str prints the 128-bit UUIDs in this format.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Use UUID encode macro fro 128-bit UUIDs for readability. This makes
it easier to see which service you are working with as the
bt_uuid_to_str prints the 128-bit UUIDs in this format.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit enables DAC sample application to build and run on
stm32f3_disco platform. Updated documentation.
Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
This sample doesn't do anything interesting and we have
tests/drivers/entropy to can show how to call the API.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The README.rst in `samples/tfm_integration/tfm_ipc` was incorrectly
referring to `psa_level_1`. README.rst has been updated to refer to
`tfm_ipc` example.
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@linaro.org>
The example in folder `samples/tfm_integration/psa_level_1` contains
code that demonstrate usage of PSA crypto APIs in Zephyr rather than the
PSA levels. Therefore renaming the sample as `psa_crypto`.
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@linaro.org>
This commit extends the psa_level_1 sample's use of the PSA
Cryptography 1.0 API to demonstrate the following functionality:
- Generate a persistent key (secp256r1)
- Display the public key based on the private key above
- Calculates the SHA256 hash of a payload
- Signs the hash with the persistent key
- Verifies the signature using the public key
- Destroys the key
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
There are a number of platforms that the x_nucleo_eeprma2 eeprom sample
can't build on. Also fix issue with missing include of <mem.h> header
to get DT_SIZE_* macros used by the overlay.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
sample.drivers.eeprom.shield.x_nucleo_eeprma2 sample variant
should be run in CI bench only if shield is present on board.
Add a harness_config to specify the fixture check
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
The AUDIT_LOG partition cannot be used in TF-M builds
with the IPC mode (CONFIG_TFM_IPC=y); we have added a
relevant dependency for this. So we can cleanup the
CONFIG_TFM_PARTITION_AUDIT_LOG=n from the configuration
files of the samples.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
MCP4725 is an I2C dac that was added with PR #33481. This can now be
added to the bl5340_dvk device tree.
Signed-off-by: Kieran Mackey <kieran.mackey@lairdconnect.com>
This commit adds a simple application to demonstrate the zephyr
eeprom interface.
It uses an eeprom to keep track of the number reboots.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
Create minimal configuration for the peripheral_hr. Which can
be used to build this sample for nRF52810 and nRF52811 targets.
Signed-off-by: Marcin Jeliński <marcin.jelinski@nordicsemi.no>
For some reason a few drivers were not converted to the new device PM
callback signature. The reason may be because the device PM part is
compiled only when CONFIG_PM_DEVICE=y, a condition not enabled in CI by
default.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The Let's Encrypt X3 certificate is no longer in use, replace it with an
up-to-date certificate.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Fix peripheral sample handling of string values. The read callback
uses strlen to get the length of the current string value. Make sure
that the string value is always zero-byte terminated.
Fix multiple characteristics using the same storage for its value.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
The sequence number is needed in the appliaction layer to detect lost
packets in the ISO stream in cases where the timestamp is not included.
(Sequence number is mandatory to include where timestamp is optional).
The API for the public metadata have been moved to a public header file.
As the size of the ISO meta data exceeds the default 4 octets net_buf
user_data the public ISO metadata have been moved into a seperate array.
The internal metadata is still stored in net_buf user_data.
This also fixed the user_data overflow on 32 bit systems, caused by
writing the ts into user_data on index 4 to 7, which is outside the 4
allocated bytes.
Signed-off-by: Casper Bonde <casper_bonde@bose.com>
Update overlay file for nucleo_l552ze_q_ns board,
since now the sample does not enable REGRESSION,
and thus regular TF-M flash layout for the board
is used.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Removes the dependency on the external test service from the
CONFIG_TFM_REGRESSION_S test suite, instead
demonstrating how to make direct IPC calls to the CRYPTO
service that is available as a part of standard TF-M builds.
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Change the drivers's compatible from atmel,sam-tc to atmel,sam-tc-qdec.
The atmel,sam-tc should be reserved for the future counter driver.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Most APIs have the default synchronous and an asynchronous version
with the sufix _async because that is the most common use.
All devices in tree right now are using the synchronous version, so
just change it to be consistent with the rest of the system.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Since we are using mutex to protect critical sections and mutexes are
reentrant, it is possible to get rid of atomic for the state because
we can lock the mutex in device_pm_callback.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Changing from spinlock to mutex makes the running thread be preempted
and the workqueue ran. This changed the prints order in this sample.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
The sample would consequently try to print invalid data
the offset into the data was incorrect calculated to
always be at the end of the data, instead of at the
end of the data minus an offset.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
File prj.mcp2515.conf was previously removed from project as it was
made redundant.
Paths containing uppercase CAN were changed to lowercase.
Signed-off-by: Nick Ward <nick.ward@setec.com.au>
When a WIFI driver is slow to get interface up the system not connect
to WIFI access point. This add some tries to let driver be proper
initialize to allow accept connection request.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Similar to commit c6ff61220e, use a
harness config to limit execution of the adafruit_2_8_tft_touch_v2
sample variant to boards that have this shield attached.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The PR fixes the pwm_led sample:
- now test doesn't rely on any specific device name
- Logs which are scanned with regex in the test are printed
only after a command passes (before failures were not
affecting the test verdict)
- If 1 sec cycle is not supported appropriate info is printed
and won't cause the test to failed
- Changed second "Turned off" msg so regex doesn't mix it with the
the first one.
Fixes#35524
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
The scheduler has historically had an API where an application can
inform the kernel that it will never create a thread that can be
preempted, and the kernel and architecture layer would use that as an
optimization hint to eliminate some code paths.
Those optimizations have dwindled to almost nothing at this point, and
they're now objectively a smaller impact than the special casing that
was required to handle the idle thread (which, obviously, must always
be preemptible).
Fix this by eliminating the idea of "cooperative only" and ensuring
that there will always be at least one preemptible priority with value
>=0. CONFIG_NUM_PREEMPT_PRIORITIES now specifies the number of
user-accessible priorities other than the idle thread.
The only remaining workaround is that some older architectures (and
also SPARC) use the CONFIG_PREEMPT_ENABLED=n state as a hint to skip
thread switching on interrupt exit. So detect exactly those platforms
and implement a minimal workaround in the idle loop (basically "just
call swap()") instead, with a big explanation.
Note that this also fixes a bug in one of the philosophers samples,
where it would ask for 6 cooperative priorities but then use values -7
through -2. It was assuming the kernel would magically create a
cooperative priority for its idle thread, which wasn't correct even
before.
Fixes#34584
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Removes the requirements.txt from the training directory of the
magic wand sample as it is causing issues in CI. Updates README.md
to explicitly state the Python packages listed in requirements.txt.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
USB audio class samples are generic and can be built for any
board that supports USB device and isochronous endpoints.
Add app.overlay that uses aliases and remove board specific overlays.
Note: USB audio is still experimental and even though the sample can
be built for specific platform, it does not mean that it can be run
on it without issues.
Fixes: #25313
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Enable the option to pause the watchdog if the MCU is halted by a
debugger.
This fixes an issue with some Nordic MCUs (see #33509) where the board
could not be flashed anymore if a short watchdog timeout (<100 ms) was
used.
Signed-off-by: Martin Jäger <martin@libre.solar>
Changes CMakeLists.txt in TensorFlow samples from explicit file
list to a GLOB capturing src/* to make TensorFlow samples consistent
with other samples in tree.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
Fixes documentation for samples that incorrectly state that TensorFlow
library requires the -fno-threadsafe-statics flag to compile.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
Adds no-threadsafe-statics to compiler flags for gcc and arcmwdt.
The flag is required to compile the samples - the module can compile
without it.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
Converts the display driver and lvgl sample.yaml to select boards for
the adafruit_2_8_tft_touch_v2 shield configuration by depending on the
arduino_{gpio,i2c,spi} features instead of using an explicit
platform_allow list. This will enable twister to automatically select
new boards that add support for Arduino ports.
The reel_board and reel_board_v2 are excluded due to a conflict between
display drivers (onboard display vs. shield display).
The ubx_evkannab1_nrf52832 board is excluded due to a conflict between
the arduino_spi and arduino_i2c ports, which cannot be used
simultaneously.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Rename the NXP LPCXpresso55S16 board definition from
lpcxpresso55s16_ns (non-secure) to lpcxpresso55s16 and remove TF-M
configuration options.
While the LPC55S16 does have Arm TrustZone support, there is no TF-M
support available upstream yet.
Fixes#35100
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
If the label property is missing in a "pwm-leds" compatible DT node
(which is almost always the case), then the device name is now set to
DT_NODE_FULL_NAME instead of "LED_PWM_$inst" previously.
This allows applications to use the DEVICE_DT_NAME macro to retrieve
the device name instead of gessing an arbitrary string.
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
Fixes sample execution ending early with error, as it attempted
to mount the LittleFS partition second time, after it has already
been mounted by the auto-mount feature.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Add minimum harness and to get the sample passed when run using
twister.
Adding console validates uart init with DEVICE_RUTIME=y.
Additionally, clarify comment about DEBUG activation.
Fixes#35033
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Converts the Bluetooth peripheral_hr sample.yaml to select boards for
the frdm_kw41z shield configuration by depending on the arduino_serial
feature instead of using an explicit platform_allow list. This will
enable twister to automatically select new boards that add support for
an Arduino serial port.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
"child resuming" text is printed when dummy_device_pm_ctrl is
called. The driver is using the async api, this means that this call
will happen only when the worqueue runs what will happen only when
this thread blocks waiting on the conditional variable.
The last thing is, the dummy driver was putting the parent driver
asynchronously consequently the "parent suspending" message would just
print after "Device PM sample app complete". Just use the sync API to
get these messages printed in the expected order.
Fixes#35336
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Converts the bmg160 sample application to check the sensor device at
build time instead of runtime. This fixes a Coverity issue for logically
dead code introduced in commit 5832e588e3.
Fixes#35118
Coverity-CID: 235919
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Converts the adxl372 sample application to check the sensor device at
build time instead of runtime. This fixes a Coverity issue for logically
dead code introduced in commit 72795c3e6c.
Fixes#35119
Coverity-CID: 235932
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The sockaddr address length was not initialized properly
when receiving packets.
Coverity-CID: 232698
Fixes#35159
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If we don't get a dev pointer from device_get_binding() we should
not dereference it. Just drop the name from the printk message
as in the future this is likely to use DEVICE_DT_GET().
Fixes#35112
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The required configuration is already selected by the Kconfig file for
all nrf devices that support TEMP peripheral.
Signed-off-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@nordicsemi.no>
The TEMP sensor is not present in configurations like
nrf5340dk_nrf5340_cpuappns.
Signed-off-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@nordicsemi.no>
Introducing MBEDTLS_PROMPTLESS and CUSTOM_MBEDTLS_CFG_FILE settings.
The MBEDTLS_PROMPTLESS can be set to true whenever configuration of
mbedTLS is done from a subsystem or module.
Such an example is OpenThread, which selects mbedTLS for some predefined
crypto settings using OPENTHREAD_MBEDTLS=y.
Unfortunately, extensive use of select can easily cause stuck symbol
syndrome making it harder than neccesarry for users to later reconfigure
as they easily get stuck in incompatible configurations.
Providing a MBEDTLS_PROMPTLESS allows such configurations to disable the
MBEDTLS prompt itself when selected but avoid stuck symbol if user
select another security configuration.
Similar with CUSTOM_MBEDTLS_CFG_FILE which ensures that user must
explicitly select this symbol before providing a custom mbedTLS config
file.
Today, other parts the Kconfig tree may set a default value for
MBEDTLS_CFG_FILE but that value is stuck and thus changed Kconfig
selections elsewhere in the tree will not adjust the value.
Introducing CUSTOM_MBEDTLS_CFG_FILE ensures it is known when the user
has provided the value.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Instead of exposing publicly the TF-M NS interface include
directories, we include them when we build relevant projects.
This is required, as the TF-M include directories contains
psa crypto sources that are also provided by the mbedtls
crypto module. The downside of this solution is that the
TF-M includes need to be added explicitly in each application
that uses TF-M APIs.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
In Mbed TLS:
commit eccd88871767e2fba5f3a079cfdfcb77c376cf20
Author: Gilles Peskine <Gilles.Peskine@arm.com>
Date: Tue Mar 10 12:19:08 2020 +0100
Rename identifiers containing double-underscore
changes the name of a symbol we use. As part of upgrading to newer
versions of Mbed TLS, change the name of the symbol we use.
A better fix would be to not use this symbol at all, and perhaps define
our own symbol the same way this internal symbol is defined within the
library.
Signed-off-by: David Brown <david.brown@linaro.org>
Introducing MBEDTLS_PROMPTLESS and CUSTOM_MBEDTLS_CFG_FILE settings.
The MBEDTLS_PROMPTLESS can be set to true whenever configuration of
mbedTLS is done from a subsystem or module.
Such an example is OpenThread, which selects mbedTLS for some predefined
crypto settings using OPENTHREAD_MBEDTLS=y.
Unfortunately, extensive use of select can easily cause stuck symbol
syndrome making it harder than neccesarry for users to later reconfigure
as they easily get stuck in incompatible configurations.
Providing a MBEDTLS_PROMPTLESS allows such configurations to disable the
MBEDTLS prompt itself when selected but avoid stuck symbol if user
select another security configuration.
Similar with CUSTOM_MBEDTLS_CFG_FILE which ensures that user must
explicitly select this symbol before providing a custom mbedTLS config
file.
Today, other parts the Kconfig tree may set a default value for
MBEDTLS_CFG_FILE but that value is stuck and thus changed Kconfig
selections elsewhere in the tree will not adjust the value.
Introducing CUSTOM_MBEDTLS_CFG_FILE ensures it is known when the user
has provided the value.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Remove this intrusive tracing feature in favor of the new object tracing
using the main tracing feature in zephyr. See #33603 for the new tracing
coverage for all objects.
This will allow for support in more tools and less reliance on GDB for
tracing objects.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
If thread names are enabled, set them up so we can get nice tracing
output and know which thread is which.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add support for new tracing macros in test backend. Move header from
sample into the subsystem and make it available for general testing with
any application.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This sample turn on/off the LED every two seconds and then sleeps. When
the LED is on we don't want the system putting it down when goes to
sleep. So, just setting this device as busy.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
The sync API was using k_poll_signal and in certain conditions is
possible multiple threads waiting on a signal leading to an undefined
behavior.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
The context parameter used across device power management is
actually the power state. Just use it and avoid a lot of
unnecessary casts.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Add mimxrt685_evk_cm33 board to the platform_allow list
for the littlefs sample application.
Signed-off-by: Saurabh Jagdhane <saurabh.jagdhane@nxp.com>
Restrict sample execution in CI to boards that have
"st,stm32-lptim" enabled so we're sure it is a STM32 target.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit allows a subsystem to specify additional CMake flags to be
given to the TF-M build.
The additional CMake flags can be provided through the TFM_CMAKE_OPTIONS
property on the zephyr_property_target.
Using the zephyr_property_target allows Zephyr modules to append extra
TFM_CMAKE_OPTIONS regardless of the CMake processing order.
It splits the ExternalProject_Add into a two step process with the CMake
invocation executed using add_custom_target() and the build process
using ExternalProject_Add(). The reason for this split is because CMake
generator expressions passed through ExternalProject_Add to CMake will
quoted so that `$<TARGET_PROPERTY:<tgt>,<prop>>` becomes
`"-DFOO=bar -DBAR=foo"` instead of `-DFOO=bar -DBAR=foo` which again
results in CMake failures.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
The Kconfig option SHELL_BACKEND_SERIAL had been defaulting to y,
causing shell to block mcumgr from processing serial input.
Fixes: #34670
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
With the change to use GPIO_DT_SPEC_GET_OR a number of platforms
failed to build these samples. This was due to the GPIO drivers not
being enabled by default. Add CONFIG_GPIO=y to the prj.conf to fix
the issue.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
TF-M NS interface is initialized by the TF-M module
code, so it does not need to be re-initialized in the
sample code.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Converts the sample to the new k_work API, and introduces a blink
boolean to catch cancel failures.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Add an application that uses Direction Finding API for reception
and sampling of CTE in connectionless mode (periodic adverising PDUs).
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Refactor and simplify the bluetooth buffer configurations to improve the
easy of configurations and eliminate invalid ones.
By moving configurations out of host and controller specific
configurations and into a common one it becomes easier to configure
the host and controller separately as the same configurations can be
used as would be for a combined build.
All HCI configurations are now given exluding the matching HCI header,
which eases the configuration as the application don't have to know the
different header sizes.
The BT_RX_BUF_LEN is split into ACL and Event, as well as the suprising
use of Command size.
BT_L2CAP_RX_MTU is removed as the stack does not support reassembling of
HCI ACL data to larger L2CAP PDUs. The application will have to set
ACL RX size and account for the L2CAP PDU header itself.
BT_EATT_RX_MTU was removed as it is only used for setting a different
default value for another option which leads to the stuck kconfig symbol
problem.
The configurations can be updated according to the table below:
** New configuration | ** Old configuration
All configurations
BT_BUF_ACL_RX_SIZE | BT_L2CAP_RX_MTU + 4
BT_BUF_ACL_RX_SIZE | BT_RX_BUF_LEN - 4
BT_BUF_EVT_RX_SIZE | BT_RX_BUF_LEN - 2
BT_BUF_CMD_TX_SIZE | BT_RX_BUF_LEN - 3
BT_BUF_CMD_TX_COUNT | BT_HCI_CMD_COUNT
BT_BUF_EVT_RX_COUNT | BT_RX_BUF_COUNT
BT_BUF_ACL_RX_COUNT | BT_RX_BUF_COUNT
BT_BUF_ACL_RX_COUNT | BT_ACL_RX_COUNT
BT_BUF_EVT_DISCARDABLE_SIZE | BT_DISCARDABLE_BUF_SIZE - 2
BT_BUF_EVT_DISCARDABLE_COUNT | BT_DISCARDABLE_BUF_COUNT
Controller-build
BT_BUF_ACL_TX_SIZE | BT_CTLR_TX_BUFFERS_SIZE
BT_BUF_ACL_TX_COUNT | BT_CTLR_TX_BUFFER
HCI-bridge
BT_BUF_ACL_TX_SIZE | BT_HCI_ACL_DATA_SIZE
BT_BUF_ACL_TX_COUNT | 6
Fixed invalid configurations setting either BT_L2CAP_RX_MTU or
BT_CTLR_DATA_LENGTH_MAX larger than BT_RX_BUF_LEN could lead to buffer
overruns.
Fix advertising report max data length calculation.
This always used the BT_DISCARDABLE_BUF_SIZE macro but this feature
can be turned off and advertising reports will be allocated from the RX
buffer in that case. Also controller-build does not have this buffer
(in hci_raw.c). Also the wrong HCI header was used in the calculation,
HCI event header should have been used instead of HCI ACL header.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Update the periodic sync sample to use the new delayable work API
for blinking the LED.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Use `pm_device_*` prefix for the device runtime PM API. This adds the
API to the `pm` namespace, making it clear part of the PM subsystem.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Commit 09ba258b05 changed the maxdepth
of the entire samples toctree to 4 from 2 while making a fix to the
tensorflow docs.
Unfortunately that makes the docs index page for the samples too long,
as there are a lot of samples. It's better to just link each one by
one and let the user click to the one they want to find out
information on building and running the sample. Since the individual
README for each sample is usually quite short; it's not a lot of
scrolling, and the per-sample toctree is already available in the
sidebar anyway.
Fix this issue with the index page by restoring the original maxdepth.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Looks like I forgot to finish a sentence. There's nothing really
special besides the top level requirement for an enabled node which is
mentioned at the top of the page. Add a reference to the bindings
index while we're here to make it clearer what such nodes contain.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Get the correct flash device from the storage partition node.
The current code is relying on the invalid assumption that the
chosen zephyr,flash-controller node is the device which contains
the storage partition.
Reported-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Add a real README, convert the device getter to DEVICE_DT_GET_ANY,
and enable assertions to make debugging easier on new users.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Use a gpio_dt_spec, dropping device_get_binding. This in turn lets us
write everything in a single main() without sacrificing readability
since the LED is optional.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Replace DT_CHOSEN_ZEPHYR_CAN_PRIMARY_LABEL with DEVICE_DT_GET on the
chosen node itself.
This is causing a build error in CI for the waveshare_open103z board
because it disables CAN by default in favor of USB. Throw in an
overlay reversing that decision for the sake of this sample to keep
things building. (Though the build previously succeeded, the
device_get_binding() call would simply have failed.)
Replace the LED access with GPIO_DT_SPEC_GET_OR. This changes the
semantics slightly so that the simulated LED implemented via printk()
is run if either the node is missing or the pin cannot be configured,
instead of just running when the node is missing. An unready LED port
when the node is defined still returns early from main.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Replace device_get_binding with DEVICE_DT_GET(). Fix and clean up
error handling and debug printing during initialization.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Require board overlays to configure the sample in the /zephyr,user
node, and access the device with DEVICE_DT_GET instead of
device_get_binding(). Update the documentation and move existing board
configuration to overlays.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Use the new GPIO_DT_SPEC_GET_OR() macro to clean up the node detection
code by eliminating conditional compilation. This increases code
coverage on platforms where not all the devicetree nodes are
available.
Clean up some whitespace while we're at it.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
There is a choice to log btmon logs over UART or RTT.
You can choose number of RTT buffer, set its name and size.
Replaced CONFIG_BT_DEBUG_MONITOR with CONFIG_BT_DEBUG_MONITOR_UART
for UART usage and CONFIG_BT_DEBUG_MONITOR_RTT for RTT.
Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
The MAX17262 is an ultra-low power fuel-gauge IC which implements the
Maxim ModelGauge m5 algorithm. The IC monitors a single-cell battery
pack and supports internal current sensing for up to 3.1A pulse
current. The IC provides best performance for batteries with 100mAhr
to 6Ahr capacity.
Signed-off-by: Matija Tudan <mtudan@mobilisis.hr>
Adds mimxrt1060_evk and mimxrt1064_evk boards to the platform_allow list
for the smp_svr sample application.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Since Pygments 2.7.0 devicetree syntax is supported, so there is no need
to use a custom lexer. Version 2.9.0 introduces a fix that is required
for some devicetree snippets.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
In this example, python test case get the running directory by handling
the "--cmdopt" option passed by pytest.
Signed-off-by: YouhuaX Zhu <youhuax.zhu@intel.com>
Switch to using I2C0 as this I2C controller on the FRDM-K64F is actually
configured (pinmux) for use and is available on an arduino header if
someone would wire up an adxl372 to it.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add an application that initializes Bluetooth Subsystem,
creates an Extended Advertising set, starts Periodic
Advertising and creates BIG to demonstrate ISO Broadcaster
functionality.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The cbprintf packaging needs CONFIG_CBPRINTF_PACKAGE_LONGDOUBLE
to be enabled to work with long double. So #ifdef that inside
CONFIG_FPU.
Also add to the sample.yaml to enable testing with FPU and
long doubles.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Allow SMP processing for SOF on ADSP. Note, that after this
SOF will build with SMP support enabled on all cAVS versions,
but secondary cores will remain disabled unless an SMP
topology is loaded by the host.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Coprocessor sample was lacked of test configuration which makes
buildkite/zephyr to fail. This commit fixes it by providing test
configuration for this sample.
Signed-off-by: Lukasz Maciejonczyk <lukasz.maciejonczyk@nordicsemi.no>
The device has sent RESET_POWER_UP message before the communication
with the host hadn't been established. It could be observed with
pyspinel which displayed `Framing error`.
This commit fixes the bug by initializing NCP after the host stated
is ready to communicate.
This commit reverts initialization the USB stack into function
otPlatUartEnable to be consistent with others OpenThread platforms.
OpenThread co-processor samples are not affected by #27071 as they use
USB for SPINEL communication with host and not for UART console.
Note:
When co-processor communicates by USB CDC ACM and it is hard reset
(what is happening in current Zephyr OpenThread platform)
the connection needs to be properly handled by the host.
For posix platform used together with RCP it was implemented in:
https://github.com/openthread/openthread/pull/6454
and for NCP:
https://github.com/openthread/wpantund/pull/492 .
Signed-off-by: Lukasz Maciejonczyk <lukasz.maciejonczyk@nordicsemi.no>
Fix index.rst and README.rst to put TensorFlow samples under
External Module samples next to Nanopb sample to avoid 4-level
indentation in the sidebar.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
Reboot functionality has nothing to do with PM, so move it out to the
subsys/os folder.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This adds a sample application on dictionary-based logging.
The README file includes instruction on how to run the log parser
to generate human readable log messages.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add pinctrl-0 properties for configuration of UART, I2C, SPI, FTM,
DAC, ADC, ACMP, and PWT peripherals. These settings are based on what
is defined in the board/pinmux.c file.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
When building and running the rpmsg_service sample on MPS2 AN521
use the mps2_an521_remote target to build the Zephyr image
for the remote core.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
When building and running the openamp sample on MPS2 AN521,
use the mps2_an521_remote target to build the Zephyr image
for the remote core.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This application shows how to use SO_TXTIME option, which can be
used to specify the time when the network packet should be sent
out by the network device driver.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
pm_power_state_force no longer requires the idle thread to run.
Just removing the following k_sleep for two reasons, first it is
not necessary, second it tests that pm_power_state_force works
as it should.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
pm_power_state_force no longer requires the idle thread to run. Just
removing the following k_sleep for two reasons, first it is not
necessary, second it tests that pm_power_state_force works as it
should.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This option was only able to collect statistics of transmitted
data. The same functionality is available if one sets the
CONFIG_NET_PKT_RXTIME_STATS and/or CONFIG_NET_PKT_TXTIME_STATS
options.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The conn_raw_input() in connection.c will clone the incoming
packet so that it is possible to receive socket data in
multiple packet sockets. This is all fine except that if the
socket is never calling recv(), then the cloned net_pkt is never
processed and we will have a memory leak.
What this all means in practice, is that we should call recv()
for every packet socket in order to flush the socket for any
incoming data even if the socket is just sending data.
Fixes#34462
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Uninitialization of uart transport was missing disabling of TX
interrupt. It had to be done by the user before using uart.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Add new kconfigs
Include the ns-app built by TF-M build system for regression tests
Update tfm_ipc sample to use new kconfig
Signed-off-by: Andreas Vibeto <andreas.vibeto@nordicsemi.no>
We need 1 byte of headroom for the SPI HCI protocol.
This is not added automatically on the slave side of the SPI connection.
Signed-off-by: Jan Müller <jan.mueller@nordicsemi.no>
These changes turn out to have been incompatible with the way pinctrl
drivers are going to work, so we need to go back to what we had before
until we can agree on a better approach.
Squash of the following reverts:
Revert "boards: nrf: fix deprecated I2C properties"
This reverts commit 2a4ac9ac02.
Revert "samples: switch nrf overlays to sda-gpios, scl-gpios"
This reverts commit 01bb08e7d8.
Revert "boards: nrf: switch to sda-gpios, scl-gpios"
This reverts commit 17a66304c4.
Revert "i2c: nordic: switch to phandle arrays for pinmux"
This reverts commit 821c03a14a.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Replace all existing deprecated API with the recommended alternative.
Be aware that this does not address architectural errors in the use
of the work API.
Fixes#34097
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This sample has implemented USB HID class callbacks that
actually have no function and should not return 0.
Remove unused and wrong implemented callbacks.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Move cmsis OS api headers under include/portability. Those are not
libraries and only serve to provide a level of abstraction using the
CMSIS OS APIs to existing Zephyr interfaces.
Removed one level and put them directly under include/portability.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add rak4631 board from RAKWireless based on nrf52840 and SX1262.
Board Documentation is completed
Signed-off-by: Guillaume Paquet <guillaume.paquet@smile.fr>
Normally main.c file doesn't have a header, beacuse it doesn't need to
be declared to other modules.
And in this sample it makes more sense to use name msgdev.h instead of
main.h as the header file for msgdev.c.
Signed-off-by: Paul He <pawpawhe@gmail.com>
The sample uses generate_inc_file_for_target for some "webpages" that
get included. However, the directory that the generated files are
put into: ${ZEPHYR_BINARY_DIR}/include/generated/web_page isn't
created and thus the build fails.
Add a simple 'file(MAKE_DIRECTORY ..)' to create the dir.
Fixes#34345
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Removing CONFIG_TRACING_CPU_STATS in favor of
CONFIG_THREAD_RUNTIME_STATS which provides per thread stats. The same
functionality is also available when Thread analyzer is enabled with the
runtime stats enabled.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add nucleo_l552ze_q_ns boards to the list of platforms
that can build and run the psa_level1 tf-m integration
sample. We add a dts overlay as well.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
We do not need to force TFM Isolation Level 2 for the
STM32 board that can build with TM-M. We remove the
respective Kconfig setting. We also remove the Kconfig
overlay for STM32L562 board in the psa_level1 sample,
which was used for forcing Isolation Level 1; this is
not needed any more.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
The sample showed the error between the two clocks, but did not show
how to use the skew to reconstruct one clock from the other and the
resulting error.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Remove board code and a few associated samples/tests that explicitly
call pinmux_pin_set() to set a given pin as GPIO. This is handled as
part of gpio_mcux_configure() so we don't need to do it again.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
A bug was introduced when encoding/decoding moved to separate
functions where sizeof no longer had the correct argument.
The size of the encode buffer is passed to the encode function.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Replace all existing deprecated API with the recommended alternative.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The functionality of the MPU depends on userspace, which has not
been implemented on AArch64. Therefore we skip that case for now.
Signed-off-by: Henry Wang <Henry.Wang@arm.com>
The stm32 wwdg driver was currently tested only on disco_l475_iot1.
Additionally add nucleo_f091rc, such that one board with an CM0 core is
tested. And add nucleo_g431rb, that one board is included that has
newer register mapping and a 128 prescaler.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
Limit adafruit_2_8_tft_touch_v2 sample variant execution to the boards
that have this shield available.
In order to run the test in CI bench, add the following in
twister map.yml file on matching board:
fixtures:
- fixture_shield_adafruit_2_8_tft_touch_v2
For instance:
- connected: true
fixtures:
- fixture_shield_adafruit_2_8_tft_touch_v2
id: 0673FF323535474B43171415
platform: nucleo_f429zi
product: STM32 STLink
runner: openocd
serial: /dev/ttyACM0
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Change to use the BT_ATT_FIRST_ATTTRIBUTE_HANDLE and
BT_ATT_LAST_ATTTRIBUTE_HANDLE instead of the literal values where
applicable.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add the nanopb library and generator tools as a module.
Nanopb is a small code-size Protocol Buffers implementation in ansi C.
It is especially suitable for use in microcontrollers,
but fits any memory restricted system.
Nanopb home: https://jpa.kapsi.fi/nanopb/
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Take the int-pin information (i.e. what pin between INT1
and INT2 the drdy is attached to) directly from DT.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Ups the CDB_NODE_COUNT config to fit 16 nodes, to make the sample more
usable for general mesh testing.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Adds blocking operation to the self configuration step by waiting for
the status response. This ensures that the provisioner is fully
configured, and reduces the number of loopback buffers required for the
self-configuring.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Runs the Provisioner sample's main thread in a cooperative priority to
avoid calling the Bluetooth APIs from a preemptive thread.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Instead of only configuring the Health Server model of the provisioned
device, the Provisioner will instead walk the target's composition data,
and bind each model to the same AppKey. This allows the provisioner to
be used with the base mesh sample, and demonstrates the new composition
data page 0 API.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Adds a new sample configuration to build the fat_fs sample with the
adafruit_2_8_tft_touch_v2 shield and SDMMC SPI driver in CI. It has been
tested with frdm_k64f and mimxrt685_evk_cm33 boards, but should work
with any board that supports Arduino SPI and Arduino GPIO features.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Add an overlay-capture.conf file that can be used to allow network
packet capturing in this sample app.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
A simple application that allows you to use net-shell to
configure network packet capturing. The captured packets are
sent to external systems for processing. This can be used
for debugging network protocols.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Some tools consider this as commented code because of the ifdef, so
remove that and fix a coding guideline violation.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This functions is being called across the tree, no reason why it should
not be a public API.
The current usage violates a few MISRA rules.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Several platforms don't have flash drivers and these platforms the DFU
sample will not build or even pass Kconfig on. Exclude them until they
have flash driver support.
Fixes#33422
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Adds a sample of setting up and using an ISO central as
a source of ISO data. This will periodically send ISO
data to a connected ISO peripheral with varying sizes.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This patch removes scenario which was testing deprecated
API behaviors. Needed as As flash_write_protection_set() was
deprecated and became no-operation.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
This sample is a bit messy; clean it up.
Remove unused includes, add missing include guards, clean up the
separation of responsibilities between main.c and the button and LED
helper files by moving code around, and replace the now-outmoded
device_get_binding() calls with GPIO_DT_SPEC_GET().
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Drop device_get_binding() for microbit, using a gpio_dt_spec instead.
Rename the 'button' global to 'button_work' since it's a k_work
related to the button and does not actually represent the button
itself.
Fix a typo in the docs.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Save a bit more SRAM on bbc_microbit by tuning some Kconfigs.
Mark some arrays const to try to avoid stack allocating them while
we're here.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Use DEVICE_DT_GET on the chosen node directly.
The only in-tree board using the Kconfig option is rv32m1_vega_ri5cy.
It already sets the chosen node in the application overlay, albeit
incorrectly, so just fix it there and remove the now-redundant Kconfig
setting. That in turn triggers other build errors for this board, but
they don't seem to be related to this sample.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Use DEVICE_DT_GET_ANY instead of hard-coding a device label property.
As far as I can tell from in-tree drivers, "TEMP_0" is nRF specific
and refers to nodes with compatible "nordic,nrf-temp", so use that and
clean up the driver Kconfig while we're here.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
To allow using TFM NS interface without enabling
CMSIS_RTOS V2 support. And to allow using TFM NS
code that uses logging.
Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Populates the onoff server stubs in the Bluetooth Mesh sample, and
implements generic LED based hardware support to include more boards.
Fixes#31031.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Now that we can use the adafruit_2_8_tft_touch_v2 shield with
mimxrt685_evk_cm33 and frdm_k64f boards, start building the display
driver and lvgl samples for these boards in CI.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Rename lib.
Disable AUDIT_LOG in regression sample because of a bug upstream.
Update stm32l562e_dk_ns overlay.
Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
Don't allow user to choose CPU_ARCEM / CPU_ARCHS options
but select them when exact CPU type (i.e. EM4 / EM6 / HS3X/ etc)
is chosen.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
shell_uart_release command shows how shell can be uninitialized and
release transport resources (uart) and reinitialized at runtime.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Using the new obscured user shell input feature,
provide examples of using it in login and logout commands.
Signed-off-by: Pete Skeggs <peter.skeggs@nordicsemi.no>
This patch removes sdhc_api references since such API
does not actually exist. SD card controller drivers
use disc driver interface. Accordingly, the SDHC documentation,
which actually describes how to connect a SD card via SPI
and has little to do with SD host controller (SDHC),
is also moved to disk access page and adapted.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Zephyr already has a directory for storage API relevant headers.
Move disk_access.h header to include/storage where it fits better
structurally.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Remove legacy TCP stack as it is replaced by the new TCP2 stack.
The TCP2 stack has been the default stack since 2.4 release.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This patch adds a new sample application demonstrating basic
usage of FT800 display controller including touchscreen events.
Signed-off-by: Hubert Miś <hubert.mis@gmail.com>
Add function to get Modbus RTU interface index according
to interface name. This can be used to clearly identify
interfaces in the application.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit enables the TF-M IPC sample application on stm32l562e_dk
board.
It provides device tree flash partition as an overlay in order to
configure and flash the bl2, secure/non secure firmwares.
Signed-off-by: Yestin Sun <sunyi0804@gmail.com>
Add simple application to demonstrate quadrature decoder sensor.
Tested on Atmel SMART SAM E70 Xplained board.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
The exported structures that were originally introduced for OpenOCD have
since then been reused for other debugger plugins, including PyOCD and
Segger J-Link.
Rename the Kconfig option and the implementation from openocd to debug
thread info, so that it reflects the fact that this is no longer
specifically tied to OpenOCD.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Document that for any Bluetooth sample to work on the nRF5340 device,
the additional application for the nRF5340 network core is required:
hci_rpmsg.
Signed-off-by: Michał Grochala <michal.grochala@nordicsemi.no>
This sample application periodically reads raw data from the FDC2X1X
sensor in polling mode or optionally with data ready trigger.
It is able to read the 12-Bit and 28-Bit, as well as the 2-Channel
and 4-Channel versions (FDC2112, FDC2114, FDC2212, FDC2214).
The 4-channel versions are chosen through devicetree properties.
The default is FDC2112.
Signed-off-by: Igor Knippenberg <igor.knippenberg@gmail.com>
HID report descriptor in the sample has unnecessarily output report
which is not used anywhere. This patch removes unnecessary report.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
HID sample has on_idle callback implementation present in the code,
but has not turned on USB_DEVICE_SOF and so does not have
corresponding code in sample self and class/hid/core.c covered.
Also on_idle implementation in HID sample has not taken into
account send_report() which also calls hid_int_ep_write().
This patch enables USB_DEVICE_SOF and revises both on_idle and
the regular report function.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
The directory listing object is an internal object which
content is the aggregation of all the metadata of all objects
(including the directory listing object itself). The client
can read this value to get a list of all objects with names,
lengths, and other metadata.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This fixes the limitation of sending an extended CAN frame.
Because the default value of `CONFIG_SHELL_ARGC_MAX` is 12 the maximum
number of bytes for an extended CAN frame is 7.
Increasing it to 13 to allow all 8 bytes to be sent from the shell.
Tested on nucleo_f767zi.
Signed-off-by: Cezar Burlacu <cezar@embeddedp.ro>
Use the reschedule solution as there may be cases where a newer
deadline should supersede an older one.
The implementation has no locking and so has data races between the
handler and external events. Emit a console diagnostic in one case
where the race can be detected.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Improve the readability of the LMP90100-EVB RTD sample by adding
comments and further definitions instead of magic values within the
code.
This furthermore fixes an off-by-one error for the maximum ADC value
used in the formula for calculating the resistance of the RTD (8388607
vs. 8388608).
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Trigger BT_ASSERT with message to inform kernel when encountering an
unrecoverable condition in order to dump all pending logging messages.
In this change, the log level is configured by CONFIG_BT_LOG_LEVEL
Signed-off-by: Ryan Chu <ryan.chu@nordicsemi.no>
Add supported peci response codes 0x80 (Out of resources timeout)
and 0x81 (Resources required to service the command are in low
power state).
Signed-off-by: Diwakar C <diwakar.c@intel.com>
Originally added in 7733b94224.
This filter is not well-formed. It's meant to match nodes like
/leds/led_0 in this DTS:
/ {
aliases {
led0 = &led0;
};
leds {
compatible = "gpio-leds";
led0: led_0 {
gpios = <...>;
label = "LED 0";
};
};
};
Uses look like this:
filter: dt_compat_enabled_with_alias("gpio-leds", "led0")
But notice how the led_0 node doesn't have compatible "gpio-leds";
it's actually the *parent* node that has that compatible.
Replace this with a new filter, dt_enabled_alias_with_parent_compat(),
which is used like this:
filter: dt_enabled_alias_with_parent_compat("led0", "gpio-leds")
This has a name and argument order that makes the meaning of the
filter clearer.
Replace in-tree users with the new filter.
Deprecate the old filter and warn about its use using the standard
logging module.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Civetweb does not work properly with mbedtls if Posix APIs
are enabled. For example time function prototypes are not found
by the mbedtls module if we enable mbedtls in the sample.
Disable TCP ISN RFC6528 support because of this for civetweb
samples, as setting that option will pull in mbedtls and
we get a compilation warning because time() is not declared
by any header file that mbedtls is including.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
smp and mpu are architecture specific samples and do not apply to
majority of support platforms, so move them to arch/.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This should align with subsys/display which we do not have yet. Plan is
to move lib/gui into subsys/display.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Move samples under subsys/audio. We still do not have this as a
subsystem, but it is on the horizon.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The line break inside the :zephyr_file: directive causes a space
to be inserted into the link to the file, which means the link
does not work.
Signed-off-by: Ruth Fuchss <ruth.fuchss@nordicsemi.no>
Remove SPI_[0-8] and SPI_[0-8]_OP_MODES Kconfig symbols as no driver
uses them anymore. We also cleanup board and sample code to remove
use of these symbols.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Some boards prefers immediate mode (native_posix) but this sample is
intended to use deferred mode. Add explicit setting.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This platform has a tiny handful of remaining tests that fail. We
will track them as issues, but let's exclude them from integration
testing to allow full runs to complete. Often a hung device in one
test will break an entire twister run.
Tests with known (and tracked) failures:
samples/application_development/external_lib
samples/posix/eventfd
samples/userspace/hello_world_user
tests/kernel/fatal/message_capture
tests/net/socket/socketpair
tests/portability/cmsis_rtos_v2
These tests never fail in isolated testing, but are reliable timeouts
when run in sequence in a big twister run. It's possible that the bug
here may be in twister or the flash/serial scripts:
tests/crypto/tinycrypt
tests/subsys/logging/log_immediate
tests/subsys/logging/log_output
See: #32836
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This platform has a newlib which is inexplicably missing a
_gettimeofday_r symbol. Just filter the test there.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
The board specific interface in this sample is not handling errors.
Fix that by making board_init() return a negative error code or zero.
Rework the bbc_microbit specific board file by handling errors
appropriately and avoiding device_get_binding() to move some device
configuration errors to build time.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Currently there is no way to distinguish between a caller
explicitly asking for a semaphore with a limit that
happens to be `UINT_MAX` and a semaphore that just
has a limit "as large as possible".
Add `K_SEM_MAX_LIMIT`, currently defined to `UINT_MAX`, and akin
to `K_FOREVER` versus just passing some very large wait time.
In addition, the `k_sem_*` APIs were type-confused, where
the internal data structure was `uint32_t`, but the APIs took
and returned `unsigned int`. This changes the underlying data
structure to also use `unsigned int`, as changing the APIs
would be a (potentially) breaking change.
These changes are backwards-compatible, but it is strongly suggested
to take a quick scan for `k_sem_init` and `K_SEM_DEFINE` calls with
`UINT_MAX` (or `UINT32_MAX`) and replace them with `K_SEM_MAX_LIMIT`
where appropriate.
Signed-off-by: James Harris <james.harris@intel.com>
Remove stale references to v2m_musica in the ipc samples as the board
support for v2m_musca has been removed.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Remove unnecessary main stack configuration in bluetooth samples.
The HCI power control sample does not need to set the main stack this
low, and setting it causes restriction on what the application can
change in menuconfig. A change in the entropy driver causes stack
overflow.
The HCI uart sample sets the main stack to the default size.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
The README gives as example the command to build
the sample with west. The path of the sample as
stated does not exist. This fixes it to blinky_pwm.
Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
Use the multiple board revisions feature to provide support for the new
hardware possibilities available in nRF9160 DK starting from v0.14.0.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Use devicetree instead of Kconfig to configure the board control
switches in nRF9160 DK:
- add binding for the switches that provide optional signal routings
on this board
- add binding for the GPIO interface that can be used for communication
(e.g. UART based) between the nRF9160 and the nRF52840 on the DK,
and add GPIO mapping for this interface so that its lines can be used
without caring about of actual pin numbers on both sides
- add binding for one GPIO line chosen from the above interface that is
to allow the nRF9160 to reset the nRF52840
- update accordingly dts files and board specific code for both board
definitions associated with the DK
- introduce .dtsi files that can be included from dts overlays in order
to facilitate the use of the above GPIO interface; modify the overlay
in the hci_uart sample to provide an example of use of those files
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Set integration_platforms on these samples to just mps2_an385.
This should be sufficient to make sure these tests build and run.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Set integration_platforms on these samples to just native_posix. This
should be sufficient to make sure these tests build and run.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Set integration_platforms on these samples to just mps2_an385.
This should be sufficient to make sure these tests build and run.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Set integration_platforms on these samples to a single platform, we
prefer native_posix, than a qemu platform mps2_an385 and finally a
hardware platform.
For the 'basic' sample we use native_posix, for the 'rtt' we use
frdm_k64f ad we need a hardware platform that supports 'rtt', and for
the 'usermode' we utilize 'mps2_an385' as we can run in QEMU.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Set integration_platforms on these samples to just mps2_an385.
This should be sufficient to make sure these tests build and run.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Set integration_platforms on these samples to just native_posix. This
should be sufficient to make sure these tests build and run.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
All dma drivers are devicetree based now so we can remove the last
bits of Kconfig associated with the old driver style.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Replace device_get_binding with DEVICE_DT_GET for getting access
to the io-channels/adc controller device.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Set integration_platforms on these samples to just frdm_k64f.
This should be sufficient to make sure these tests build.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
I only see one sample with an overlay using the now legacy sda-pin and
scl-pin properties. Move it to the new style.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Modify an example by adding command that is using shell_getopt funtion.
Extent sample.yaml with getopt configuration.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
Convert ism330dhcx INT_PIN attribute from Kconfigs to Device
Tree binding properties. Here int-pin has been defined as
enum with two possible values: 1 and 2.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Add an example callback implementation that prints out the new maximum
payload given the updated datarate.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
The default shell configuration has heavy flash and memory requirements,
requiring project maintainers to set many configuration options to "n"
to keep flash and memory requirements within reason.
This adds a new configuration option, CONFIG_SHELL_MINIMAL, which will
disable flash and memory heavy options by default, and allow project
maintainers to select/imply only the options they want.
On a quick test from an ARM board I'm working on, enabling this option
cut flash space requirements by ~8 KB, and memory requirements by ~1 KB.
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Set integration_platforms on these samples to just native_posix.
This should be sufficient to make sure these tests build and run.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Set integration_platforms on these samples to just native_posix. This
should be sufficient to make sure these tests build and run.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add an application that uses Direction Finding API for
transmission of CTE in connectionless mode (periodic adverising PDUs).
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
We need to set a proper IPv4 netmask to each VLAN interface
so that IPv4 source address selection will work properly.
If we do not do this, then the network interface could be
selected incorrectly for the VLAN interfaces which could then
mean that the packet might get dropped by the target device.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Adjust the documentation and devicetree overlays so the sample can be
built for any board with an Arduino I2C and SPI pinout, defaulting I2C
and SPI to y to make it easier to switch between the two without
requiring a pristine build.
The user has to choose an appropriate overlay or have a sensor built
in to the board.
Use the newly introduced DEVICE_DT_GET_ANY() in main.c to ask for a
bosch,bme280 without worrying over the details or exposing
DT_DRV_COMPAT-based functionality that is really meant for drivers.
Remove the no-longer-needed board specific overlay for nRF52840 DK;
this is covered by the generic Arduino overlays now.
Fix the datasheet link while we're here.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Now that we have consolidated tf-m signing, the combined
binary is always named tfm_merged, so we need to modify
the QEMU targets in the tfm-integration samples.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Place the new signing code in the TFM module CMakeLists.txt.
Make some small tweaks and add a sentence to the docs.
In the process, make a few changes to the signing code:
- Change some names of files created.
- Minimize the number of files created.
- Use hex files instead of bin files. This is so we don't need to know
the offset when creating hex files from bin files.
Also add signing for MCUBOOT_IMAGE_NUMBER=1 based on the code from the
v2m_musca_b1 board, though, this board does not build with =1 now
because of (I assume) some flash aliasing which places the S and NS
images 0x10000000 apart, where the manual algorithm places them next to
each other. It builds with =2, though.
Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
Set integration_platforms on these samples to just native_posix. This
should be sufficient to make sure these tests build and run.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
A different configuration is applied when running this test
using west or using twister.
Both will use the disco_l475_iot1 overlay, but the extra config
for clock bus tunning is applied only when using twister and
samples is failed when run with west.
Move this extra config from sample.yaml to board .conf file so
it is applied in both cases.
Fixes#32376
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
There was some code to demonstrate the cpu_mask API here, but it was
asymmetric (only thread B was pinned) and assumed exactly two CPUs.
Start both threads pinned to CPUs 0 and 1 from an external main, and
predicate the pinning on there actually being more than one SMP CPU.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Add an object to retain data across both reboots and entry to
SYSTEM_OFF. This only works on nRF52, since nRF51 and nRF53 require
different low-level operations to configure RAM retention.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Add a sample application to test MAX6675 cold-junction-compensated
K-thermocouple to digital converter.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Switch to use DEVICE_DT_GET instead of device_get_binding for pinmux
device. As part of this change drop the "label" property from
the pinmux devicetree node and update the binding and dts files to
reflect that.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Enable PECI and KSCAN drivers to evaluate any side-effect
in LPM entry/exit and power consumption.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Remove support for the Musca-A board. This board is rarely used, few
are available and superceded by Musca-B and Musca-S.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Update sample espi driver test to exercise some SAF functionality
based on the limited hardware available. Note the SAF test will
erase a section of the flash. SAF tests are enabled for the EVB only.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
Introduce a dts board overlay on the nucleo_l053r8 board as this
board was used for testing addition of resolution setting on the
mcp9808 sensor driver.
Signed-off-by: Steven Daglish <s.c.daglish@gmail.com>
This commit adds the nRF IEEE 802.15.4 Service Layer Fault Handler
to the 802154_rpmsg sample.
Signed-off-by: Czeslaw Makarski <Czeslaw.Makarski@nordicsemi.no>
Simplify pm subsystem removing PM_STATE_LOCK option. Constraints API is
small and is a key component of power subsystem.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Fixes problem where UART DFU mage uploads via mcumgr get interrupted
by the mcuboot_util logs, causing uploads stuck and fail on time-out.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The sample was failing twister test with a timeout because there was
no pass/fail criteria for it (nothing was tested). The fix adds
harness on consolse and some output that can be verified.
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
The sample was failing twister test with a timeout because there was
no pass/fail criteria for it (nothing was tested). The fix adds
harness on consolse and some output that can be verified.
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
The sample was failing twister test with a timeout because there was
no pass/fail criteria for it (nothing was tested). The fix adds
harness on consolse and some output that can be verified.
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
Nordic watchdog does support a callback, but it has a time limit that
is too tight for the way this sample uses it. Add infrastructure to
bypass using the callback in this sample.
Also add more diagnostics explaining the status of callback use in the
sample.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The commit adds initialization of fs_dir_t variables in preparation
for fs_opendir function change that will require fs_dir_t object, passed
to the function, to be initialized before first usage.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
The commit adds initializations of fs_dir_t variables in preparation
for fs_opendir function change that will require fs_dir_t object, passed
to the function, to be initialized before first usage.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
We cannot automatically flash both master and remote images
to nRF5340 application and network core, this needs to be
done separately. We therefore, cannot execute the test on
nRF5340, so we switch to make the test build-only on this
platform. We also make nrf5340_cpuapp an integration
platform for the given sample.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Start using DTS values for PCI Vendor ID and PCI BDF. For the PCI
Device ID we do not use DTS since this would require changing overlay
for different SKU board.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Remove missing printout, and add the last line of printout.
Note that it's not possible to run this on hardware using Twister as of
now, since west flash will not flash tfm_s.
Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
Exlude native_posix platform from USB samples but
add build-only test case.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
socket_can_generic.h makes some assumptions that are not always valid
for various drivers with regards to numbering. To clean this up we
add defines for SOCKET_CAN_NAME_0 and SOCKET_CAN_NAME_2 in addition to
SOCKET_CAN_NAME_1.
We also move struct socket_can_context into the drivers themselves
since they know best how many CAN interfaces are getting supported and
what naming/number convention they'd have.
Additionally, this also exposes a few other build issues with the
can_mcux_flexcan driver that get fixed.
Finally, we remove the platform_allow from samples/net/sockets/can
since it is no longer needed.
Fixes#31733
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This patch replaces magic numbers with COAP_TOKEN_MAX_LEN value and
removes unnecessary castings of token buffer type.
Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
RFC 7252 (CoAP) specifies value of the Version (Ver) field in the
protocol header to value 1. This patch defines value of the Version
field to make packet initialization easier. All samples and tests
are updated to use the new COAP_VERSION_1 field when initializing
a CoAP packet.
Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
Fix stack overflow in the TX power control sample.
Current stack usage with 0.11.1 zephyr toolchain was at 100% stack
usage of the DYN TX stack.
Fixes: #31433
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Similarly to what was done for watchdog test,
update watchdog sample to be compatible with stm32 window watchdog
and enable testing by twister.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
APL ADSP doesn't boot with reset-vector.S in the bootloader,
move it over to the main application binary.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Add some changes to adc sample to enable valid verdict generation
using twister:
-Replace 'single_line' keyword with correct 'one_line'
-Remove parenthesis from the sample output to enable regex verdict
-Add timeout to save time in execution
Additionally, add support for disco_l475_iot1.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Remove the deprecated scan filter duplicate enum values and parameter.
This was deprecated for the 2.3.0 release.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
The commit adds initializations of fs_file_t variables in preparation
for fs_open function change that will require fs_file_t object, passed
to the function, to be initialized before first usage.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
In the last step of the example, the system should go into soft off
state in order to match the original intent in the example to go
into the hardware's SHUTDOWN mode.
Fixes#31727
Signed-off-by: Vincent Wan <vanti.coder@gmail.com>
SPARC systems take a huge penalty in stack usage due to register window
saves. A recent patch reverted SPARC-specific increases to various
stack sizes, causing this test to fail.
Other platforms are excluded because of stack limits, so do that here
too.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Mcumgr-cli application doesn't accept log on the communication
channel. Since #30370 was merged log messages are generated from
MCUBOOT_UTIL by default. That made `mcumgr image upload` failing.
Patch disables logging via shell which cure the issue.
It is not necessary if another application on the host intercepts
log messages (like picocom can).
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
After the latest upmerge, OpenThread requires explicit configuration
of the Master Key. This commit adds a Kconfig symbol that can be
used to setup its value. By default no Master Key is configured and
OpenThread generates a random one.
The Sockets Echo samples are configured with a fixed key with this
commit.
Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
If CONFIG_LOG_BACKEND_NET_AUTOSTART is disabled, then the syslog
network backend is not started automatically. This option is
enabled by default but it might be that application needs to
start the backend manually if the network is slow to start or
some special routes needs to be set by the application.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This patch introduces COAP_TOKEN_MAX_LEN definition in coap.h file.
This definition replaces magic number across CoAP protocol
implementation and CoAP samples.
Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
Clean up logging menuconfig by grouping configuration into
sections like: mode, processing configuration, backends.
Additionlly, removed LOG_ENABLE_FANCY_OUTPUT_FORMATTING which is no
longer in use.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Mass-erase the flash prior to running the sample to ensure the storage
partition can be initialized correctly.
Fixes: #30477
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This sample shows how to use the ADC API. Depending on the support of
sequential reads in the driver, 1 or 2 channels are read and printed.
A devicetree overlay is necessary to specify the used ADC channel(s).
Signed-off-by: Martin Jäger <martin@libre.solar>
The flash shell can now build when there isn't a chosen
zephyr,flash-controller available, so we can simplify the filter to
apply this sample to more boards.
Two STM32 H7 board configurations are excluded because the flash driver
isn't supported yet on the M4 core.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Change subsystem to use struct pm_state with substate-id instead of
using only the power state category.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Migrate the whole pm subsystem to use new power states information
from power_state.h and get states and residency properties from
device tree.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Add EDAC shell application demonstrating EDAC API usage. Can be used
for verification of the functionality with error injection mechanism.
Sample is also included in the twister tests.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@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>
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>
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>
This patch brings simple example on per DSA port LLDP filtering based on
MAC address of received packet.
Each lan1, lan2 and lan3 ports handle separately LLDP packets going into
them.
Nonetheless, the K66F ENET handles correctly all other packets types -
to be more specific - ICMP, TCP/IP.
Setup -> ON HOST:
Configure/start the lldpd daemon (debian 10) on host to use
MAC 01:80:c2:00:00:03:
(lldpd -ddd & ) && sleep 2 && \
lldpcli configure lldp agent-type nearest-non-tpmr-bridge
Signed-off-by: Lukasz Majewski <lukma@denx.de>
CoAP protocol defines registry of Content-Format option values.
This patch adds this enumeration to coap header file to make it
available to all applications using CoAP protocol. It modifies
code using CoAP service to use new enumeration.
Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
This patch modifies Bluetooth HCI RPMsg drivers and samples to use
RPMsg Service instead of configuring OpenAMP directly in the driver
or the sample.
Co-authored-by: Piotr Szkotak <piotr.szkotak@nordicsemi.no>
Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
'main' function should retun 'int' and not 'void'. Otherwise
some picky compilers (like ARC MWDT) would warn about that.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Introduce retransmission counter to the coap_pending structure. This
allows to simplify the retransmission logic and allows to keep track of
the number of remaining retranmissions.
Additionally, extend the `coap_pending_init()` function with `retries`
parameter, which allows to set the retransmission count individually for
each confirmable transaction.
Fixes#28117
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
DW16 provides information on mechanisms to enter and exit 4-Byte
address modes, returning the device to reset state, and how to
manipulate the values in the first status register.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
DW15 provides information on entry and exit from QSPI modes. In
particular, it specifies whether and how the status register must be
updated for this feature.
Add a JESD216 devicetree property for the Quad Enable Requirements
value.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Modify led_pwm sample in order to make it usable in device testing:
- Remove parenthesis from the logs as they prevent use of regex
- Add a harness_config multiline regex in order to enable verdict
generation
- Update README
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Currently the following shields will thus be supported
waveshare_epaper_gdeh0154a07
waveshare_epaper_gdeh0213b1
waveshare_epaper_gdeh0213b72
waveshare_epaper_gdeh029a1
Signed-off-by: Kim Bøndergaard <kim@fam-boendergaard.dk>
Signed-off-by: Kim Bøndergaard <kibo@prevas.dk>
The IIS2DLPC drdy interrupt can be routed to either INT1 or
INT2 pin. Currently the selection is done by Kconfig configuration.
This commit is instead moving it into Device Tree as 'drdy-int'.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Since the additional objects are only added for compilation, enable
them in sample.yaml instead, so that they get built by the CI. Remove
them from the actual sample, as they obfuscate the sample purpose and
the objects visible from the server perspective.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
BLE and LwM2M grew in terms of RAM usage so that the sample does not
fit into nRF52832 anymore in the default configuration. This cause
twister to report an error when overflows errors are enabled.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The IPSP example code is explicitly registering the all local-link nodes
address (ff02::1). This is currently already registered by the normal
IPv6 stack at interface initialization, so doing it in the application
is redundant.
Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
This sample is trying to register four multicast addesses:
uart:~$ net iface
...
IPv6 multicast addresses (max 8):
ff02::1
ff02::1:ff01:c41e
ff02::1:ff00:1
ff02::1
Increasing CONFIG_NET_IF_MCAST_IPV6_ADDR_COUNT to 4 to make neighbor
discovery work correctly.
Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
Currently Zephyr links reset-vector.S twice in xtensa builds:
into the bootloader and the main image. It is run at the end
of the boot loader execution and immediately after that again
in the beginning of the main code. This patch adds a
configuration option to select whether to link the file to the
bootloader or to the application. The default is to the
application, as needed e.g. for QEMU, SOF links it to the
bootloader like in native builds.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Conditionally use either DPPI or PPI channel in the sample so that
it can be built for all nRF SoCs. Update documentation accordingly.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Convert the driver so that it creates its instance basing on DT.
Remove no longer needed Kconfig option CRYPTO_NRF_ECB_NAME.
Also update accordingly the crypto sample.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Mark the CANopen sample with program download support as build-only
since it depends on MCUboot being flashed to the board prior to the
generated application firmware image.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Tigerlake H has less RAM and fewer cores. Both should be
supported, selectable at the board level. For now use the H
configuration as more readily available for testing.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1. SOF doesn't have to be built in .bin format
2. don't include soc.c and soc_mp.c twice in cmake
3. remove an unused mailbox.h header
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
CAN_MCP2515_MAX_FILTER is not needed anymore and was probably just a
misunderstanding. Aligned it with the other CAN drivers.
This also was the last difference in the mcp2515 specific config for the
can sample, so that can be deleted as well.
Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
Adds multicore support for lpcxpresso55s69 board.
Documentation to be updated in a later commit.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
Currently a lot of common kconfig options are being set in
board-specific overlays.
This commit puts them in the main prj.conf.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Get rid of weak functions adding a new API to register an object to
receive notifications when the system changes power state.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This fixes an incorrect error message log statement for IPv4 vs.
IPv6 in several net samples.
The error message is in a portion of the files dealing with IPv4
bring-up. If the address is invalid, it logs the invalid address;
however, the IPv4 statement incorrectly refers to ipv6_addr. This
PR corrects it to output ipv4_addr as expected.
Signed-off-by: Steve Winslow <steve@swinslow.net>
The --nrf-family argument has been unnnecessary since 6628a16
(" runners: nrfjprog: boilerplate and recover rework").
Remove a few stragglers that are still using it, to avoid it being
copy/pasted into other board definitions.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Adds the Sound Open Firmware project, built as a Zephyr application,
under samples/subsys/sudio/sof.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Commit https://github.com/zephyrproject-rtos/zephyr/commit/0a018db0f
increases worqueue stack size for overlay-fs.conf
exclusively.
overlay-bt.conf also need to be updated as enables mcumgr FS
command set as well.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Extend the nrf52840dk_nrf52840 sample overlay with a fstab entry for a
littlefs file system on the storage partition.
This eliminates the need for application configuration of the file
system parameters and mount data.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Musca-S1 is a Cortex-M33 based SoC. It's similar to the
Musca-B1, but among other things the embedded flash has
been replaced with embedded MRAM (eMRAM) memory.
The Musca-S1 files have been created based on the Musca-B1
SoC and board files.
Add the Musca-S1 board to the list of allowed platforms
for the TF-M integration examples.
Change-Id: I4f517d28d0a5b8c4a3fc3fab73adb5519acfc3c2
Signed-off-by: David Vincze <david.vincze@linaro.org>
Add sample code which demostrates the use of the offset
register offered in the TMP117.
Also add information about tmp117 in README.
Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
Convert samples to DEVICE_{DT_}DEFINE instead of DEVICE_AND_API_INIT
so we can deprecate DEVICE_AND_API_INIT in the future.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit replaces the 'select SHELL' statement with
'depends on SHELL' in OPENTHREAD_SHELL config option.
This ensures, that shell will not be implicitly enabled
when OpenThread stack is built.
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
Add a sample for demonstrating the usage of the NXP MCUX Analog
Comparator (ACMP) sensor driver. The sample currently only supports the
NXP TWR-KE18F development board.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Reordering of the struct elements to match the Linux format.
The __packed() is not necessary anymore.
std_id and ext_id is merged to id in the frame and filter.
Additionally, the frames are ready for CAN-FD.
Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
The previous API can't change the sampling-point and only allowed
bitrates that fit the time segments.
The new API allows for shifting the sampling-point and adjusts the
number of time quantum in a bit to all more possible bitrates.
The functions to calculate the timings are moved to the can_common file.
They can be used for all drivers.
Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
some tests configured with CONFIG_NEWLIB_LIBC=y,
it's better to add a filter filter: TOOLCHAIN_HAS_NEWLIB == 1
in those tests yaml file.
Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
Add thread runtime statistics to the thread analyser.
With CONFIG_THREAD_RUNTIME_STATS enabled:
Booting from ROM..*** Booting Zephyr OS build zephyr-v2.4.0-2330-g77be0e93e65b ***
thread_a: Hello World from cpu 0 on qemu_x86!
Thread analyze:
thread_b : STACK: unused 740 usage 284 / 1024 (27 %); CPU: 0 %
thread_analyzer : STACK: unused 8 usage 504 / 512 (98 %); CPU: 0 %
thread_a : STACK: unused 648 usage 376 / 1024 (36 %); CPU: 98 %
idle 00 : STACK: unused 204 usage 116 / 320 (36 %); CPU: 0 %
thread_b: Hello World from cpu 0 on qemu_x86!
thread_a: Hello World from cpu 0 on qemu_x86!
thread_b: Hello World from cpu 0 on qemu_x86!
thread_a: Hello World from cpu 0 on qemu_x86!
thread_b: Hello World from cpu 0 on qemu_x86!
thread_a: Hello World from cpu 0 on qemu_x86!
thread_b: Hello World from cpu 0 on qemu_x86!
thread_a: Hello World from cpu 0 on qemu_x86!
Thread analyze:
thread_b : STACK: unused 648 usage 376 / 1024 (36 %); CPU: 7 %
thread_analyzer : STACK: unused 8 usage 504 / 512 (98 %); CPU: 0 %
thread_a : STACK: unused 648 usage 376 / 1024 (36 %); CPU: 9 %
idle 00 : STACK: unused 204 usage 116 / 320 (36 %); CPU: 82 %
thread_b: Hello World from cpu 0 on qemu_x86!
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add a section about executable files produced by the build, as well as
how to access them.
Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
Removed reel_board specific config and dts overlay.
Configurations are moved to reel_board defconfig.
Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
Update documentation using west enhancements and add sections related to
newer overlays.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
Add OpenThread overlays. This allows users to evaluate UpdateHub using
Thread Network.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
Add Bluetooth Low Energy IPSP overlays. This allows users to evaluate
UpdateHub using BLE with IPSP supported by Zephyr.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
Add IEEE 802.15.4 overlays. This allows users to evaluate UpdateHub
using 6lowPAN.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
Add MODEM and Arduino header overlays. This allows users to evaluate
UpdateHub using any MODEM supported by Zephyr which supports UDP and
PPP connection.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
Add WIFI overlay and connection request. This allows users to evaluate
UpdateHub using any WIFI supported by Zephyr which supports UDP.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
Add support to Network Management in UpdateHub sample. This allows
start application based on network events, independent of the media
type selected by users.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
Remove NET_CONFIG_SETTINGS Kconfig option. The net settings should
be enabled from now at project config or at any overlay. This is
necessary to allow better control when application should start.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
A dedicated LwM2M execute callback type has been implemented which
supports execute arguments. The lwm2m engine, lwm2m_client sample and
lwm2m objects have been updated accordingly. Also the API change has
been documented, and the lwm2m engine reference has been updated.
Fixes#30551.
Signed-off-by: Maik Vermeulen <maik.vermeulen@innotractor.com>
Updated lvgl sample.yaml file to build the lvgl sample during
sanitycheck for the native_posix board with the dummy display driver and
Kscan disabled.
Using the dummy display driver and disabling Kscan removes the
dependency towards the availability of libdsdl2 on the host system.
Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
Remove the DTS overlay files for nRF5340 DK and PDK,
since the SRAM partition changes are matching the
default SRAM partitioning in these boards.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
- Remove SYS_ prefix
- shorten POWER_MANAGEMENT to just PM
- DEVICE_POWER_MANAGEMENT -> PM_DEVICE
and use PM_ as the prefix for all PM related Kconfigs
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Use the core k_heap API pervasively within our tree instead of the
z_mem_pool wrapper that provided compatibility with the older mempool
implementation.
Almost all of this is straightforward swapping of one alloc/free call
for another. In a few cases where code was holding onto an old-style
"mem_block" a local compatibility struct with a single field has been
swapped in to keep the invasiveness of the changes down.
Note that not all the relevant changes in this patch have in-tree test
coverage, though I validated that it all builds.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This code used a sys_mem_pool directly. Use a new-style heap instead
to do the same thing.
(Note that the usage is a little specious -- it allocates from the
heap but doesn't appear to fill or check any data therein, just that
the heap memory can be copied from the two memory domains. It's
unclear exactly what this is trying to demonstrate and we might want
to improve the sample to do something less trivial.)
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
The k_mem_pool allocator is no more, and the z_mem_pool compatibility
API is going away. The internal allocator should be a k_heap always.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Mark all k_mem_pool APIs deprecated for future code. Remaining
internal usage now uses equivalent "z_mem_pool" symbols instead.
Fixes#24358
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This adds a sample application for testing
the LiteX clock control driver.
Signed-off-by: Pawel Czarnecki <pczarnecki@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
The immediate logging option cannot be used with network logging
support CONFIG_LOG_BACKEND_NET as that would cause the generated
rsyslog messages to be malformed. The UDP packets would only have
one byte payloads which is not correct. So make sure that user is
not able to select a configuration with immediate mode and network
logging.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add LED blinking while scanning for Periodic Advertising,
and LED ON when Periodic Advertising Sync is established.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added documentation in per_adv and per_sync samples on how
to test Periodic Advertising and Periodic Advertising
Synchronization.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add an application that initializes Bluetooth Subsystem,
creates an extended advertising set, and starts Periodic
Advertising functionality.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Do not enable CONFIG_SERIAL explicitly in the flash_shell sample. Leave
it up to the board definition to enable a suitable shell backend if
CONFIG_SHELL is enabled.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Adjust the sanitycheck filter of the flash shell sample to also depend
on the board having a chosen zephyr,flash-controller devicetree node (as
this is what is referenced in flash_shell.c).
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Shield x_nucleo_iks01a3 could be used with board stm32mp157c_dk2,
but it requires not using the irq-gpio pin.
Provide a specific configuration for this board that does not make
use of this pin, sot set all sensors' triggers mode to NONE.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
By default, prj.conf is the CONF_FILE file use by any application.
Use the file when it is not the case and remove the line that sets
it in CMakeLists.txt as this is not required.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This sample application simulates a network router with several
interfaces which performs IP Header Validation(calculation
of CRC16 header checksum). Each interface is represented
by sender queue(initialized with packet headers) and receiver queue.
Every header first is fetched from sender queue, than the header
CRC16 is calculated, and finally if hashsum is correct
the header is stored in receiver queue.
Each interface is can be processed independently by multiple threads.
This application can be used for testing the correctness
of synchronization mechanisms on multi-core systems.
Signed-off-by: Evgeniy Didin <didin@synopsys.com>
USB MSC sample has been expanded over time. Config overlays
for RAM disk and flash disks were added. Board specific overlays
followed. It was overlooked that they forced a specific
configuration for the nrf52840dk_nrf52840 board,
even if it was not explicitly desired
(for example RAM-disk). This also caused strange behaviour
during automatic MSC USB3CV tests (which explicit selects RAM-disk)
so that nrf5340dk_nrf5340_cpuapp board passed test
but nrf52840dk_nrf52840 failed.
Rework disk and file system configuration, and initialization
code, allow to use FAT file system on top of RAM disk.
This sample can be built with none or one of two supported
file systems, LittleFS or FATFS. Disk subsystem can be flash
or RAM based. LittleFS only works with flash disk.
There are four useful possibilities:
- RAM disk without any file system for testing (default)
- RAM disk with FAT file system
- flash disk with FAT file system
- flash disk with LittleFS
Flash disk configurations is only available (as before) for
nordic,qspi-nor compatible, but only need the device tree overlay
per platform without a config overlay.
This path also revises test cases.
Remove invalid "flash" tag from depends_on key.
Remove unnecessary gpio tag and exclude native platform.
Resolves: #26275
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
If user has enabled DHCPv4, then allow to use its address instead
of giving error if static address cannot be set. Similar fix for
IPv6, so allow user to manually set an IPv6 address.
Because DHCPv4 has already set the IPv4 address to the network
interface, then zperf might not be able to add the pre-configured
address to it. So instead of returning immediately, try to use the
IP address that is already in the network interface. This way we
avoid this error print.
uart:~$ zperf udp download 5001
Setting IP address 2001:db8::1
Setting destination IP address 2001:db8::2
Cannot set IPv4 address 192.0.2.1
Unable to set IP
Setting destination IP address 192.0.2.2
Cannot set IPv4 address 192.0.2.1
Unable to set IPv4
Binding to 192.0.2.1
Cannot bind IPv4 UDP port 5001 (-2)
In this example, the network interface already had a proper and working
IPv4 address 192.168.0.2 in it.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Currently the code uses hw cycles and tries to convert them
to usec. I noticed some failures with this, for example the test
duration was sometimes missed meaning that instead of testing 5
seconds, we bailed out after 2 sec etc. After the kernel k_timeout_t
changes, which added APIs to support usec accuracy, we can use usec
and ticks here. This simplifies the code a bit.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Deactivate all features that are not absolutely needed to run
the shell.
Used CONFIG_CBPRINTF_NANO library to save 1020B.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
Configurations for additional smp_svr sanity builds have been added
to limit possibility of getting not compilable smp_svr sample.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The sample referenced the ADC through an alias that either never
existed or (more likely) has since been removed. Use the node label
instead.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Increases the loopback buffer count to 8 in the mesh demo to give it
enough room for buffering the configuration messages in the
initialization step. As these messages are sent in a non-blocking
manner, they'll all be queued up for execution before any of them is
processed.
Fixes#30207.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
In native_posix, the code calls k_busy_wait() but with wrong
value (k_timeout_t instead of int).
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The current name Socket TagoIO HTTP Client still refering to directory
samples/net/sockets. Rename to TagoIO IoT Cloud HTTP Sample to reflect
better the application sample intention.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
There are some hardware combinations (board/shields) that report the
error undefined initialization levels used at link phase. Add pinmux
Kconfig at project configuration to fix the issue.
Fixes#30029.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
move all CivetWeb samples to one directory
add directory with CivetWeb common includes
update cmake files
move civetweb sample folder to samples/net
Signed-off-by: Alexander Kozhinov <AlexanderKozhinov@yandex.com>
Extends the Segger SystemView configuration for the tracing sample to
more platforms that support Segger RTT, not just nrf52840dk_nrf52840.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Extracts the Segger SystemView configuration for the tracing sample from
sample.yaml into a separate file. Increases the idle thread stack size
to fix overflows observed on i.MX RT boards. Removes
CONFIG_USE_SEGGER_RTT=y which is selected by CONFIG_SEGGER_SYSTEMVIEW.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The test script http-get-file-test.sh will send a POST to inform
whether the test was ok or not. This is needed so that we can
test the TLS functionality properly, earlier use of netcat would
not do TLS handshakes.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The pass/fail return code was not returned to the caller in
Docker based testing so the runner script did not know if the
sample test passed or not.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The pass/fail return code was not returned to the caller in
Docker based testing so the runner script did not know if the
sample test passed or not.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Move actual test cases from the run-sample-tests.sh script to
the network samples directory that are supported by Docker based
testing. Each network sample directory that supports Docker testing,
will contain docker-test.sh script that is sourced by the runner
script. The docker-test.sh script will run the test as needed and
then return return value to the runner script.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If networking pre-emptive thread priorities are enabled,
then use the proper macro to enable them.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The sanity check on this sample gives timeout failure
on reel board because of bad filtering. Because the
sample does not adopt ztest framework, sanitycheck in
our daily test will report this as failure, which lowers
our passrate but this is not a sample with errors.
Signed-off-by: Shihao Shen <shihao.shen@intel.com>
* Add RCP library.
* Conditionally remove non required libraries not required for RCP.
* Drop :option: marker for CONFIG_OPENTHREAD_NCP_SPINEL_ON_UART_ACM
Signed-off-by: Markus Becker <markus.becker@tridonic.com>
Add sample application for sensor lsm6dso. This sample has been
tested on stm32l562e_dk board, where lsm6dso is connect to I2C bus.
Signed-off-by: Yestin Sun <sunyi0804@gmail.com>
Enables the magnetic vector magnitude function in the fxos8700 sensor
sample application to ensure it builds in CI.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Converts fxos8700 power mode options (normal, low noise low power, high
resolution, low power) from Kconfigs to an optional device tree
property.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The sample is currently to tied to nrf9160dk_nrf9160 board. Refact to
allow build with board and select between device power management on or
off. Move nrf9160dk_nrf9160.overlay to proper boards directory and add
nrf9160dk_nrf9160.conf to set the correct device. Device PM needs SYS
PM be implemented and is an specific configuration and for those boards
that have it implemented user can add overlay-pm.conf to enable the
feature.
Fixes#28094.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Samples that include floating-point format specifications may need
cbprintf FP support. Make sure it's available.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The WS2812 SPI driver needs the pixel data to be clocked out on time,
with no gaps between SPI frames. This makes the nordic,nrf-spi
compatible unsuitable for use, since the corresponding driver doesn't
use EasyDMA to clock out the tx buffers.
Force the arduino_spi node in the DT to SPIM mode by setting its
compatible to nordic,nrf-spim. On nRF52832, this driver is disabled by
default due to Product Anomaly Notice (PAN) 58.
We happen to not be affected by PAN 58 in this instance, because we
never read data over the SPIM, only write it. So it's safe to enable
the SPIM driver. This requires a board-specific Kconfig fragment for
nRF52-DK to enable CONFIG_SOC_NRF52832_ALLOW_SPIM_DESPITE_PAN_58.
Fixes: #29877
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Add Kconfig options that will be used by the module
to call the function with the desired parameters.
Refactor the tfm_integration samples and
the supported boards.
Update west.yml to bring in Cmake changes that use the new KConfigs.
Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
Start the listeners after the "connected" event from connection
manager has been received.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If the client sends OK or FAIL, then it means that we are run
under a test system and we should stop running and exit so that
the test runner (scripts/net/run-sample-tests.sh) can report
success or failure.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If user sets CONFIG_NET_SAMPLE_SERVE_LARGE_FILE then the sample
will return 100KB file. By default 2KB file is returned.
This is used by the Docker based testing.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This feature is used by scripts/net/run-sample-tests.sh script
which connects the Zephyr gPTP sample to Linux gPTP daemon running
on a Docker container.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Make it easier to add TF-M in an app by selecting and implying the
necessary configs so the app doesn't have to specify the configs itself.
Remove unneeded configs from the prj.conf files in the tfm samples.
Also, fix case in key file name.
Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
The Nucleo-L031K6 development board has been tested with the MCP9808
sample code and works as expected.
Signed-off-by: Steven Daglish <s.c.daglish@gmail.com>
Add support for nRF5340 DK in the TF-M integration
samples (nrf5340dk_nrf5340_cpuappns build target).
Add the required DTS overlays needed for the samples
to build and run successfully.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Add support for CONFIG_NET_SAMPLE_SEND_ITERATIONS option so that
this sample can be run multiple times against HTTP(s) server
that is running inside a Docker container.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Basic sample program that uses the one led and button from the Pinetime.
Led will turn on everytime the button is pushed.
Signed-off-by: Rafa Couto <caligari@treboada.net>
Improve the way the nrf_qspi_nor driver configures the SCK frequency,
to properly support QSPI also on nRF53 Series SoCs that use a different
base clock frequency (96 MHz).
Add also a relevant configuration in the spi_flash sample so that it
can run on the nRF5340 DK.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Convert handful of users of DEVICE_INIT to DEVICE_DEFINE or
SYS_DEVICE_DEFINE to allow deprecation of DEVICE_INIT.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Update the `peripheral` and `peripheral_ht` samples to use the
indication `destroy` callback to determine when the indication has
completed, instead of using the value callback of the first active
connection.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Adds a `destroy` callback to the `struct bt_gatt_indicate_params` which
is used to signify to the application that the indication operation has
completed and the struct instance can be freed/destroyed.
This is required as the number of indication value callbacks that will
be triggered is not known by the caller when the `conn` parameter is
`NULL`.
Tracking when this callback should be run is mananged by a private
reference counter inside the struct.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Update the signature of the `bt_gatt_indicate_func_t` callback type by
replacing the attr pointer with a pointer to the
`bt_gatt_indicate_params` struct that was used to start the indication.
This allows the callback to free the `bt_gatt_indicate_params` instance
if it was allocated from storage, while still allowing the
`bt_gatt_attr` value to be accessed through `params->attr`.
Allocating the `bt_gatt_indicate_params` instance from storage is
desirable as multiple indications can be queued, however each instance
must be valid until the callback is run.
Implements API update from #29357
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
This change enables support for DNS service discovery
(RFC 6763) in the mdns_responder service and sample app.
Fixes#29429
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
To make it runnable in the sanitycheck necessary to add
capture output, because that sample runs infinite period of time
and can not finished by itself. To avoid timeout error
in the sanitycheck I added capture output for a several times.
Also added one more tag to describe that it is a power
management sample.
Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
The goal of this sample application is to measure the performance loss
when a user thread has to go through a system call compared to a
supervisor thread that calls the function directly.
Signed-off-by: Nicolas Royer <nroyer@baylibre.com>
Moves mesh feature configuration to a separate module, deprecating the
bt_mesh_cfg_srv structure. The initial values for the features should
now be enabled through KConfig, where new config entries have been added
for each feature.
This removes the upward dependency on the config server from the core
stack, and makes the config server a pure frontend for the configuration
states, as all spec mandated behavior around the feature states is now
encapsulated.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
This change adds IEEE 802.15.4g (Sub GHz) support for the
cc1352r.
The 2.4 GHz radio and the Sub GHz radio are capable of
operating simultaneously.
Fixes#26315
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
Add a simple backoff mechanism between consecutive registration attempts
in case of registration failures. Finally, notify the application in
case the registration failed several times.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
re-enabling this test was premature, it still crashes very often
due to two known issues affecting x86 64-bit. Filter out for
every 64-bit x86 platform until those bugs are solved, which
will reduce CI failure noise.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Introduce TagoIO IoT Cloud HTTP post client example. This explorer
Zephyr network resources to demonstrate an end to end application.
The TagoIO allows that any user can test on a easy way Ethernet, WIFI
and Modem (PPP) with BSD sockets. The example provides overlays to
configure WIFI and Modem.
The application consists an a pseudo temperature sensor that sends
periodically data to TagoIO IoT Cloud platform. The data can be
visualized on a web browser dashboard, cellphone or tablet. The
steps to configure TagoIO are described on the example documentation.
Special Variables:
- CONFIG_TAGOIO_DEVICE_TOKEN DEVID token generated by TagoIO
- CONFIG_TAGOIO_HTTP_WIFI_SSID SSID when using WIFI
- CONFIG_TAGOIO_HTTP_WIFI_PSK PASSWD when using WIFI
- CONFIG_MODEM_GSM_UART_NAME UART label when using MODEM
- CONFIG_MODEM_GSM_APN APN when using MODEM
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Enables the fat_fs sample on the mm_swiftio board by adding a
board-specific Kconfig overlay, and adding sdhc to the list of
board-supported features.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The sample was producing quite a few `<log_strdup alloc failed>`
warnings when running in default configuration on qemu_x86. Increase the
log_strdup buffer count to prevent that.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add bootstrap section to the documentation, explaining how to configure
the Leshan Demo Bootstrap Server locally and run the sample.
Update the download link for the Leshan Demo Server, according to the
upstream Leshan documentation.
Fix bullet list with Leshan security parameters.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add overlay-bootstrap.conf which allows to easily configure the sample
to use the bootstrap server.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The es-WIFI driver is used by Inventek's es-WIFI shields. This enables
wifi sample to build all variations to ensures that dependencies are
meet.
Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
Add support for the Solomon SSD1306FB device to the CFB custom font
sample.
Convert sample to use DT_LABEL() for obtaining the device label instead
of hardcoding it.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
WebUSB sample is using BOS descriptor. Because of that
the bcdUSB field of device descriptor is set to 0x0210.
This requires for the BOS descriptor to have LPM support.
LPM support use additional descriptor that the HOST can
read by requesting BOS desc. The descriptor is called
Extension descriptor and is specified in `USB Link Power
Management ECN` document considered a part of USB 2.0
spec.
This patch adds missing part of the BOS descriptor and
fixes issue with webUSB sample not passing i'LPM L1 Suspend
Resume Test' from USB3CV test tool.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
Removes text from the readme of the onoff_level_lighting_vnd_app
claiming buttons control the LEDs before provisioning, as it's not
accurate.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
using CONFIG_NET_BUF_POOL_USAGE monitor avail_count,
this variable should be protect.
Protecting it by using atomic variable
Signed-off-by: Ehud Naim <ehudn@marvell.com>
This sample allows to test the led-pwm driver. The first "pwm-leds"
compatible device instance found in DT is used. For each LEDs attached
to this device (child nodes) the same test pattern (described below) is
executed. The LED API functions are used to control the LEDs.
Test pattern:
For each PWM LEDs (one after the other):
- turn on
- turn off
- increase the brightness gradually up to the maximum level
- blink (0.1 sec on, 0.1 sec off)
- blink (1 sec on, 1 sec off)
- turn off
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
Currently all provisioning procedure into common source
files call `prov.c`, that will not compile separately.
Add `BT_MESH_NODE` to control whether nodes are supported
and device provisioning is supported, this will be used in
provisioner role.
Add more provisioner OOB authentication method.
Signed-off-by: Lingao Meng <mengabc1086@gmail.com>
In the flash partition definitions for ARM boards,
the link to the legacy partition macros does not
exist any more. The commit cleans up the partition
definition by removing this link.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This fixes the documentation instructions for building the SMP Pi
sample program, which incorrectly listed an underscore instead of
a path separator slash.
Signed-off-by: Steve Winslow <steve@swinslow.net>
It is useful to see the name of the handler thread for debugging
purposes so set it when starting the handler thread.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Saves quite a bit of memory on MMU-based systems which manage
page tables at the memory domain level.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Memory domains can be very expensive to instantiate. Demonstrate
how the default memory domain can be re-purposed for an
application, much like how the main thread already is.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Split CP and PD samples into dedicated directories as the difference
between the two are expected to grow with time. Also, do some
refactoring.
Signed-off-by: Siddharth Chandrasekaran <siddharth@embedjournal.com>
Minimize number of exported methods by unifying all osdp_cp_send_cmd_*()
as osdp_cp_send_command().
Signed-off-by: Siddharth Chandrasekaran <siddharth@embedjournal.com>
Adds a test case listing in sample.yaml of the mesh_provisioner sample,
building on qemu and the Nordic nRF51 DK to ensure that the provisioner
role is built in PRs.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Power management sample for that board has very
confusing name that should be changed to something
more understandable.
Current name sample.board.sample.board.mec15xxevb_assy6853
I suggest to have new name
sample.board.power_management.mec15xxevb_assy6853
Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
LORAWAN_ACT_* should be assigned instead of LORAWAN_CLASS_*. Previously
used LORAWAN_CLASS_A has the same integer value as LORAWAN_ACT_OTAA, but
update code with the latter to use the proper type.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
The overlay file defines an i2c interface for the
Feather nRF52840 Express and the Adafruit BME680.
Also adds the platform to the test build configuration.
Signed-off-by: Patrick K. Moffitt <patrick@moffitt.com>
Add commands to suspend or resume the GSM modem. These commands
might not be enough as at least the SIMCOM 808 modem requires
that the modem is reset when it is resumed, and this application
does not do any reset atm.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add nucleo_l552ze_q_ns board to the allowed list of platforms
for the tfm_ipc sample. This allows the sample to be built for
the nucleo_l552ze_q_ns platform by sanity check.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Fix the name of the sample in the .yaml file so it matches
the sample directory, and does not collide with tfm_ipc.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
In the samples' documentation we update the requirements
for building TF-M binaries according to the latest upstream
TF-M documentation.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Add documentation on how to build and run the TF-M integration
samples on nRF platforms.
The arm-none-eabi-gcc does not need to be on the PATH anymore
for building and running the tfm_ipc sample on nucleo so remove
the note from the sample docs.
Fix some paths for TFM binaries for the LPC board as well.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit adapts the DTS overlay for nucleo_l552ze_q_ns
board, to comply with the changes applied in the flash
layout of the TF-M build.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Changes required in TF-M integration samples CMakeLists.txt
files due to the new upstream TF-M build system. In brief,
configuration related to PSA API (IPC), Regression, and
Isolation level needs to be passed, now, directly, not
via invoking a given TF-M CMake configuration.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Adding support for TF-M in the Nordic nRF9160 DK.
Allow the TF-M integration samples to be built and
executed for nRF9160 DK.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
TF-M related information in the relevant board definitions
needs to be updated in the wake of the new TF-M Build
system.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Always run thread_b on CPU 0 by setting cpu_mask if on SMP system.
Run this with CONFIG_SCHED_CPU_MASK=y set on an SMP system.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Users testing beacon capability will likely want to see the beacons in
a sniffer tool. Switch to an advertising mode that uses a persistent
known address, and display that address on the console output.
This also demonstrates techniques to retrieve the advertising address
where one is known.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The x_nucleo_iks01a2 shield supports both standard (Mode 1) and
sensorhub (Mode 2) modes through proper dip switch selection.
For more information please refer to:
https://www.st.com/en/ecosystems/x-nucleo-iks01a2.html
This commit moves the original (Mode 1) support under 'standard'
directory and adds the Mode 2 support into 'sensorhub' directory.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
The legacy macros were first deprecated in Zephyr v2.3. Now that
Zephyr v2.4 has been released, that makes two releases where these
macros have been deprecated, so it's OK to remove them.
This leaves support for legacy binding syntax in place. Removing that
is left to future work.
We need to update various pieces of documentation related to flash
partitions that never got updated when the new API was introduced.
Consolidate this information in the flash_map.h API reference page,
since that's really where users will run into it. This also gives us
the opportunity to improve this documentation.
Adjust a couple of kconfigfunctions.py and sanitycheck bits to use
non-legacy edtlib APIs.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This sample application shows how to configure an end node in Class-A
mode and to send data to network server via gateway.
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Testing the sample with Zephyr SDK 1.14 (vs 1.13) with qemu_x86
showed that it consistently crashes on 2th-4th iteration. Avoid
bite-sized increase this time, and dump stack considerably to
avoid constant need to update it.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Currently, after `CONFIG_LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP` is enabled,
the LwM2M engine will initiate bootstrap procedure on each run. This
approach limits the flexibility of the application, as it's not always
necessary to go over the bootstrap procedure (for instance, the
application may decide to store the security object obtained during the
bootstrap in flash, and restore it on boot).
Fix this by introducing an additional `flags` parameter to the
`lwm2m_rd_client_start()` function, which provides information whether
to run bootstrap in the current session or not.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
After HW stack protection option was globally enabled for
nRF SoCs turned out main stack size is too small for
USB mass storage sample. Increase to avoid overflow.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
Replace all calls to the assert macro that comes from libc by calls to
__ASSERT_NO_MSG(). This is usefull as the former might be different
depending on the libc used and the later can be customized to reduce
flash footprint.
Signed-off-by: Xavier Chapron <xavier.chapron@stimio.fr>
In npcx7 series, all of them support the Intel Enhanced Serial
Peripheral Interface (eSPI) Revision 1.0. This specification provides a
path for migrating host sub-devices via LPC to a lower pin count, higher
bandwidth bus. In addition to Host communication via the peripheral
channel, it provides virtual wires support, out-of-band communication,
and device mastering option over the Chipset SPI flash.
Becisdes introducing eSPI device in npcx7, this CL also includes:
1. Add eSPI device tree declarations.
2. Add npcx7-espi-vws-map.dtsi to present the relationship between eSPI
Virtual-Wire signals, eSPI registers, and wake-up input sources.
3. Zephyr eSPI api implementation.
4, Add OOB (Out of Band tunneled SMBus) support.
5. Add configuration files for eSPI test suites.
Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
It's copy of openthread conf from samples/net/sockets/echo_client,
but requires increasing of main stack size to avoid crash.
Also fixes building if CONFIG_LWM2M_DTLS_SUPPORT is enabled #28787.
Signed-off-by: Kiril Petrov <retfie@gmail.com>
Provide device tree flash partition in order to configure
and flash non secure binary.
Flash partitioning depends on TFM configuration and use case,
so it is provided as an overlay in the sample it is used.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Remove Adafruit/Seeed TFT hardcoded settings. Note that undocumented
ILI9340/1 settings have been removed (maybe Seeed is using another ILI
variant?).
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Remove obsolete include of the shell_uart.h file.
It is sufficient to include the shell.h file.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordisemi.no>
The up_squared board suffers the same issue as qemu_x86_64
where a bigger stack is needed but CMSIS has a limit on
how big the stack can be. This results in stack overflow.
So exclude up_squared in samples.yaml.
Fixes#28552
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
fixes following cmake warning:
CMake Warning at ../../kernel/CMakeLists.txt:54 (message):
Single threaded mode (CONFIG_MULTITHREADING=n) is deprecated
Signed-off-by: Alexander Kozhinov <AlexanderKozhinov@yandex.com>
Deprecate the Kconfig option for the time being. Unless a contributor
volunteers to take over the work to maintain the option, it will be
removed after 2 releases.
Relates to #27415.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
From 2.3 to 2.4 the net samples pair echo-server/client increase the
SRAM requirements. Since CI doesn't build all combinations, (even for
a release like 2.4.0-rc1) the problem was detected only now. Decrease
buffers for atsamr21_xpro on both echo_server/client sample pair.
Fixes#28341.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
In some cases we were returning empty thread names, so make sure we
check for the thread names correctly.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Instead if printing the line number, output the context (thread,
semaphore, mutex, ..) and the ID of the event where applicable.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This adds the option to disable kernel memory pool when
multithreading is also not enabled. This saves some
code space.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
ESPI is supported in MEC15 chips but similar to PECI, I2C, eSPI bus
testing requires another device to act as eSPI host.
While this sample can be run in EVB the HW connection to a eSPI host
(Intel RVP) is not documented/supported.
Mark as not supported in that HW only in Modular card
(which setup is documented)
Also remove duplicate definition of the "depends_on: espi"
in the end of the sample.yaml file
Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
Remove reference to a specific board, since that board doesn't have
this sensor.
Add a dependency on presence of a devicetree node that will be
required to build the driver.
Add a fixture that identifies the specific sensor required to run the
sample. This should be added as a side effect of specifying the
shield (though this is not currently done, it must be added in the
device description).
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The test for this sample requires a usb connection to a secondary port,
output is not captured on the default usb port.
Fixes#28154
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
After adding 'Multicast group filtering' (commit b7b73d0) server should
join CoAP IPv6 multicast group to accept multicast CoAP messages.
Signed-off-by: Eug Krashtan <eug.krashtan@gmail.com>
The CANopenNode stack function CO_delete() takes a void
*CANdriverState argument. This maps to a pointer to a struct
canopen_context in Zephyr.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Increase stack size to 1200 for echo and echo_async sample apps
(following a similar increase done to echo_async_select previously).
With default stack size, the apps no longer run (crash QEMU) with
Zephyr 2.4-pre.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The default timeout used (500 ms) turns out to be too small for certain
servers (test.mosquitto.org), rendering it impossible to connect (the
TCP connection was closed before the actual Connect ACK response
arrived). Increase the connect timeout to cover this case.
Fixes#28181
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
APP_TX_RX_TIMEOUT and APP_NET_INIT_TIMEOUT were not used in any way
in the sample and test apps.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
HID API has changed and now all usb HID callbacks require
pointer to device as a first parameter. This patch is fixing
regression issue.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
Two samples require interacting with keyboard and mouse, and that
means necessary to provide correct fixture before run of that samples
in sanitycheck system. To skip or run the sample according to the
provided fixture in map-file necessary to add fixture definitions
into sample.yaml files
Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
A change to the previous partition resulted in the unit address being
inconsistent with the reg property.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Configure build variable BL2 depending on board configuration. BL2 is
set to True by default. BL2 enabled building TFM with MCUboot.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
When running shell commands updatehub alloc data from shell stack.
Increase shell room stack to avoid shell issues. Memory tuning
should be performed accord with available resources.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
Added a Bluetooth Peripheral sample that demonstrates how to use
GATT Object Transfer Service.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Add the supported features section to serpente.yaml and overlay files
to the corresponding tests and samples.
Signed-off-by: Alexander Falb <fal3xx@gmail.com>
The _gatt_ infix was determined to be unnecessary as
GATT is implied by it being a Bluetooth service.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The _gatt_ infix was determined to be unnecessary as
GATT is implied by it being a Bluetooth service.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The _gatt_ infix was determined to be unnecessary as
GATT is implied by it being a Bluetooth service.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Use time(), localtime_r(), and asctime() to confirm that the
declarations required for these (newlib) libc functions are made
available in CONFIG_POSIX context.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit extends USB hid API callbacks by adding
'const struct device *dev' parameter. If the application
configured more than one HID device then it must specify
separate hid_ops for each device as its unable to determine
for which device the callback was called.
This patch makes it possible to have only one hid_ops within
the application and the application is aware for which device
the callback was called because of explicit device pointer.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
Some of the names used in `struct osdp_cmd` where directly as in the
specification. Initially it appealed to keep them like that but with
time, a little more consistent naming of members helps if you haven't
read the specification document very recently.
Signed-off-by: Siddharth Chandrasekaran <siddharth@embedjournal.com>
Add a OSDP CP mode sample that sends out a periocic command to a
connected PD. It also demosnstrates key press and card read callback
registration.
Signed-off-by: Siddharth Chandrasekaran <siddharth@embedjournal.com>
nRF53 application core does not have RNG peripheral.
Software implementation must be used instead.
This patch adds config overlay for hid-cdc nRF5340 sample.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
Added, build only, native_posix_64 board to sample.yaml file.
This will cover both compilation of the SDL display driver and
kscan driver.
Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
Receiver part reworked to not block in interrupt and rely on assumption
that uart_fifo_read is capable of reading incoming data from the HW.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Given that TLS/DTLS socket now creates an underlying TCP/UDP socket, the
FD consumption is increased in echo_client and echo_server.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Sample example built with gdbstub enabled. Two serials are used, one for
normal output and another one that is used talk with gdb in the host
machine.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Add support for running the JEDEC SPI NOR flash sample on the ARM
Cortex-M3 DesignStart FPGA reference implementation.
Special care is needed to avoid overwriting part of the FPGA
configuration bitstream, which is stored in the onboard QSPI flash.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Now that device_api attribute is unmodified at runtime, as well as all
the other attributes, it is possible to switch all device driver
instance to be constant.
A coccinelle rule is used for this:
@r_const_dev_1
disable optional_qualifier
@
@@
-struct device *
+const struct device *
@r_const_dev_2
disable optional_qualifier
@
@@
-struct device * const
+const struct device *
Fixes#27399
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Add configuration and overlay files for Adafruit feather nRF52840.
README has also been updated and improved. Documentation related to
littlefs has been moved to an independent section as it could apply to
any sample.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Following the change to use the C domain for parsing, update all
existing :cpp:func: references to :c:func:. Remove the parentheses as
well, if used, because they are not needed, this is already known to be
a function, and how it is displayed in the documentation later is a
semantic decision done by the output builder.
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
Trims the default memory configuration for the BBC Microbit in mesh
samples to ensure that it fits.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Add sample where a fictious lenghty operation is required before a more
elaborate handshake is perform with eSPI master.
This requires sending SLAVE_BOOT_DONE virtual wire explicitly.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
This sample controls up to 12 LEDs connected to a LP503x driver.
First, for each LED information is retrieved using the led_get_info
syscall and printed in the log messages. Next, from an infinite loop, a
test pattern (described below) is applied to all the LEDs simultaneously
(using the led_write_channels syscall) and then to each LED one by one
(using the led_set_{brightness,color} syscalls).
Test pattern:
For each color in red green blue white yellow purple cyan orange:
- set the color
- turn on
- turn off
- set the brightness gradually to the maximum level
- turn off
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
The spi_flash_w25qxxdv driver has been superseded by the generic
spi_nor driver for over a year. The only non-refactoring change to
the W25Q driver in the last 18 months was done to support a backport
to 1.14.
All devices supported by spi_flash_w25qxxdv driver are expected to be
supported by the spi_nor driver, using the standard `jedec,spi-nor`
devicetree compatible. No in-tree devicetree files make use of this
driver.
Remove the confusion about which driver to select by removing the
unmaintained redundant driver.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Add CONFIG_NET_CONFIG_AUTO_INIT=y to enable the bluetooth
device network interface.
Due to #27405 feature PR allowing application to init the network
whenever it wants, IPSP sample stopped initing the
bluetooth network.
The IPSP sample was not updated to enable
CONFIG_NET_CONFIG_AUTO_INIT in prj.conf
and didn't call net_config_init_app(...)
as suggested in the feature PR.
Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
This commit adds the signing commands and the configuration required
to build a non secure image for a nucleo_l552ze_q.
Signed-off-by: Nolwenn Violette <nolwenn.violette01@st.com>
If user has enabled SOCK_DGRAM support for AF_PACKET type, then
use that in the packet sample application instead of SOCK_RAW.
This simplifies the application as we do not need to handle
the Ethernet frame when sending or receiving the packets.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Align all Kconfig option names with LVGL names. The followed rule:
LV_(.*) -> CONFIG_LVGL_(.*).
Also replaced LVGL boolean configuration entries using if/else/endif
with direct IS_ENABLED macro.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
This commit adds the LiteX I2S devices usage example with:
- i2s rx and tx initialization,
- i2s rx and tx configuration,
- i2s rx receiving,
- i2s tx sending.
An application is a simple sound loopback - it allows to connect
a music source and a receiver such as headseat and listen to it.
Signed-off-by: Pawel Sagan <psagan@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
Make the flash-backed USB mass storage sample depend on usb_device and
flash instead of just flash.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Add support for running the JEDEC SPI NOR flash sample on the ARM
Cortex-M1 DesignStart FPGA reference implementation.
Special care is needed to avoid overwriting part of the FPGA
configuration bitstream, which is stored in the onboard QSPI flash.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
When try build updatehub using overlay-dtls.conf system fail with
cannot create privkey.der.inc file, permission denied. Add missing
gen_dir cmake definition. Update updatehub sample test config to
run missing dtls build test.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
Add both .conf and .overlay files for the nRF51 dongle, which is still
used and was missing configuration files.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Use non-default frequency 25MHz and Quad mode to ensure
frequency configuration is taking effect.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
-Wimplicit-fallthrough=2 requires a fallthrough comment or a compiler
to tells gcc that this happens intentionally.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
An off-by-one error calculating the number of parameter headers caused
a third table to not be displayed.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Add DT entry for the embedded QSPI NOR flash (GD25Q16) in the Adafruit
nRF52840 feather. Also added support for the spi_flash sample, which has
been used to verify the device.
NOTE: Device seems to fail when using high clock frequencies (e.g.
maximum QSPI frequency). It may be due to PCB layout issues.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Instead of unknown clock accuracy, set it to 1ms for native_posix
boards. This looks better in TSN monitor.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add gPTP multiport support to native_posix Ethernet driver.
This means that the driver is able to create more than one
network interface and enable gPTP to each of them. This requires
that net-tools is updated as it contains configuration file
for network interfaces in host side.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add overlay that includes only the shell transport of mcumgr, without
bringing in BLE as well. This can be used as an alternative for the
serial transport. The `smp_svr` README was updated accordingly.
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
Value of ret has been overwritten by flash_write_protection_set
before it could be returned from do_write_unaligned, which could
lead to reporting success when error code should have been returned.
Fixes#27641, Coverity-CID: 212142
Fixes#27642, Coverity-CID: 212143
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Add a tag at sample.yaml to exclude the platform mec15xxevb_assy6853
because of unsupported. Refer github issue #27576.
Signed-off-by: Ningx Zhao <ningx.zhao@intel.com>
Create two threads, one for receiving packet socket data and
the other for sending raw Ethernet frames.
Add flood option where it is possible to stress test the IP
stack. Flooding is disabled by default.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
A zero value in the NPH header indicates one parameter header.
Increase the upper bound to process the last provided table.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
GPIO CSn active level transitioned from default active-low to
devicetree defined since the last time this sample was verified,
requiring the flags parameter in devicetree to be updated.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The boards efr32_radio_brd4104a, efr32_radio_brd4250b and
efr32mg_sltb004a have an on-board nor flash. It is already present in
the device tree, only the driver needs to be enabled.
Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
Its possible to rename the executable we build via the Kconfig symbol
CONFIG_KERNEL_BIN_NAME. So we really should use ${KERNEL_ELF_NAME},
${KERNEL_BIN_NAME} and ${KERNEL_HEX_NAME} variables instead of hardcoded
zephyr.elf, zephyr.bin, and zephyr.elf.
This fixes an build issue with
tests/misc/test_build/buildsystem.kconfig.utf8_in_values on
up_squared_adsp and lpcxpresso11u68 platforms.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit allows let build zperf sample with overlay-netusb.conf.
USB subsystem must be enabled by the application.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
usb_enable() must be called by the application.
The application may want to register usb_dc_status_callback
and trace usb status codes (usb_dc_status_code).
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
This patch removes unused Kconfig option from console
subsystem. If application wants to wait until the console
port is connected, enabled and ready to receive data
it should use uart_line_ctrl_get() API function and
check for DTR flag.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
usb_enable() must be called once by the application.
The application may want to register usb_dc_status_callback
and trace usb status codes (usb_dc_status_code).
After this patch all pre APPLICATION messages will be dropped
as USB console device is enabled in the application.
Application waits for console device until its ready by checking DTR
flag - uart_line_ctrl_get(). This function could be dropped but then
some log messages that were generated before USB device is ready
could also be dropped.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
This commit adds a PD sample for drivers/osdp. It receives OSDP commands
and prints a message to console.
Signed-off-by: Siddharth Chandrasekaran <siddharth@embedjournal.com>
USB device shall be able to send only in CONFIGURED state.
Zephyr USB HID device class allows to send the data no matter
of the USB state what is wrong. Attempting to write to endpoint
buffer in state != CONFIGURED may lead to driver error.
This patch introduces state tracing for USB HID class and
allows to send data using hid_int_ep_write() class API
only if the device remains in CONFIGURED state.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
Add a fixture since we need at least two boards connected for this test
to run correctly w/real hardware.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add for various flash runners (pyocd, nrfjprog, and dfu-util) to do a
full chip erase. This is needed for the sample to pass in sanitycheck
on real hardware.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
There is an additional prj_smp_svr.conf configuration file provided,
which builds an image with mcuboot support. Enable it in sample.yaml,
so sanitycheck can detect build failures in future.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
There is an optional mcumgr enabled prj_smp_svr.conf configuration
file. Using it results in following errors:
.../src/smp_svr.c:12:10: fatal error: mgmt/buf.h: No such file or \
directory
12 | #include <mgmt/buf.h>
|
Fix include paths to keep sample buildable with mcumgr enabled.
Fixes: c200b1c5e6 ("mgmt: Move mcumgr into its own folder")
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Remove dependency on CONFIG_BT_ACL_FLOW_CONTROL and use
CONFIG_BT_L2CAP_RX_MTU always to set L2CAP RX MTU.
The ATT MTU is set from two different KConfig options depending
on if CONFIG_BT_ACL_FLOW_CONTROL is enabled, which makes it
a confusing option and hard to provide a conf file that
supports multiple board configurations.
This changes the behavior when CONFIG_BT_ACL_FLOW_CONTROL and
CONFIG_BT_BUF_RX_LEN was used to set the L2CAP RX MTU, and by
extension the ATT MTU.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Fix smp_svr Bluetooth configuration for when BT_HCI_ACL_FLOW_CONTROL
option has been enabled. In this case the CONFIG_BT_L2CAP_RX_MTU
is used instead of CONFIG_BT_RX_BUF_LEN to set the RX MTU.
This lead to a negotiated MTU of 23, which is not supported by
the SMP_SVP protocol.
Removed the board specific configuration files as these are just
duplications of the overlay-bt.conf or overlay-bt-tiny.conf and
the readme specifies how these should be used.
Reduced the TX MTU to end up with the same value as the RX MTU,
CONFIG_BT_RX_BUF_LEN - 4 (HCI ACL header) - 4 (L2CAP header).
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Removes 'flash' command function that displays the command's subset.
Command's subset will still be displayed in current code.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
On large memory areas printing 8 bytes/line is not enough.
Increased printing 16 bytes per line.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
Adds unaligned and pattern write functionality.
The reason this was added is chips with large pages, e.g. 256 can't be
normaly writen via shell, thus the need to write a pattern with any
length to a memory area.
The unaligned write command allows writing a data frament in any place
in memory, the data backup, protection, erasing and writing is
automaticaly handled. This makes it easier to test all flash controller
functionality in one command, also write any persistent data to any
flash address.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
The previous commits added the SAM0 DAC driver. Now document and
enable it, including enabling it in the DAC sample.
Signed-off-by: Michael Hope <mlhx@google.com>
Fixes#27266.
cmd_hdr and acl_hdr local structs were read but never written.
Causing unpredictable errors in bt_tx_thread such as :
"Invalid HCI CMD packet length" in hci.c:2280
or Imprecise data bus errors on nrf52810.
cmd_hdr and acl_hdr are now filled with the received data
from SPI Master.
Signed-off-by: Corentin Dorothée <corentin.dorothee@gmail.com>
A proper way to match a Security object instance with a Server object
instance is via Short Server ID resource. Both coupled object instances
should carry the same value of this resource in order to me considered
matched.
This was not implemented in the LwM2M library and it was incorrectly
assumed that the Security object instance index corresponds to the
Server object instance index. While such apporach works is simple
scenario, it might yield incorrect results when bootstrap is used.
Fix this, by verifyng the Short Server ID resource in the Secuirty
instance used, and finding a matching Server instance. The server object
instance is stored for future use in the engine.
Additionally, remove an extra Server object instance that was created
when the bootstrap procedure was used. Since the boostrap Security
object instance does not have the corresponding Server object, it's
enough to have a single Server instance.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Now that the relevant APIs generalize properly for bindings without
flags, we can remove some special case checks from the tree.
I couldn't find any more, but I did this kind of quickly, so it's
possible I missed some.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Zephyr introduced subsys/mgmt folder for MCU management. Move UpdateHub
sample to its correspondent folder at sample/subsys/mgmt folder.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
In order to be able to add more entries under 'subsys/mgmt', move the
current contents of it, which relate exclusively to MCUMgr, to its own
folder.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The fs_open has been extended with support for open flags.
Currently supported flags are:
FS_O_READ -- open for read
FS_O_WRITE -- open for write
FS_O_CREATE -- create file if it does not exist
FS_O_APPEND -- move to the end of file before each write
The FAT FS and LittleFS front-ends within the Zephyr has also been
modified to utilize the flags.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Applications using IPM callbacks get the imp device instance pointer
now through the callback. Which help to clarify a bit the code here and
there as well.
Fixes#26923
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
It was already using uart_irq_callback_user_data_set below, now it also
uses uart_irq_callback_user_data_t as callback type, so let's normalize
the callbacks.
Fixes#26923
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Update hci_uart sample configuration for buffers to work with the
extended advertising HCI commands and events.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Continuation of abafd8eb22 which missed to update the
board configuration for nrf9160dk_nrf52840.
Update main stack size for nrf5 boards. This is to support an
alternative hci_driver that has a higher stack size usage in hci driver
open. Measured stack usage in this case to 808/1024.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Fix the nrf51_blenano board configuration which does not build,
exceeding the SRAM with over 2k bytes.
Align the configuration with the same options used to make the
bbc_microbit board build for nrf51 with 16K SRAM.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Set name on HCI TX threads in HCI samples to make it easier to debug
stack size usage with CONFIG_THREAD_ANALYZER.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add a note to warn users about the need to adjust
CONFIG_LOG_STRDUP_BUF_COUNT and/or CONFIG_LOG_STRDUP_MAX_STRING when
deferred logging is enabled.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Update LVGL to version 7.0.2. Notable changes in v7 include:
- New drawing system (note that it uses much more ROM than previous
versions)
- New style system
- Some objects have been renamed (current changes do not align yet
Zephyr Kconfig settings with LVGL)
- New fonts with more sizes (e.g. Montserrat, replacing Roboto)
- Theme changes (most have been removed, default is now Material)
Note that constant defaults have been aligned with LVGL.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
TI CC32xx does not support binding the same port to multiple sockets,
but instead uses the IPv6 socket to handle both IPv4 and IPv6
connections. This commit modifies the sample to reflect this.
In addition, Kconfig options are overridden in order for the sample
to take advantage of wifi and socket offloading on this platform.
Signed-off-by: Vincent Wan <vwan@ti.com>
Adds native_posix hw counter model and the counter driver.
Functionality is needed by software which is tested
on native_posix and has dependency on counter.
Hardware model was developed similarly to HW timer model.
The counter driver wraps HW counter functions and exposes
basic functionalities: starting, stopping, setting and cancelling
single channel alarms.
Code was tested against: tests/drivers/counter/counter_basic_api.
Signed-off-by: Filip Zajdel <filip.zajdel@nordicsemi.no>
Ensure multiple OOB transactions can be perform back-to-back
Check OOB transaction response length matches is as expected.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
This sample is nothing more than just a special setup of UART for some
nfc, has nothing specific to nfc and might be misleading, so removing.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
On TI CC32xx, the same port number cannot be bound to different
sockets. Instead, when an IPv6 socket is bound it can handle both IPv4
and IPv6 connections.
Signed-off-by: Vincent Wan <vwan@ti.com>
Fix compilation error when the DIAG module is enabled.
All core functionalities are provided.
Signed-off-by: Piotr Szkotak <piotr.szkotak@nordicsemi.no>
Add a sample to demonstrate and test the Wurth Elektronik WSEN-ITDS
accel sensor. Sample code covers accel and die temperature functions.
Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
The current shield version shows different configuration, including
disabling default ethernet and wifi interfaces. To allow easy
connection from standard headers, this add two new shield designations.
The existing boards overlays and defconfig were updated.
The documentation was update to reflect changes. A new supported
variations section helps to understand what shield variation user need
select to build their own system.
This changes requires changes on esp32 offload tests to reflect new
esp_8266 shield designations. Sam4e_xpro was keeped as the only one
with dedicated overlay and both frdm_k64f and disco_l475_iot1 were
moved to use standard arduino r3 header using extra args.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
After Zephyr 2.3.0 release system uses more RAM. This update
samr21_xpro configuration to allow echo_client be equal to
echo_server configs and remove unnecessary definitions.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
After Zephyr 2.3.0 release system uses more RAM. This update
samr21_xpro configuration to allow echo_server run again and
remove unnecessary definitions.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
The sam4e_xpro and sam_v71_xult configs are unnecessary. Now
atmel_rf2xx shield will complement all necessary configuration.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
The sam4s_xplained and sam_v71_xult configs are unnecessary. Now
atmel_rf2xx shield will complement all necessary configuration.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
extended download progress metrics to Bytes, KiB and MiB
separate number of download iterations for INF and numeric case
Signed-off-by: Alexander Kozhinov <AlexanderKozhinov@yandex.com>
The generic SPI GPIO chip select support now respects devicetree flags
for signal active level. Update all cs-gpios properties to specify
active low.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Sample tries to estimate maximum number of messages that can be
logged. It was using two system cycles and counting number of
messages logged in that window. It did not take into account the
fact that clock frequency may vary and logging speed also varies
(especially if LOG_IMMEDIATE is enabled). Presented results may
be faulty and misleading.
Fix is attempting to adjust window size to increase precision of
the measurement.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Unit tests were failing to build because random header was included by
kernel_includes.h. The problem is that rand32.h includes a generated
file that is either not generated or not included when building unit
tests. Also, it is better to limit the scope of this file to where it is
used.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Configuration file was left unchanged after development
of USB Audio class. Deleted configs should never be present.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
Due to a long standing difference of requirements enabling deep sleep
will by default cause any application that delays for an unbounded
period to power down. On Nordic doing so turns the system off. Show
how to prevent this from happening while still allowing deep sleep
states to be available for the application's controlled use.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Add a new configuration option, LORA_SX12XX, that is shared for all of
the LoRaMAC-node-based radio drivers. By default, the appropriate
driver for the LoRa radio in the device tree is included is included
in the build.
Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
In fat_fs example, if we choose a large size SD card to connect with,
the result of memory size calculation coule be wrong due to the missing
brace for manipulating operator priority.
Fixes#26266.
Signed-off-by: Jui-Chou Chung <jui-chou.chung@nordicsemi.no>
Some of the settings are no longer needed in the sample as OpenThread
configuration manages it by itself.
Signed-off-by: Marek Porwisz <marek.porwisz@nordicsemi.no>
This option should be selected by default, as right now LORA=y selects
REQUIRES_FULL_LIBC.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Instead of whitelist, use a filter that checks if a required
"atmel,at45" compatible node is present.
Add a build-only test case to be used by CI and provide a harness
configuration so that execution of the sample can be also verified.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This sample still used the old name of the nrf9160dk_nrf9160 board,
both in documentation and sample.yaml. Because of the latter, this
sample was not picked up by sanitycheck, what resulted in compilation
errors in the spi_flash_at45 driver not caught by CI.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
USB access to the flash device is not synchronized with the
application, so if the application needs to create a new file system
USB may read configuration state that is incorrect. Wait until the
the application is done with the flash before starting USB.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Simplify overall scenario using sntp_simple to keep main MQTT logic more
clear. Also, remove related code which was used only by the old SNTP
code, e.g. show_addrinfo().
Signed-off-by: Alexey Markevich <buhhunyx@gmail.com>
Exclude the NXP LPCXpresso55S16 board from the X-NUCLEO-IKS0xAx
samples, since the rely on having Arduino Uno header A3 available.
On the LPCXpresso55S16, A3 is connected through a resistor (R63) which
is not mounted by default.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Introduced interface for efficient logging from external logsystems:
Added handling of vaargs and automatic strdup to macros intended
to be used in logging interface function. Fast path to less then 4
arguments to speed up the execution. Made log_count_args external,
if external logsystem cannot count arguments.
Signed-off-by: Tomasz Konieczny <tomasz.konieczny@nordicsemi.no>
The sample does not provide a way to verify its operation
and causes fails on nrf platforms. Added regex checks in sample.yaml
so the sample can be verified.
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
Callback used mqtt_publish_qos1_ack but mqtt_subscribe called with
default 0 value (MQTT_QOS_0_AT_MOST_ONCE)
Signed-off-by: Alexey Markevich <buhhunyx@gmail.com>
New config file to build an OpenThread NCP for the NRF52840-DK
via CDC-ACM USB on the connector J3 (labelled 'nRF USB').
Signed-off-by: Markus Becker <markus.becker@tridonic.com>
zperf takes a potentially unaligned netowrk packet, casts it to a
struct, and then dereferences the fields. This causes a crash on
cores that don't support unaligned access such as the Cortex-M0+.
Use the UNALIGNED_GET helper instead.
Signed-off-by: Michael Hope <mlhx@google.com>
Also, add prj.conf options to make the sample builds on more
platforms. Finally, update the sample source to print explicit
"Finished" message, to let user know that the processing is done.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Added separator (e.g. comma or semicolon) parameter to FOR_EACH_ family.
Separator is added between macro execution for each argument and not at
the end.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Removed flow control configuration from Kconfig and updated samples
to use device tree for that.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
The upload command invokes lfs_stat() on the destination file which
overflows the stack. Adding 256 bytes seems to make it work.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
When using an IDE (e.g. Eclipse, Qt Creator), the project name gets
displayed. This greatly simplifies the navigation between projects when
having many of them open at the same time. Naming multiple projects
"NONE" defeats this functionality.
This patch tries to use sensible project names while not duplicating
too much of what is already represented in the path. This is done by
using the name of the directory the relevant CMakeLists.txt file is
stored in. To ensure unique project names, small, manual adjustments
have been done.
See also 7eabab2f5d ("samples, tests: Use semi-accurate project names")
Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
Move to using PRIu64/PRId64 instead of %llu/%lld since on
native_posix_64 the uint64_t/int64_t type is defined in terms of 'long
int' and not 'long long int'.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Left unset it becomes the first partition, which is not what's used
for littlefs, and specifically isn't on the external flash for
nrf52840dk_nrf52840.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The flash interface header needs to be available regardless of
selected filesystem implementation.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This provides a better error message when building with CMake and
forgetting ZEPHYR_BASE or not registering Zephyr in the CMake package
registry. See parent commit for more details (split from parent for
better readability).
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Support for the socketpair(2) system call was recently
added for 2.3.0 .
This change adds a sample application that demonstrates
how it can be used.
Fixes#25527
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
Add a note for composite (CDC+DFU) device overlay.
Composite device CDC+DFU may not work with Windows OS host.
Windows OS does not send reset after DFU_DETACH request
(does not re-enumerates) and thus make it unable for
the device to restart in DFU mode.
For more details refer to #23337.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
Currently system power management does not automatically control
device power, and this example demonstrates high current draw due to
the UART being enabled. Enable device power management and
demonstrate how to manually turn off greedy devices.
Also remove the 60 s delay that confirms we successfully turned off
the residency policy; that's not directly relevant to the purpose of
the sample.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The USB audio samples when added didn't have any tests: sections in the
sample.yaml so they would never get build on any platform as part of
sanitycheck. Add the tests: section and limit the samples to build on
nrf52840dk_nrf52840 as that was the intended platform these samples
where initially developed for.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
If build with full POSIX API, use read()/write() instead of
recv()/send() calls for sockets.
We have read()/write() support for a while, but no samples/tests
actually performed at least a build test for it (so it will be
done now).
Fixes: #25407
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This makes the up_squared board default to x86_64.
This also adds a new board, up_squared_32, for when 32-bit
is desired.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Though there were issues with this sample before e959386bd2 ("samples:
servo_motor: cleanups and changes"), that commit introduced further
bugs. This happened because the new pwm-servo alias that commit
switched to wasn't provided by any boards, so it wasn't built in CI.
Before that, however, the recommendation to use bbc_microbit in the
sample documentation was also buggy in a couple of ways:
1. bbc_microbit doesn't have the pwm-0 alias the sample
previously required, so it didn't build on that board
2. the documentation's comment to use pin 0 on the edge connector
is wrong; PWM channel 0 is wired to GPIO P0.0 on the SoC,
which is actually pin 21 on the connector
Fix it all up.
Tested on bbc_microbit. I verified the pinout and also made sure that
the sample correctly generates pulses from 700 to 2300 usec.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Due to counter driver implementation change
"driver/counter/counter_ll_stm32_rtc.c: Add 1 tick to alarm"
It is necessary to adapt sample test (sanitycheck)
to take into consideration 1 tick precision/tolerance.
Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
Add missing sample.yaml file to enable CI build tests. Local tests can
be executed executing sanitycheck:
./scripts/sanitycheck -l --testcase-root samples/net/updatehub
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
The esp32 offload driver is used by shield esp_8266. This shield
doesn't have tests enabled to ensures that dependencies are ok.
This enables wifi sample to validate shield esp_8266 on CI and
consequently esp32 offload driver.
Fixes: #25386
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
The length field for the MCUBOOT slot partitions in Nordic platforms
has always had an extra leading zero suggesting it's a 40-bit value,
being stored in a 32-bit field. Remove the incorrect leading zero to
reduce misunderstanding of the field.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Convert with a combo of scripts and by hand fixups:
git grep -l DT_FLASH_AREA_.*_ID | \
xargs sed -i -r 's/DT_FLASH_AREA_(.*)_ID/FLASH_AREA_ID(\L\1)/'
git grep -l DT_FLASH_AREA_.*_OFFSET | \
xargs sed -i -r 's/DT_FLASH_AREA_(.*)_OFFSET/FLASH_AREA_OFFSET(\L\1)/'
git grep -l DT_FLASH_AREA_.*_SIZE | \
xargs sed -i -r 's/DT_FLASH_AREA_(.*)_SIZE/FLASH_AREA_SIZE(\L\1)/'
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Clean up the board specific samples:
- Do not hard-code the i2c0 device label in the line follower sample.
- Miscellaneous docs cleanups.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Align the docs and source code with other changes done to the basic
samples.
Use numbers 0 and 1 to refer to the LEDs consistently. This matches
the generic devicetree aliases used by Zephyr, instead of using USR1
and USR2, which are specific to 96b_carbon.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Align the sample with changes made to other basic samples.
Move away from 'pwm-0' as a devicetree alias, requiring applications
to define a 'pwm-servo' alias. We are getting rid of the aliases that
just bounce through to node labels as soon as we can, might as well
get the applications ready now.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Align the sample and its documentation with the other basic samples.
Adjust the fade algorithm so that it looks better and takes less time
to verify by taking 2.5 seconds instead of 10.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
The difference between "blinky" and "blink_led" is not clear.
This rename makes it more obvious that "blinky_pwm", well,
blinks an LED using PWM.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Align this sample's source code and documentation with other basic
samples.
Adjust the logging configuration and output some additional printk()s
at startup to make it more obvious that initial errors are device
specific and related to calibration.
Fix the period calculation logic so the sample does not stick at the
maximum and minimum periods for two consecutive four-second periods.
That is, instead of setting the pin period to MIN_PERIOD_USEC twice in
a row, do it only once before doubling again, and similarly for
max_period.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Clean up the code and fix the documentation, which is out of date and
still refers to information from the days of board.h.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Several reviewers agreed that DT_HAS_NODE_STATUS_OKAY(...) was an
undesirable API for the following reasons:
- it's inconsistent with the rest of the DT_NODE_HAS_FOO names
- DT_NODE_HAS_FOO_BAR_BAZ(node) was agreed upon as a shorthand
for macros which are equivalent to
DT_NODE_HAS_FOO(node) && DT_NODE_HAS_BAR(node) &&
- DT_NODE_HAS_BAZ(node), and DT_HAS_NODE_STATUS_OKAY is an odd duck
- DT_NODE_HAS_STATUS(..., okay) was viewed as more readable anyway
- it is seen as a somewhat aesthetically challenged name
Replace all users with DT_NODE_HAS_STATUS(..., okay), which is
semantically equivalent.
This is mostly done with sed, but a few remaining cases were done by
hand, along with whitespace, docs, and comment changes. These special
cases include the Nordic SOC static assert files.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
File system support is built into the Bluetooth overlay, but can now
also be enabled independently for other transports.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Make sure that we have proper network interface which support
VLAN and LLDP in this sample.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Use a complete identifier, first two parts are section.subsection, then
at least another part for the specifics being tested.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit adds a `tfm_level_1` samples app that shows how
to use the PSA APIs in IPC mode in a real-world example.
It makes use of the crypto, initial attestation and secure
storage modules.
Signed-off-by: Kevin Townsend <kevin@ktownsend.com>
This commit adds a minimal sample application showing how
TF-M can be used in IPC mode, with Zephyr providing the
non-secure processing environment image, and linking against
the PSA APIs implemented in TF-M.
This commit also include work from the commit quoted below,
which is included here for attribution purposes:
tfm_ipc: cmake: now using tfm_ipc library created by TF-M module
This commit removes the need for local knowledge of the TF-M
repository structure and files.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Karl Zhang <karl.zhang@linaro.org>
This commits adds a config option to build a PSA trusted-firmware-m
(TF-M) application image for the secure processing environment, and
configures the Zephyr application image for the non-secure processing
environment. The secure and non-secure environment images will be
linked together via the veneer function table that is produced as an
artifact of the TF-M build process.
Signed-off-by: Karl Zhang <karl.zhang@linaro.org>
Use DT_INST_SPI_DEV_HAS_CS_GPIOS() in drivers to determine if we should
utilize CS_GPIO base SPI chipselect handling. This allows us to remove
Kconfig option for this feature.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Usually, we want to operate only on "available" device
nodes ("available" means "status is okay and a matching binding is
found"), but that's not true in all cases.
Sometimes we want to operate on special nodes without matching
bindings, such as those describing memory.
To handle the distinction, change various additional devicetree APIs
making it clear that they operate only on available device nodes,
adjusting gen_defines and devicetree.h implementation details
accordingly:
- emit macros for all existing nodes in gen_defines.py, regardless
of status or matching binding
- rename DT_NUM_INST to DT_NUM_INST_STATUS_OKAY
- rename DT_NODE_HAS_COMPAT to DT_NODE_HAS_COMPAT_STATUS_OKAY
- rename DT_INST_FOREACH to DT_INST_FOREACH_STATUS_OKAY
- rename DT_ANY_INST_ON_BUS to DT_ANY_INST_ON_BUS_STATUS_OKAY
- rewrite DT_HAS_NODE_STATUS_OKAY in terms of a new DT_NODE_HAS_STATUS
- resurrect DT_HAS_NODE in the form of DT_NODE_EXISTS
- remove DT_COMPAT_ON_BUS as a public API
- use the new default_prop_types edtlib parameter
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Clarify in the docs the importance of generating a key type that matches
the configuration used to sign JWT tokens.
Signed-off-by: David Brown <david.brown@linaro.org>
Add the template config values to the prj.conf. These will need to be
changed according to the instructions in the README.rts.
Signed-off-by: David Brown <david.brown@linaro.org>
The instructions on setting the necessary Kconfig values is unclear.
Add a description based on values that can be found in the Google IoT
Core console.
Signed-off-by: David Brown <david.brown@linaro.org>
Add indication when sleep entry/exit counter do not match the test
expectations.
Measure deep sleep entry latency.
Add sleep entry/exit indication via gpios to debug.
Remove unnecessary trailing \n when using logging.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
This commit adds USB audio sample to the Zephyr project.
The sample configures one I/O device:
- Headset (2 channels, Fs=48kHz, PCM format)
Input data sstream is passed to output data stream.
For more details refer to README.rst.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
This commit adds USB audio sample for Zephyr project.
The sample configures two devices:
- Microphone (2 channels, Fs=48kHz, PCM format)
- Headphones (2 channels, Fs=48kHz, PCM format)
Input data stream is passed to output data stream.
For more details refer to README.rst.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
Recommend setting up the python-can configuration file before running
the sample Python snippets and remove the GNU/Linux specific comment
from each snippet.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Build a sample variant with CONFIG_POSIX_API enabled, to check that
we have select() call available to applications.
Also, bump stack size, as the app crashes now with the default size.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Update mbedTLS commit along with the following fixes:
* Fix naming inconsistencies in some cipher modes, to match core mbedTLS
configs
* Add Kconfig to enable CTR cipher mode
Fixes#22421
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
OpenThread throws a warning when minimal libc is used, as some of its
new files use stdlib functions not available in the minimal
implementation. It's not critical failure, as those new functions are
not linked anyway in default configuration, but the warnings do not
look well. Therefore, use newlib by default in the sample to prevent
warnings.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The DS3231 is an I2C real-time clock with internal temperature
compensated oscillator, maintaining civil time to 1 s precision with
nominal 2 ppm accuracy from 0-40 Cel.
The basic functionality is exposed as a counter that is always running
at 1 Hz. Much more functionality is exposed as driver-specific API,
including the ability to translate between the time scale of the DS3231
and the time scale of the Zephyr uptime clock. This allows correlation
of events in the system clock to UTC, TAI, or whatever time scale is
used to maintain the DS3231.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
This commit adds a sample application intended to present capabilities
of the flash driver for AT45 family chips and to serve as a reference
of how to make use of that driver.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
The LoRa shell requires the alias 'lora0' for the default radio. Use
the same alias for the samples to make them portable across different
radios and devices.
Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
Updates the fat_fs sample documentation to reflect that it can run on
multiple boards, not just the nrf52840_blip.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Refactors the fat_fs sample yaml to depend on a feature rather than
whitelisting specific boards. This implicitly extends the sample to
mimxrt10{60,64}_evk boards, since they already support the feature.
The only whitelist board remaining is the nrf52840_blip, which requires
a device tree overlay for this sample.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Refactors the fat_fs sample to move board-specific configurations to
separate files and support a shared prj.conf file.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit introduces dedicated return type for custom_handler.
Relevant code is updated to fulfill the API documentation.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
Port the I2S and DMIC drivers to the new timeout API so that they do
not need to enable legacy timeouts.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add a build-time assert to check that the configured SHM_SIZE
does not exceed the memory allocated as shared memory. USe DT
to extract the shared memory size.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Provide three basic examples to test the x-nucleo-iks02a1 shield:
- Test shield standard mode
Acquire sensor data from shield configured in mode 1.
- Test shield sensorhub mode
Acquire sensor data from shield configured in mode 2.
- Test on-shield microphone
Acquire microphone PDM audio and output it in 16-bit
PCM format to console.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Since this is such a basic sample, it's worth nitpicking the wording a
bit:
- Add a link to the supported boards, since many first time users
will not know where it is and may start near here.
- Remove the single and multi threaded note. There's no information on
how to build it in either of these two modes or what the default is,
so it feels like a distraction for such a basic sample.
- Give a clue about how to build for another board.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
The devicetree link is rendering as "Devicetree Guide" instead of
"devicetree". Fix that.
My guess is that most users won't care about the details of the
requirements, and rather just want to know if their board is supported
or not. So move the error you'll see on unsupported boards before the
details about how to add support (which involve a pretty significant
learning curve).
Also mention overlays as a way to get this working.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
LoRa drivers no longer depend on CONFIG_COUNTER. Remove this
configuration option from the samples.
Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
Rename DT_HAS_NODE to DT_HAS_NODE_STATUS_OKAY so the semantics are
clear. As going forward DT_HAS_NODE will report if a NODE exists
regardless of its status.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Restart scanning if connection creation fails; could happen
when devices with low RSSI are discovered but not available
thereafter to establish a connection.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added central sample to read die temperature value from peripheral
device.
Signed-off-by: Charan Pudiyaneravana Venkatesh <charan.pv@sixoctets.com>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Integrated temperature sensor sample fetch and use of the value
in the GATT indications.
Signed-off-by: Charan Pudiyaneravana Venkatesh <charan.pv@sixoctets.com>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This allows mass storage exposure of a littlefs file system,
specifically one on the SPI NOR flash of the nrf52840dk_nrf52840. In
combination with littlefs-fuse this allows a host system to examine
and change the local storage of a Zephyr application.
Note that it is critical that all parameters of the file system match
between what Zephyr is using and what littlefs-fuse is using.
Inconsistencies can produce confusing results where each system sees
different content. The README has been updated with a detailed
example.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Drop the old redefine-everything-in-a-special-conf approach and put
the customization appropriate for this board into the board directory
where it's handled automatically.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
The API call to close the flash area was only invoked when the flash
area was erased. It should be closed in all paths.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Convert all canbus related API/samples/tests/subsys
to the new timeout API with k_timeout_t.
Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
The NRF driver doesn't utilize the Kconfig symbol for per instance I2C
so we can remove setting that in the conf file.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Adapt to using new-style device tree macros
for shared memory base address and size.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Convert DT_RTC_0_NAME to DT_LABEL() references based on which driver is
enabled for the platforms the test is supported on (NRF & STM32).
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Topic subscribe() will allow cloud to send messages to
device. There will be a bit of network delay. But mqtt_input
was called only after publish() which will trigger every
10-15 seconds. Which is causing more delay to read published
messages from cloud even though messages are already available
at socket level.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Rather than redefining a macro which might be generated we should create
a new define name that should get used in the code. Replace redefining
DT_ALIAS_LED0_GPIOS_FLAGS with LED0_FLAGS and DT_ALIAS_LED1_GPIOS_FLAGS
with LED1_FLAGS.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Rather than redefining a macro which might be generated we should create
a new define name that should get used in the code. Replace redefining
DT_ALIAS_SW0_GPIOS_FLAGS with SW0_FLAGS and DT_ALIAS_LED0_GPIOS_FLAGS
with LED0_FLAGS.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Rather than redefining a macro which might be generated we should create
a new define name that should get used in the code. Replace redefining
DT_ALIAS_LED0_GPIOS_* and just use the LED_GPIO_* defines that already
exist.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Get rid of legacy timeout API and move to new timeout API for LoRa.
This involves changes to API, SX1276 driver and sample application.
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
This commit renames the CAN sample directory name from `CAN` to `can`
to be consistent with others.
Noting that the CAN driver test directory is named `tests/drivers/can`,
we have no excuse for naming the CAN driver sample directory
`samples/drivers/CAN`.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Convert to use DT_IRQN() and DT_IRQ() to get the irq number and priority
for the DT_NODELABEL(gpiote) device.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Substitute integral constants where call sites passed named constants
that have timeout values as arguments to parameters that expect
millisecond durations.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Convert bluetooth samples or board samples using bluetooth to use the
new k_timeout_t struct.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This is more a sample than a test, so put it under samples with the goal
of having dedicated tracing tests in the future under tests.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Standard "Requirements" section copied from other networking samples,
making clear the network connection requirements and linking to
instructions for QEMU networking.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
To make sure this sample is built in CI.
Also includes fixing prototype of main() to make it build without
warnings (which would be errors in CI).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Convert CAN to use a chosen node property that is similar to how we
handle zephyr,entroy or zephyr,flash-controller as the means to select a
specific peripheral instance utilized by a subsystem.
Replace references of the form:
alias {
can-primary = &can1;
};
with:
chosen {
zephyr,can-primary = &can1;
};
Replace various macro/define references with either
DT_CHOSEN(zephyr_can_primary) or replace DT_ALIAS_CAN_PRIMARY_LABEL
with DT_CHOSEN_ZEPHYR_CAN_PRIMARY_LABEL.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The SoC node has compatibles for the specific SoC in place, having the
same compatible at the top level is technically a conflict and the
top-level one should really just be about the board. Remove the SoC
related compatibles at the top-level.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Remove logging of individual threads spread out throughout the
bluetooth subsystem. The stacks can be analysed by enabling the
following options.
CONFIG_THREAD_ANALYZER=y
CONFIG_THREAD_ANALYZER_AUTO=y
CONFIG_THREAD_ANALYZER_RUN_UNLOCKED=y
Optional:
CONFIG_THREAD_NAME=y
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add debug configuration to easily enable logging through RTT. Required
to use RTT since the UART is otherwise used for the h4 UART driver.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Roughly based on eventfd example code from Linux manpages. Similarly
to other POSIX-compatible sample, Makefile.posix is provided to build
the code on a POSIX system (in this case, as eventfd() is
Linux-specific, this has to be a Linux system).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This commit renames all local definitions with the name `PORT` in the
net samples, in order to prevent name conflict with certain HALs
(notably, Atmel SAM E5x HAL).
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Replace DT_FLASH_DEV_NAME with DT_CHOSEN_ZEPHYR_FLASH_CONTROLLER_LABEL.
We now set zephyr,flash-controller in the chosen node of the device
tree to the flash controller device.
NOTE: For a SoCs with on die flash, this points to the controller and
not the 'soc-nv-flash' node. Typically the controller is the
parent of the 'soc-nv-flash' node).
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit renames the Kconfig `FLOAT` symbol to `FPU`, since this
symbol only indicates that the hardware Floating Point Unit (FPU) is
used and does not imply and/or indicate the general availability of
toolchain-level floating point support (i.e. this symbol is not
selected when building for an FPU-less platform that supports floating
point operations through the toolchain-provided software floating point
library).
Moreover, given that the symbol that indicates the availability of FPU
is named `CPU_HAS_FPU`, it only makes sense to use "FPU" in the name of
the symbol that enables the FPU.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Reworked spi_sam driver to utilize new DT_INST macros as part of
this rework we also now get pin ctrl/mux configuration information
from the device tree instead of via Kconfig and defines in soc_pinmap.h
We remove defines from dts_fixup.h and soc_pinmap.h and associated
Kconfig symbols that are no longer needed due to getting all that
information from devicetree.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Tests were failing as they were looking for an alias which didn't exist
Also, because some code in kscan_handlers.c wasn't compilable
Signed-off-by: Mark Olsson <mark@markolsson.se>
The sensor is on the nrf9160_innblue22 not nrf9160_innblue21. This
causes CI build failures since there is no dts node for the sensor
on the nrf9160_innblue21 board.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert driver to use DT_INST_ defines. As part of this conversion we
remove the Kconfig options for per GPIO controller enables and instead
get that information from device tree. This means we now disable each
GPIO controller by default in the DTS and have each board dts enable the
GPIO controller ports it needs.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
board support nrf9160_innblue22 includes the sensor in
nrf9160_innblue22_common.dts, explicit overlay can be removed
Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
Convert driver to use new DT_INST macros throughout. We update one
sample app to use a nodelabel reference. We also remove defines in
dts_fixup.h as they are no longer needed.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
According Mesh Profile 1.0.1. A application key shall
binding single network key. And Device key shall bind all
network key, and dev key only known by cfg_cli and node self,
only used by cfg_cli & cfg_srv.
Fixes: #21088
Signed-off-by: Lingao Meng <mengabc1086@gmail.com>
Extend sample code to demonstrate the eSPI API to read/write flash.
Remove trailing \n
Use LOG_ERR when applicable instead of LOG_WRN
Treat warnings as errors.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Provide a description of the sample and how it works with different
power supply source configurations.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
When the system is powered directly a measurement of Vdd provides the
battery voltage. This requires a different ADC configuration and
level curve.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
To obtain lower power measurements in general, we should turn off the
external flash which is on by default at boot.
Code is modeled based on examples shipped in the TI SimpleLink SDK.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Adding an example that exercises the sleep modes, then powers off the
system by going into deep sleep.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Replace use of Kconfig UART_X symbols by calls to DT API.
Clean driver from symbols definitions
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This selects CONFIG_BT_HCI_RAW_H4 which indicates to hci_raw to handle
H:4 header automatically.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This makes hci_raw to manage RX and TX buffers so its logic don't have
to be replicated on each an every driver/application, it also makes it
simpler to deal with extra headers for H:4 mode since that then can be
done at earlier at buffer allocation.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds USB_PID_BLE_HCI_H4_SAMPLE along with it driver which uses H4
over bulk endpoints.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Convert from using dts_fixup.h based macros to DT_INST macro. This lets
us remove the dependancy on dts_fixup.h for this driver.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Added default configuration files for nrf5 boards so the sample
is building with expected features for these boards.
Would be greater to use OVERLAY_CONFIG instead of files addition,
but that doesn't work from CMakeLists.txt scope.
fixes#24442
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Now the ARC SecureShield related features are experimental. The ARC
normal application cannot run alone, need the secure service example to
initialize the context and boot.
Here move ARC normal related configurations out of board dir to
avoid the impact of CI test and the confusion to users.
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
Move to the new devicetree API and stop using DT_WDT_0_NAME fixup
macros. All existing in-tree SoCs with fixup names are still supported
here via compatible. The watchdog0 alias is also still supported.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
During the last refactoring of the sample, CONFIG_MCUMGR_CMD_FS_MGMT
was mistakenly set to n instead of y for the bluetooth transport.
Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@prevas.dk>
This sample now supports SMP UDP transport.
Two config overlays have been added for ipv4 and ipv6, respectively.
The sample documentation has been completely revamped to be less
bluetooth focused and more general.
Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@prevas.dk>
To prepare this sample supporting future SMP transports, the sample
code is now split into a main and bluetooth file. A common config
has been identified and application specific config is put into
overlay config files.
Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@prevas.dk>
This board contains an on-board Winbond W25Q16.
The chip is connected to spi1 using PB3-PB5 and PB0 as CS.
Signed-off-by: Bjarne Steinsbo <bjarne@gmail.com>
Remove usage of Kconfig symbols I2C_X and rely on overlay
to enable i2c instances in samples for stm32 boards
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This patch introduces two major changes to the directed advertising
feature of the bluetooth host.
Deprecating the bt_conn_create_slave_le, and removing
bt_conn_le_create_slave which has never been released. This behaviour
has now been moved by to providing the peer direct address into the
advertising parameters.
Introducing directed advertising support for nonconnectable
directed extended advertising, both scannable and non-scannable.
A bug was also fixed in the the directed-adv command in the shell
when the argument "low" was given. The advertiseng parameter pointer
declared with BT_LE_ADV_CONN_DIR_LOW_DUTY was declared in a scope that
was no longer valid when it was used to start the advertiser.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Convert driver to use new DT_INST macros throughout. Removed per
instance Kconfig symbols and replaced with DT_NODELABEL references where
needed.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
I personally don't find it very useful to have to maintain prj.conf
and prj_spi.conf for this sample. The information we need to make
this application "just work" with regards to the bus is available in
the devicetree, and Kconfig can now access it using
dt_compat_on_bus().
Do so, enabling I2C and SPI appropriately when a sensor of the right
type is on either of those buses.
If no sensors are enabled, the user gets the build-time error message
in main.c about no devices being found.
This approach is prone to the "stuck symbol" Kconfig problem covered
in our documentation, so a pristine build is necessary to change the
default settings from a previous build.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Use instance zero of the compatible to get the device instead of
fixing a label. Print the used label for help debugging, and the
results of finding the device (or not), with a hint about what might
have gone wrong in case of failure.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
The nrf52840-DK doesn't have this sensor built-in, so it's likely
users will be getting this sensor from a breakout board. The ones that
Sparkfun and Adafruit sell pull up the LSB address pin, so the default
address is 0x77 on those boards.
Let's follow along with them instead of using 0x76, because those are
the boards that come up first in the results when you google "BME280
breakout board" from where I'm sitting.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This helps debug issues with the device. Samples should try to be
helpful to first-time users. Send printk() to logging so it doesn't
fight over the UART.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Add bq274xx sample with reading and showing all
possible values from the sensor.
Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
Signed-off-by: NavinSankar Velliangiri <navin@linumiz.com>
Replace CONFIG_ENTROPY_NAME with DT_CHOSEN_ZEPHYR_ENTROPY_LABEL. We now
set zephyr,entropy in the chosen node of the device tree to the entropy
device.
This allows us to remove CONFIG_ENTROPY_NAME from dts_fixup.h. Also
remove any other stale ENTROPY related defines in dts_fixup.h files.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Those are used only in tests, so remove them from kernel Kconfig and set
them in the tests that use them directly.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The variables passed by sanitycheck and west were being ignored because
cmake knows nothing about them.
Fixes#24178
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The origin for sleeping for 3ms after coming out of deep sleep
was to wait for PLL to lock so that UART would not send
garbage characters due to incorrect clock. In the deep sleep
code, it spins to wait for the PLL to lock so there is no need
to wait for 3ms in the app. So shorten it like other busy wait.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Threads are being re-used for multiple runs, so it is better to
stop the threads before reusing the variables for new threads.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This application was initially intended to be a manual, interactive
sample, run by a user. However, it's also a useful real-world
integration test, to be run in automated CI systems. So, provide
a config suitable for such a usage: use local host machine as a
server (to not depend on availability and characteristics of an
Internet connection), and have a concrete completion criteria
(by limiting number of iterations; given that performance of TCP
is not to be not too high, limit it to just 1 for now).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Initially, this was intended to be a sample for manual "burnout"
testing, e.g. see if a device with it can run for 24hrs, or download
1GB of data, or similar.
It's however also useful for automated CI testing, but then we need
to have more specific completion criteria. So, allow to specify
number of download iterations via local Kconfig.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
To streamline management of multiple test configurations (which
now can go into separate config/overlay files instead of patching
source).
Note that now that this option is introduced, it must be set to
a correct value for any Zephyr config, thus we set it in
overlay-tls.conf. But the sample also supports building under a
POSIX environment (using Makefile.posix), which doesn't use
Zephyr's config system, so suitable defaults still should be
present in the C source file.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Fixes: #24158
The shell/fs sample was using APPLICATION_SOURCE_DIR before it has been
defined.
This has now been fixed to use the proper way of overlaying board
specific settings using boards folder.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
The lpcxpresso55s69 board has an mma8652 accelerometer which is
compatible with the fxos8700 driver in accel-only mode. Now that this
board has an i2c driver, include it in the platform whitelist.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Mention in websocket API documentation that the timeout value
is in milliseconds. Check timeout values properly using K_TIMEOUT_EQ()
macro.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Use k_timeout_t internally, no change to user API.
Clarify the documentation of the timeout parameter that it is
in milliseconds.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Use 64-bit time in order to avoid overlaps, and do not use K_MSEC()
as that will convert to k_timeout_t which we do not want in this
case.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The samples/sensor/sensor_shell sample was introduced after deprecation
of set_conf_file and thus was not adopted to the new recommended board
conf file overlay.
This commit align this sample with the rest of Zephyr's samples.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Always try to fallback to video software pattern generator, allowing
to run the sample, even when there is no real sensor connected.
(e.g. mimxrt1064 without mt9m114).
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
We rename the nRF53 Dev Kit board target (nrf5340_dk_nrf5340)
to nrf5340pdk_nrf5340. We update all associated references
in the supportive documentation and all nRF5340-related
cofigurations and overlay files in the samples and tests
in the tree.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
The board name for the Thingy:52, so far known as nrf52_pca20020, is
renamed to thingy52_nrf52832. Its documentation and all references to
its name in the tree are updated accordingly. Overlay and configuration
files specific to this board are also renamed, to match the new board
name.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The board name for the nRF52840 Dongle, so far known as
nrf52840_pca10059, is renamed to nrf52840dongle_nrf52840. Its
documentation and all references to its name in the tree are updated
accordingly. Overlay and configuration files specific to this board are
also renamed, to match the new board name.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The board name for the nRF52 DK, so far known as nrf52_pca10040, is
renamed to nrf52dk_nrf52832. Its documentation and all references
to its name in the tree are updated accordingly. Overlay and
configuration files specific to this board are also renamed, to
match the new board name.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Enables PWM support using the built-in red LED. Tested with:
- samples/basic/blink_led
- samples/basic/fade_led
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
The fxos8700 sample application configures the sensor driver to sample
data at 6.25 Hz. Most configurations use the sensor data ready interrupt
to throttle the loop, but it's possible to configure the sample not to
use the data ready interrupt. In this case, throttle the loop with a
delay so it doesn't outpace the sensor data.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The frdm-kl25z, bbc_microbit, and reel_board have an mma8xxx
accelerometer and therefore must use the fxos8700 driver in
accelerometer-only mode instead of hybrid mode. Refactor these boards
into a separate test that uses the prj_accel.conf configuration as
described in README.rst.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Kconfig options that enable I2C and SPI instances are no longer used
in nRF drivers. Remove all assignments done to these options in related
board definitions, samples, and tests.
For nrf52_pca20020, also no longer needed setting of default values
for GPIO_SX1509B* options is removed (now the gpio_sx1509b driver is
enabled by default when a corresponding devicetree node is enabled).
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Remove prompts from Kconfig options `UART_x_NRF_UART*` that select
the type of nrfx driver (for UART or UARTE peripheral) to be used
for a given instance. This prevents the options from being modified
from configuration files.
Instead, make one of these options selected by default according to the
"compatible" property set for the corresponding UART node in devicetree.
This eliminates the need of changing both the "compatible" property in
devicetree and the Kconfig option selecting the driver type when a user
wants to switch between UART and UARTE for a given instance.
Since all `UART_x_NRF_UART*` options are made "hidden" by this commit,
all their occurrences in configuration files are removed.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Remove prompts from Kconfig options `SPI_x_NRF_SPI*` that select the
type of nrfx driver (for SPI, SPIM, or SPIS peripheral) to be used
for a given instance. This prevents the options from being modified
in configuration files.
Instead, make one of these options selected by default according to the
"compatible" property set for the corresponding SPI node in devicetree.
This eliminates the need of changing both the "compatible" property in
devicetree and the Kconfig option selecting the driver type when a user
wants to switch between SPI, SPIM, and SPIS for a given instance.
Since all `SPI_x_NRF_SPI*` options are made "hidden" by this commit,
all their occurrences in configuration files are removed.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
The last regex in the yaml file did not match when executing the test on
an embedded target. The expected two spaces are not present at the
beginning of the line.
Fixes#23919
Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
Even though radio driver can report in its capabilities that it does
support CSMA CA, there's no way in the driver to select how the frame
should be transmitted (with CSMA or without). As layers above radio
driver (Thread, Zigbee) can expect that both TX modes are available, we
need to extend the API to allow either of these modes.
This commits extends the API `tx` function with an extra parameter,
`ieee802154_tx_mode`, which informs the driver how the packet should be
transmitted. Currently, the following modes are specified:
* direct (regular tx, no cca, just how it worked so far),
* CCA before transmission,
* CSMA CA before transmission,
* delayed TX,
* delayed TX with CCA
Assume that radios that reported CSMA CA capability transmit in CSMA CA
mode by default, all others will support direct mode.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Run the int_literal_to_timeout Coccinelle script to fix places where
it is clear that an integer duration is being passed where a timeout
value is required.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Updated sample config to allow emulation of 8-bit write block.
(because the nRF Flash driver has changed its default write block size
to 32-bit aligned)
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
This sample is designed to respond to the Linux
rpmsg sample client.
It should be platform independent and based on the
the integration of a resource table in the elf file.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Add a k_timeout_t type, and use it everywhere that kernel API
functions were accepting a millisecond timeout argument. Instead of
forcing milliseconds everywhere (which are often not integrally
representable as system ticks), do the conversion to ticks at the
point where the timeout is created. This avoids an extra unit
conversion in some application code, and allows us to express the
timeout in units other than milliseconds to achieve greater precision.
The existing K_MSEC() et. al. macros now return initializers for a
k_timeout_t.
The K_NO_WAIT and K_FOREVER constants have now become k_timeout_t
values, which means they cannot be operated on as integers.
Applications which have their own APIs that need to inspect these
vs. user-provided timeouts can now use a K_TIMEOUT_EQ() predicate to
test for equality.
Timer drivers, which receive an integer tick count in ther
z_clock_set_timeout() functions, now use the integer-valued
K_TICKS_FOREVER constant instead of K_FOREVER.
For the initial release, to preserve source compatibility, a
CONFIG_LEGACY_TIMEOUT_API kconfig is provided. When true, the
k_timeout_t will remain a compatible 32 bit value that will work with
any legacy Zephyr application.
Some subsystems present timeout (or timeout-like) values to their own
users as APIs that would re-use the kernel's own constants and
conventions. These will require some minor design work to adapt to
the new scheme (in most cases just using k_timeout_t directly in their
own API), and they have not been changed in this patch, instead
selecting CONFIG_LEGACY_TIMEOUT_API via kconfig. These subsystems
include: CAN Bus, the Microbit display driver, I2S, LoRa modem
drivers, the UART Async API, Video hardware drivers, the console
subsystem, and the network buffer abstraction.
k_sleep() now takes a k_timeout_t argument, with a k_msleep() variant
provided that works identically to the original API.
Most of the changes here are just type/configuration management and
documentation, but there are logic changes in mempool, where a loop
that used a timeout numerically has been reworked using a new
z_timeout_end_calc() predicate. Also in queue.c, a (when POLL was
enabled) a similar loop was needlessly used to try to retry the
k_poll() call after a spurious failure. But k_poll() does not fail
spuriously, so the loop was removed.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Kernel timeouts have always been a 32 bit integer despite the
existence of generation macros, and existing code has been
inconsistent about using them. Upcoming commits are going to make the
timeout arguments opaque, so fix things up to be rigorously correct.
Changes include:
+ Adding a K_TIMEOUT_EQ() macro for code that needs to compare timeout
values for equality (e.g. with K_FOREVER or K_NO_WAIT).
+ Adding a k_msleep() synonym for k_sleep() which can continue to take
integral arguments as k_sleep() moves away to timeout arguments.
+ Pervasively using the K_MSEC(), K_SECONDS(), et. al. macros to
generate timeout arguments.
+ Removing the usage of K_NO_WAIT as the final argument to
K_THREAD_DEFINE(). This is just a count of milliseconds and we need
to use a zero.
This patch include no logic changes and should not affect generated
code at all.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
We rename the nRF91 Dev Kit board target for the NRF52840
controller (nrf52840_pca10090) to nrf9160dk_nrf52840. We
update all associated references in the supportive
documentation and all nRF9160-related cofigurations and
overlay files in the samples and tests in the tree. We
also remove an un-referenced board image file that had
erroneously been part of the documentation of this platform.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
We rename the nRF91 Dev Kit board target (nrf9160_pca10090)
to nrf9160dk_nrf9160. We update all associated references
in the supportive documentation and all nRF9160-related
cofigurations and overlay files in the samples and tests
in the tree.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit removes the Kconfig MAC address configurations for the
`sam_e70_xplained` board, as these have been migrated to use the device
tree configurations.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The MAX_PAYLOAD_SIZE must reflect the size of COAP_BLOCK_x. This is
necessary becase BLOCK size represents max payload size. The current
value create inconsistencies for coap lib. The same way,
MAX_DOWNLOAD_DATA must allocate sufficient space for MAX_PAYLOAD_SIZE
plus all space for coap header etc.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
This is a follow-up to commit 4253eae005.
The board known earlier as nrf52840_pca10056 is now named
nrf52840dk_nrf52840.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Use the scan types defined in bluetooth.h instead of the hci defined
ones. Although they have the same value it is best to avoid using the
hci.h header in applications.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Deprecate BT_LE_ADV defines in hci.h that are expected to be used by the
application in the scan received callback to identify the advertising
PDU type. These defines are mixing HCI input parameters and advertising
PDU types. Internally it is acceptable to mix these, but at the API we
should to mix in them.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Rename filter_dup parameters used for scanning filter options to the
more generic name options, and make scan filter options follow same
naming patters as advertising and initiator scan options.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Deprecate bt_create_conn_le and rename it to in order to add return
code, new arguments and to follow the established naming convention.
Add API for the application to control the scan parameters of the
initiator role. This allows the application more scheduling control
of the initiator in multi-role scenarios. Also provides options to
configure the initiator for LE Coded PHY for long range support.
We deprecate the old way of creating connection to make the name more
consistent with the rest of the API.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
We can build the openamp library configured with VirtIO master
support, VirtIO slave support, or both. By default both master
and slave code is enabled. We can reduce code footprint by only
build master or slave as needed.
Expose Kconfig options for Master & Slave and set them accordingly in
the sample.
Here's the code reduction we see:
For the total image we see as 1260 byte reduction:
Memory region Used Size Region Size %age Used
FLASH [Master & Slave]: 30308 B 256 KB 11.56%
FLASH [Master only] : 29048 B 256 KB 11.08%
On the remote side we see a 828 byte reduction:
Memory region Used Size Region Size %age Used
FLASH [Master & Slave]: 11564 B 64 KB 17.65%
FLASH [Slave only] : 10736 B 64 KB 16.38%
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Using find_package to locate Zephyr.
Old behavior was to use $ENV{ZEPHYR_BASE} for inclusion of boiler plate
code.
Whenever an automatic run of CMake happend by the build system / IDE
then it was required that ZEPHYR_BASE was defined.
Using ZEPHYR_BASE only to locate the Zephyr package allows CMake to
cache the base variable and thus allowing subsequent invocation even
if ZEPHYR_BASE is not set in the environment.
It also removes the risk of strange build results if a user switchs
between different Zephyr based project folders and forgetting to reset
ZEPHYR_BASE before running ninja / make.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Just to get something to test for PM, via frdm_k64f board. So only this
board will get PM enabled.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
The nRF52840 DK board target, so far known as nrf52840_pca10056,
is renamed to nrf52840dk_nrf52840.
Its documentation and all references to its name in the tree are
updated accordingly. Overlay and configuration files specific to
this board are also renamed, to match the new board name.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
AN521 is a dual core FPGA on MPS2+ with both cores are CM33. Add openAMP
to support on it.
Core 0 is primary core, it runs as master, core 1 is remote, it runs
as slave.
Signed-off-by: Karl Zhang <karl.zhang@linaro.org>
Add configuable shared memory address for openAMP samples. There is a
plan to add more platforms supported for openAMP in zephyr.
Each platform can specify the shared memory address and device by
device tree and add it's support in openAMP samples.
Signed-off-by: Karl Zhang <karl.zhang@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
gpio_pin_get() returns a negative value in case of error and
callbacks_configure was assigning this value to an unsigned variable.
Fixes: #22643
Coverity CID :208206
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
In addition to the existing plain TCP MQTT test, add the same test
with TLS applied. Robert Lubos provided the updated test_cert.h, which
contains the same certificate as in the echo samples.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
OpenThread NCP sample application.
Tested on FRDM-K64 with RF2XX connected via USB to a Linux machine
running wpantund.
Signed-off-by: Markus Becker <markus.becker@tridonic.com>
This doesn't sacrifice any readability when compiled for boards that
don't support this alias.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This is joint work with Kumar Gala (see signed-off-by).
Document the changes to the generated node macros in macros.bnf,
moving the old file to legacy-macros.bnf and putting it in its own
section.
The actual generated macros are now a low-level detail, so rewrite the
foregoing sections as examples in terms of the new <devicetree.h> APIs.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
We rename the nRF51 Dev Kit board target (nrf51_pca10028)
to nrf51dk_nrf51422. We update all associated references
in the supportive documentation and all nRF51-related
cofigurations and overlay files in the samples and tests
in the tree.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
The documentation motivates this function by saying it is more
efficient than the core 64-bit version. This was untrue when
originally added, and is untrue now. Mark the function deprecated and
replace its sole in-tree use with the trivial equivalent.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Allocates segmented message buffers as slabs in a common pool for RX and
TX. This reduces memory requirements for both TX and RX, as TX messages
can be stored without the network and advertising buffer overhead, and
RX can use only the slabs it needs, instead of allocating a full size
segmented message. This approach also removes the need for decrypting
the segments for each retransmission, reducing overall processing load.
Slab based segmentation for tx also introduces queuing of segmented
messages, which allows the application layer to send multiple messages
to the same destination without violating Bluetooth Mesh specification
v1.0.1, section 3.6.4.1. This mechanism is provided through a flag that
blocks segmented messages to a destination which a message is already
being sent to until the previous message finishes.
This changes the SDU size configuration to a symmetrical
RX_SEG_MAX/TX_SEG_MAX pair of configurations, plus a new segment pool
side configuration. It also removes the binding between the TX_SEG_MAX
config and the advertising buffers, reducing the minimum advertising
buffer count from 6 to 3.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Cloud to device communication supported with simple
subscribe topic details. Details are added for how to send
messages from cloud.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Name all subsystem reference consistently with an '_api' postfix and
clean up naming and folder structure in some cases.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Various kconfig symbols where defined specifically for board
nucleo_l432kc. Though, most are generic to the sample so should moved
directly to sample prj.conf
Some others parts of boards default configuration so could be removed
as well.
Last remove CONFIG_OPENOCD_SUPPORT as sample has no dependency with
this symbol.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
No use starting the application if the network interface is down.
So start to listen connection management events and start the
TCP and UDP handlers only after network is up and ready.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Modify the mqtt_publisher sample app to return an exit code after
its tests have been run. Add Kconfig options to set the number of
test iterations per TCP connection as well as the number of TCP
connections to make to the server while keeping the default values
intact. Further add a config overlay file to lower the number of
TCP connections and test iterations used.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
Without it, the sample crashes for qemu_x86 with:
[00:00:03.080,000] <err> os: Page fault at address 0x7275632f
(error code 0x10)
[00:00:03.080,000] <err> os: Linear address not present in page tables
[00:00:03.080,000] <err> os: PDPTE: Non-present
...
Increase by reasonable, but small amount, to keep watching stack usage
growth trends in Zephyr.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Sample code that showcase PECI API get device CPU information
then monitors temperature.
Verified in Modular MEC1501 connected to computer (PECI host).
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Remove data length and phy update set to 'n' on board that does not
support these features anyway. BT_CTLR_DATA_LEN_SUPPORTED and
BT_CTLR_PHY_UPDATE_SUPPORTED are both set to 'n'.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Remove BT_CTLR_DTM_HCI=y config which is not supported for this board.
This produced the following warning:
warning: BT_CTLR_DTM_HCI was assigned the value
'y' but got the value 'n'. Check these unsatisfied dependencies:
BT_CTLR_DTM_HCI_SUPPORT (=n).
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Refactor conf files to use prj.conf + board/<board>.conf configuration.
This allows us to have put common configurations into the prj.conf and
have board specific configs in each board file.
This also respects adding additional prj.conf files such as
-DCONF_FILE='nrf5.conf debug.conf' to add debug configuration.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Update main stack size for nrf5 boards. This is to support an
alternative hci_driver that has a higher stack size usage in hci driver
open. Measured stack usage in this case to 808/1024.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add sample of how to handle eSPI host warnings when these are
intercepted by app code.
Replace printk with logging macros to standardize the sample.
Log additional details about peripheral channel notifications.
Remove unnecessary trailing \n from logging messages.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Sample code that demonstrates power management features on
MEC15xx-based boards.
It showcases how an app can enter into light and deep sleep.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
This sample has nrf51_pca10028 on its platform_whitelist but lacks
configuration and overlay files that would make it possible to build
this sample for that board. This commit provides such files.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Once the MQTT ping response has been received from the server, the
application is then notified with the MQTT_EVT_PINGRESP event.
Signed-off-by: PK Chan <pak.kee.chan@nordicsemi.no>
This change removes the hardcoded subsystem list in gen_kobject_list.py
favor of marking the relevant driver API structs with the _subsystem
sentinel.
Signed-off-by: Corey Wharton <coreyw7@fb.com>
In order to run the TTCN-3 based sanity check, add a TCP
sample app and instructions for running the sanity check.
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
Coverity thinks this is a long because FLASH_TEST_REGION_OFFSET is a
signed value. Zephyr doesn't use standard types so make it a u32_t.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This was silently corrupting memory on x86-64.
Enable CONFIG_TEST so that this is detected properly,
and increase the stack size appropriately.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This sample requires led0 in the board devicetree's /aliases.
Improve the error message when that is not available.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Improve the documentation of the blinky sample, fixing typos, adding
links to the relevant DT documentation and cleaning up a bit.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
And an overlay for the nRF52840 DK to be able to build the sample after
the transition to Device Tree.
Fixes#23148.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
To ease maintenance of samples and tests some SoCs define
CONFIG_WDT_DISABLE_AT_BOOT=y to disable the watchdog. Ensure the option
is set to n for samples and tests that require watchdog module not to be
disabled during boot.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
The sample contained calls that were not using the return
value, which was detected by Covery Scan as an issue. This
commit fixes it by changing to (void).
Fixes#18378
CID#203537
Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
Handle connected callback with error status not releasing the default
conn object in central samples. This can happen when the initiator fails
to create the connection within 3 seconds and is canceled by the host.
Also restart the scan role in this case.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
The one page on devicetree is too long. Split it into multiple pages
to make it easier to digest and more squintable. This is basically
just moving content around; minimal changes have been made apart from
redoing some transitions and adding a couple of introductory paragraphs.
Rename the 'device-tree' Sphinx :ref: target while we are here.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
After running command --list-test-duplicates
I found out that some test cases have same names (duplicated).
To get rid of it, I decided to change names in .yaml files
Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
This test can't be evaluated with sanitycheck, it
requires special set-up on multiple AMP cores to
function properly. Add build_only tag.
Fixes: #19643Fixes: #22317
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Replace Kconfig configuration data with devicetree bindings using
(ADC) io channels. Rework the sample to document expectations about
the relationship between the reference voltage and the divider input
voltage, and update the sensor configuration to support Nordic SAADC.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Replace Kconfig configuration data with devicetree bindings using
(ADC) io channels. Rework the sample to document expectations about
the relationship between the reference voltage and the divider input
voltage, and update the sensor configuration to support Nordic SAADC.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Fix the Python3 CANopen module installation instructions to refer to
the 'python-can' package instead of the nonexistent 'can' package.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add information about how to build and test atsamr21_xpro board with
IEEE 802.15.4 RF2xx driver.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Add special configuration for SAMR21 SoC. Since it have only 32k SRAM,
all possible application buffers need to be shrinked.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Add information about how to build and test atsamr21_xpro board with
IEEE 802.15.4 RF2xx driver.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Add special configuration for SAMR21 SoC. Since it have only 32k SRAM,
all possible application buffers need to be shrinked. This
configuration was tested with two boards for more than 2H with success.
[02:18:57.635,00] net_echo_server_sample: IPv6 UDP: Sent 333000 packets
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Add sample for AES Galois/Counter Mode (GCM) of operation with a MACsec
GCM-AES test vector.
Also improve existing code by declaring expected ciphertext arrays as
constant.
Signed-off-by: Markus Fuchs <markus.fuchs@de.sauter-bc.com>
The default DTS of VEGABoard does not enable the necessary nodes
for the SW LL to function; as such an overlay is needed for
each sample that is intended to be run on the VEGABoard. Some
of the samples miss this overlay so this patch adds them.
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
The existing stack_analyze APIs had some problems:
1. Not properly namespaced
2. Accepted the stack object as a parameter, yet the stack object
does not contain the necessary information to get the associated
buffer region, the thread object is needed for this
3. Caused a crash on certain platforms that do not allow inspection
of unused stack space for the currently running thread
4. No user mode access
5. Separately passed in thread name
We deprecate these functions and add a new API
k_thread_stack_space_get() which addresses all of these issues.
A helper API log_stack_usage() also added which resembles
STACK_ANALYZE() in functionality.
Fixes: #17852
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
All board defconfig files currently set the architecture in addition to
the board and the SoC, by setting e.g. CONFIG_ARM=y. This spams up
defconfig files.
CONFIG_<arch> symbols currently being set in configuration files also
means that they are configurable (can be changed in menuconfig and in
configuration files), even though changing the architecture won't work,
since other things get set from -DBOARD=<board>. Many boards also allow
changing the architecture symbols independently from the SoC symbols,
which doesn't make sense.
Get rid of all assignments to CONFIG_<arch> symbols and clean up the
relationships between symbols and the configuration interface, like
this:
1. Remove the choice with the CONFIG_<arch> symbols in arch/Kconfig and
turn the CONFIG_<arch> symbols into invisible
(promptless/nonconfigurable) symbols instead.
Getting rid of the choice allows the symbols to be 'select'ed (choice
symbols don't support 'select').
2. Select the right CONFIG_<arch> symbol from the SOC_SERIES_* symbols.
This makes sense since you know the architecture if you know the SoC.
Put the select on the SOC_* symbol instead for boards that don't have
a SOC_SERIES_*.
3. Remove all assignments to CONFIG_<arch> symbols. The assignments
would generate errors now, since the symbols are promptless.
The change was done by grepping for assignments to CONFIG_<arch>
symbols, finding the SOC_SERIES_* (or SOC_*) symbol being set in the
same defconfig file, and putting a 'select' on it instead.
See
https://github.com/ulfalizer/zephyr/commits/hide-arch-syms-unsquashed
for a split-up version of this commit, which will make it easier to see
how stuff was done. This needs to go in as one commit though.
This change is safer than it might seem re. outstanding PRs, because any
assignment to CONFIG_<arch> symbols generates an error now, making
outdated stuff easy to catch.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The loramac-node library uses math functions from math.h that
are not included in the minimal lib.
This commit changes the samples project config to always build
with newlib and adds a dependency to newlib.
Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
VEGABoard BLE controller implementation supports HCI over UART;
as such enable this configuration when building the hci_uart
sample.
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
Add STM32 CRYP driver support and a corresponding build-only test to
the crypto sample project.
Signed-off-by: Markus Fuchs <markus.fuchs@de.sauter-bc.com>
MetaIRQs are described in docs and exercised in tests, but there's no
sample explaining how they are intended to be used to perform
interrupt bottom half processing.
This simple tool spawns a set of worker threads at different
priorities (some cooperative) which process "messages" (which require
CPU time to handle) received from a fake "device" implemented with
timer interrupts. The device hands off the events directly to a
MetaIRQ thread which is expected to parse and dispatch them to the
worker threads.
The test demonstrates that no matter the state of the system, the
MetaIRQ thread always runs synchronously when woken by the ISR and is
able to preempt all worker threads to do its job.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Try and build the flash_shell on all platforms that have a flash driver
rather than a limited set of know platforms. This hopefully acts as a
build coverage test for all the flash drivers.
The flash shell requires around 10K of memory so limit it to systems
with 12K or more.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Reduce the default timeout in the CANopen sample from 50 milliseconds
to 1 millisecond. This vastly improves performance of the sample and
matches the example code present in the CANopenNode stack.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The DIS service requires BT_SETTINGS otherwise it will not have a
settings handler. Instead DIS will only use Kconfig to set it's
values.
Fixes: #22478
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
UDP portion of the echo_client sends 1 packet with the sample data.
(TCP can send chunks of it depending on the response of the send()
function.) Not every network interface can send a UDP packet large
enough to handle the size of the sample data.
Let's make sure to account for the network interface MTU when deciding
the amount of sample data to send.
Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/22447
Signed-off-by: Michael Scott <mike@foundries.io>
Use new API to configure and interact with GPIOs. Move GPIO
initialization from sample into driver. The existing physical/line
level control has been kept rather than converting to logical level
signals.
Also improve error messages.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Treat Kconfig-specific GPIOs as active-high (default) and use the
logic-level API to interact with them.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Update bluetooth hcp_spi sample to new GPIO API.
Following changes have been done:
- Use new gpio api functions
- Introduce define for dt generated gpio flags
- Update 96b_carbon_nrf51.dts according to new bindings
- Gpio IRQ pin is configured to output inactive
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Use new configuration API, replace callback enable/disable with
interrupt enable/disable, and set active level in devicetree source.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Convert to the new GPIO API using logical levels, and remove the
duplicate implementation of LED control that existed.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Update devicetree sources and bindings, switch to new GPIO API. Use
devicetree property name to identify interrupt signal.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Convert to the new API, using raw access since there is no Device-Tree
definitions for this particular sample.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Conver to the new GPIO API, using raw access since there is no DT
definitions for this particular usage of the pins.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Update sample overlays. Add GPIO flags to configuration state.
Refactor to split out setup/handle/process phases. Switch to new API
replacing callback dis/enable with interrupt dis/enable.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Converts the sdhc spi driver to the new gpio api. Updates device trees
for the olimexino_stm32 and nrf52840_blip boards to set appropriate
active high/low polarity for the spi chip select pin.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Since this was converted to the setup/handle/process idiom in master
the conversion is straightforward.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit updates the HMC5883L driver to use the new GPIO API.
Also add a note explicitly describing the active state of the DRDY
pin in the binding file.
Tested on frdm_k64f.
Signed-off-by: Kevin Townsend <kevin@ktownsend.com>
Update sample overlay for missing chip select and to deconflict with
UART TXD. Add GPIO flags to configuration state. Replace callback
enable with interrupt enable.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Add a sample overlay. Add GPIO flags to configuration state. Replace
callback enable with interrupt enable.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Update the gpio_counter sample app for the UP Squared board:
() Update configuration calls to use new flags.
() Separate pin configuration into setting it to input, and
setting the pin for interrupt.
() Use gpio_pin_set() instead of gpio_pin_write().
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This adds a board overlay for up_squared to be used with
the GPIO sample. Using the overlay is because the pins
being used are not actually LED and switch but GPIO pins
used as such.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Update sample application to use new GPIO API:
- GPIO flags defined by the devicetree
- replace gpio_pin_write with gpio_pin_set function
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Update ALERT active level in all devicetree files. Capture GPIO flags
in static configuration. Add internal API to enable and disable
interrupt, to release the handlers when an alert occurs, and to
re-enable the signal when the handler completes. Check for alerts
received during periods when the interrupt was disabled.
Extend the example to handle both above and below range triggers and
alerts that are present on startup.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Convert the GPIO based driver to the new GPIO API. (Only the
gpio_configure() call is affected).
Move configuration to DT where appropriate for both SPI and GPIO
drivers, only leaving the SPI vs. GPIO decision in Kconfig (in
addition to the basic enable for the driver.) Move some files around
to clean up as a result of this change.
led_ws2812 sample changes:
- make the pattern easier to look at by emitting less light
- use led_strip alias from DT to get strip device, allocate
appropriate struct led_rgb buffer, etc.
- move the pins around and remove 96b_carbon support (I have no board
to test with)
GPIO driver specific changes:
- str is required to write OUTSET/OUTCLR, not strb. The registers
are word-sized.
- the str[b] registers must all be in r0-r7, so "l" is the correct GCC
inline assembly constraint for both "base" and "pin"
SPI driver specific changes:
- match the GPIO driver in not supporting the update_channels API
method, which never made sense for this type of strip
- return -ENOMEM when the user tries to send more pixel data
than we have buffer space for instead of -EINVAL
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Switched from deprecated gpio_pin_write to gpio_pin_set and also add the
LED GPIO flags to the gpio configuration.
Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
Convert the sample to use the new GPIO API and additionally:
- add some error messages for unsuccessful GPIO API calls
- correct the index of `def_val` element used in the `right_button`
callback, to match the one used when the callback is installed
- use flags defined in devicetree for the pin that drives the LED
(for consistency, as this does not make much difference for a pin
that is only toggled)
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Implement the new GPIO driver APIs for the HT16K33 and update the
driver to use the new GPIO flags.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Update gpio_pin_configure() to take into account GPIO flags defined by
the devicetree. Use gpio_pin_get/gpio_pin_set to verify reading/writing
of logical pin values. Use gpio_pin_interrupt_configure() to configure
interrupts.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Eliminates CI build warnings such as this which breaks the build:
warning: NET_SOCKETS_POSIX_NAMES
(defined at subsys/net/lib/sockets/Kconfig:13) was assigned the value
'n' but got the value 'y'.
The testcase involves no offloading, which means it does not apply to
cc32xx.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
This PR eliminates the Kconfig warnings seen in build by setting the
options to the appropriate values for cc32xx platforms. They were
causing CI failures.
Fixes#22388
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Use the voltage divider devicetree binding to demonstrate measurement
of battery voltage for two Nordic-based boards that have the necessary
circuitry.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
This test uses bare variables to synchronize state between threads,
but had forgotten volatile qualifiers on all the data. So the
compiler was free to reorder and make assumptions that aren't valid
when the values are being written from other CPUs.
Single-cpu operation was fine because the code would always hit an
external function call like k_sleep() that would force it to re-read
from memory every time there was a context switch (timeslicing isn't
enabled on this test and the threads are cooperative), but on SMP the
volatiles can change at any time and we could see spurious state
mixups and hangs.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Add Kconfig option NET_SAMPLE_SEND_ITERATIONS that sets the number of
times the Zephyr echo client sample sends its data. By default the
value is zero, which means indefinite, and demonstrates the same
behavior as before.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
Extends the keyboard scan callback row and column arguments from 8-bits
to 32-bits to support a touch panel driver implementation.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This count is assigned to CONFIG_BT_ACL_RX_COUNT which expects a number
in the range of 1-64, otherwise kconfig fails.
Fixes#22259
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Write initial content of the display before blanking_off.
This allow faster update of the electronic ink displays as
the controller do not update the pannel when the banking
is enabled (currently this behaviour is only implemented
in gd7965 driver).
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Switch to `NET_SOCKET_REGISTER` mechanism over the offloaded API
registration.
Including the following fixes from the review:
* The fd returned by the socket accept call needs to be finalized,
similar to how it is done for socket creation.
* sl_RecvFrom() in TI SimpleLink Host driver does not support NULL
pointers for 'from' address and address length, and sl_SendTo() does
not ignore the destination address when in connection mode, so passing
NULL would cause a failure. These issues have been reported to TI
(CC3X20SDK-1970, CC3X20SDK-1971).
Let's use sl_Recv and sl_Send to implement recvfrom/sendto in the case
of NULL addresses.
* simplelink_poll() should not process negative file descriptors in the
fds array after sl_Selecti() returns. A negative fd value indicates
that the entry is invalid and should be ignored.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Added support for native_posix targets.
Added setting FS back-end initialization which is used by
native_posix targets.
The test harness was adapted to the fact that key-value pairs
read-out order might be different for each back-end when call
settings_load().
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Added sample for the settings subsystem.
The sample shows how to:
-initialize and register handler
-implement handles
-save and load data using registered handlers
-load subtree
-save or delete a certain value
-load subtree values or a value directly
- example on how to write data to the
setting destination and how to read data
from the setting destination using runtime API.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Fixed bug in udp.c in echo_client and echo_server samples.
The bug causes UDP sockets to not close if socket id is 0.
Signed-off-by: Magne Værnes <magne.varnes@nordicsemi.no>
Make sure that the echo-server compiles ok if IPv6 or IPv4 is
disabled when VLAN is enabled.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Adjust the configuration file, disable the SPI
driver and enable the QSPI driver and flash node.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Signed-off-by: Kamil Lazowski <Kamil.Lazowski@nordicsemi.no>
A configuration file attempted to select the external flash memory for
this platform, but there was no overlay that redefined the storage
partition to be on that device rather than the SOC flash.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Change to display RSSI and SNR values of the received data.
This change helps to test LoRa's communication distance and
communication quality.
Signed-off-by: Kwon Tae-young <tykwon@m2i.co.kr>
In order to better handle incoming data, wait() should return
the # of sockets with data returned by poll().
Based on this new return value, we can call mqtt_input() in a
smarter way.
Signed-off-by: Michael Scott <mike@foundries.io>
Now that mqtt_live() can send an EAGAIN message meaning: no ping
was generated, let's handle that in process_mqtt_and_sleep() by
skipping the call to mqtt_input() since no data will be expected.
Signed-off-by: Michael Scott <mike@foundries.io>
Introduce a new counter API function for reading the current counter
value (counter_get_value()) and deprecate the former counter_read() in
favor of this.
Update all drivers and calling code to match the new counter API.
The previous counter driver API function for reading the current value
of the counter (counter_read()) did not support indicating whether the
read suceeded. This is fine for counters internal to the SoC where the
read always succeeds but insufficient for external counters (e.g. I2C
or SPI slaves).
Fixes#21846.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Make sure that we do not calculate terminating \n when comparing
the received data to sent data because the \n is not part of
the lorem_ipsum buffer.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This sample keeps failing in CI due to some SMP issues currently being
addressed. Exclude until we have a fix.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Sample app compiled with the GSM modem driver enabling PPP.
This sample was tested with a Reel Board UART_1 connected via the
external board/connector and a FONA 808 modem. Reel board specific
suppor is found in boards/.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
This commit introduces the can-primary alias to identify
the primary CAN interface.
This alias is used for all samples and tests, so they don't
need to probe the right interface.
Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
The build infrastructure should not be adding the drivers subdirectory
to the include path. Fix the legacy uses that depended on that
addition.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The build infrastructure should not be adding the drivers subdirectory
to the include path. Fix the legacy uses that depended on that
addition.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The build infrastructure should not be adding the drivers subdirectory
to the include path. Fix the legacy uses that depended on that
addition.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The build infrastructure should not be adding the drivers subdirectory
to the include path. Fix the legacy uses that depended on that
addition.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The build infrastructure should not be adding the drivers subdirectory
to the include path. Fix the legacy uses that depended on that
addition.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The build infrastructure should not be adding the drivers subdirectory
to the include path. Fix the legacy uses that depended on that
addition.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The build infrastructure should not be adding the drivers subdirectory
to the include path. Fix the legacy uses that depended on that
addition.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
drivers/display.h was being included both as a double-quote direct
include and an angle-quote in the drivers parent directory. Both
resolve to the same file. Remove the unqualified reference.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
I2C interrupts usage should be the preferred way. This commit
enables them by default in the STM32 I2C driver itself.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Echo-server sample should not bail out on failed
accept() calls. This sample should close socket
in case of any errors and keep listening on socket
for further incoming connections.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Current sample certs and keys are not signed. Adding
signed certificates and keys. CA file also added.
This helps users to test with different kind of
configurations.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
With a recent change introduced a connectable advertiser will reserve
a connection object when started. In the disconnected callback the
disconnected connection object is not yet released, so the application
is not able to allocate this connection object for a new connectable
advertiser until after the disconnected callback.
reserve conn commit: 46bf20036a
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Enable CONFIG_TEST so that we get the necessary defines for
console output when a fatal error happens, as well as assertion
checking.
Remove an unnecessary self-abort in main(), this causes an
assert to fail. Letting main() return does the same thing, more
gracefully.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
A sample implementing NATS protocol that is not part of the Zephyr
networking subsystem. The implementation is not maintained and only
served as a proof of concept.
Related to #20017
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add a sample that demonstrates (and tests) that custom drivers can be
maintained outside of Zephyr.
The sample is fairly minimal with few dependencies and should
therefore be very portable. It also includes a sample.yaml that should
ensure that it does not regress.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
There was some unlocked initialization code in the "enc" thread that
would race with the "pt" and "ct" threads if another CPU was available
to run them (it was safe on UP because "enc" entered the queue first
and was cooperative, the others wouldn't run until it blocked).
Move it to main() and remove the enc_state guard variable which is no
longer doing anything.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Replaced NFFS mentions by LittleFS in all <board>.dts comments
to storage partitions.
Replaced NFFS by LittleFS in a few boards documentation.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
NFFS configuration was removed.
Added working configuration for nRF boards.
Documentation aligned to fact that littlefs is supported.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
This patch addapt the sample to using LittleFS as the FS back-end.
After NFFS will be removed this ensures mcumgr FS command functionality.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
smp_svr cleanu
Some architectures require more space on the stack when running samples
and tests while the philosopher test (cmsis_rtos_v1) is still using a
fixed-size stack size.
Since the test is going to use CMSIS v1 we cannot directly use
CONFIG_TEST_EXTRA_STACKSIZE to grow the stack size because the extra
space allocated can excess the maximum size allowed by CMSIS and defined
by CONFIG_CMSIS_THREAD_MAX_STACK_SIZE, causing the sample to halt on the
assertion (thread_def->stacksize <= CONFIG_CMSIS_THREAD_MAX_STACK_SIZE).
To avoid this problem (and align the test to what has been already done
on the philosopher test using CMSISv2) we set the stack size to the
maximum allowed size of CONFIG_CMSIS_THREAD_MAX_STACK_SIZE.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Add sample demonstrating the integration of CANopenNode in Zephyr to
support the CANopen protocol.
This fixes#15278.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
`TLS_PEER_VERIFY` and `TLS_DTLS_ROLE` options accept specific values,
yet no symbols were defined for them. In result, magic numbers were used
in several places, making the code less readable.
Fix this issue, by adding the missing symbols to the `socket.h` header,
and using them in places where related socket options are set.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This add details how build and flash the application. This diferentiate
between SoC and transceivers to help understand what user need to do to
build and flash successfully.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Create overlay-rf2xx.conf overlay file to enable Atmel rf2xx
transceivers on this application.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
generated_dts_board.h is pretty redundant and confusing as a name. Call
it devicetree.h instead.
dts.h would be another option, but DTS stands for "devicetree source"
and is the source code format, so it's a bit confusing too.
The replacement was done by grepping for 'generated_dts_board' and
'GENERATED_DTS_BOARD'.
Two build diagram and input-output SVG files were updated as well, along
with misc. documentation.
hal_ti, mcuboot, and ci-tools updates are included too, in the west.yml
update.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Move LVGL sample from samples/gui/lvgl to samples/display/lvgl to have
a unified location for display related samples.
Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
Remove ST7789V display sample as there is a unified display sample
in samples/drivers/display.
Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
Remove ILI9340 display sample as there is a unified display sample
in samples/drivers/display.
Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
OpenThread settings implementation built on top of Zepyhr settings
submodule.
With this solution, OpenThread settings are identified with keys of
the following format: `ot/id/instance`, where `id` is assigned by
OpenThread stack, and `instance` is a 32-bit random number, both in
hex. The implementation makes use of `settings_load_subtree_direct`
function to iterate over settings instances. This allows the
OpenThread settings layer to be a fully transparent shim layer between
OpenThread/Zephyr APIs.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Assignments have no effect on promptless symbols. Flagged by
https://github.com/zephyrproject-rtos/zephyr/pull/20742.
SHT3XD_TRIGGER is already being selected by
SHT3XD_TRIGGER_GLOBAL_THREAD, which is enabled in the same configuration
file.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Define CONFIG_NET_CONFIG_IEEE802154_DEV_NAME value necessary to enable
atsamr21_xpro board on wpanusb sample.
The documentation was updated referencing the atsamr21_xpro board.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Added harness config to sample in order for the sanitycheck tool
to run and understand whether the samples output is as expected.
Signed-off-by: Łukasz Hejnak <lukasz.hejnak@nordicsemi.no>
Add missing information to existing files in anticipation of whinage
from recently modified CI License checks.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Assignments have no effect on promptless symbols. Flagged by
https://github.com/zephyrproject-rtos/zephyr/pull/20742.
This symbol is select'ed automatically by the X86_MMU, ARM_MPU, and
ARC_MPU symbols.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Assignments have no effect on promptless symbols. Flagged by
https://github.com/zephyrproject-rtos/zephyr/pull/20742.
These configuration files all enable UART_CONSOLE, which selects
CONSOLE_HAS_DRIVER.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
BT_DEBUG is a promptless helper symbol, defined in
subsys/bluetooth/common/Kconfig. It is selected by BT_DEBUG_LOG, which
these configuration files also enable.
Flagged by https://github.com/zephyrproject-rtos/zephyr/pull/20742.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The regular expressions used by this test to determine
success or failure get confounded if the log subsystem
drops the wrong messages due to buffers being full.
Just use minimal logging which synchronously logs
everything.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Add sample for reading the temperature of a 3-wire PT100 sensor using
the Texas Instruments LMP90100 Sensor Analog Frontend (AFE) Evaluation
Board (EVB) shield.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Correct handling of device encoded temperature values, which combine a
12-bit 2s complement signed value with a separate sign bit. Rework
conversion between device and sensor temperature representations to
support negative temperatures in both domains.
Use a much simpler trigger configuration where the alert is driven by
comparator output, rather than as an interrupt that requires a pair of
I2C transactions to read and clear the flag.
Refactor the trigger infrastructure to use the setup/handle/process
idiom, which reduces duplicated code and to correctly detect alerts
present when the triggers are set.
Completely replace the sample with something that demonstrates
updating upper and lower threshold values to track moving
temperatures.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Add a sample for the MPU6050 that demonstrates on-demand and triggered
display of all sensor data.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
When a trigger was enabled the original implementation would do
nothing more than print "Waiting for a threshold event", without
describing what such an event would look like.
Rework to maintain a window of +/- 0.5 Cel around the most recent
in-window temperature, and reset that window whenever a trigger occurs
or a non-trigger reading is outside the window. Time-out and display
the temperature if no event occurs in a reasonable time.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The device address can only be 0x48 through 0x1B. C6 is connected to
the FXOS870 and is not exposed on a header: switch to Arduino D0.
Move this to a boards subdirectory so we can add other overlays
without cluttering the root.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Add support for requesting an inverted PWM pulse (active-low) when
setting up the period and pulse width of a PWM pin. This is useful
when driving external, active-low circuitry (e.g. an LED) with a PWM
signal.
All in-tree PWM drivers is updated to match the new API signature, but
no driver support for inverted PWM signals is added yet.
All in-tree PWM consumers are updated to pass a flags value of 0
(0 meaning default, which is normal PWM polarity).
Fixes#21384.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The usb_transport_init() does not return a value when it fails to
initialize the USB device. So add a return value there.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Update sample.yaml file for ST7789v sample to also build with
st7789v_waveshare_240x240 shield.
Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
The $srctree environment variable is already set to point to the Zephyr
root, so no need to do
source "$(ZEPHYR_BASE)/Kconfig.zephyr"
in samples. Just
source "Kconfig.zephyr"
works.
(Things would break if $srctree was set to anything else, because every
'source' in the Kconfig files will be relative to it.)
Also add a 'mainmenu' title to the littlefs sample. It shows up at the
top of menuconfig/guiconfig. Source Kconfig.zephyr instead of Kconfig to
avoid overriding it.
As a sidenote, $(FOO) is better $FOO in Kconfig. $FOO is legacy syntax
that Kconfiglib only supports to be compatible with old Linux kernels.
$(FOO) uses the Kconfig preprocessor.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
x86-mmu now crashes with default 1K, bump to 2K, which hopefully might
work even for 64-bit archs.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Factorize definitions for ssd1306_128x32 and sd1306_128x64 shields
and move to conditional Kconfig.
As part of this change, direct drivers Kconfig symbols enabling
(I2C, SSD1306) are removed as they are application responsibility.
Also disabling SSD16XX is removed as SSD16XX should not be enabled
by default.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Include stdlib.h to suppress a missing declaration
warning for exit() when compiled as a Linux target.
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
Same deal as in commit bd6e04411e ("kconfig: Clean up header comments
and make them consistent") and commit 1f38ea77ba ("kconfig: Clean up
'config FOO' (two spaces) definitions"), for some newly-introduced
stuff.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Allow to build also for general boards with supported ieee802154 and
usb, like reel_board, etc.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Create cc2520 overlay file. Can be used with:
cmake -DBOARD=quark_se_c1000_devboard \
-DOVERLAY_CONFIG=overlay-cc2520.conf ..
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit introduces a new Kconfig symbol MCUMGR_SMP_BT_AUTHEN.
When selected it configures the Bluetooth mcumgr transport to require
an authenticated connection.
If the Bluetooth mcumgr transport is selected then this new symbol is
selected by default. Bluetooth SMP is also selected to ensure Zephyr
is configured with Bluetooth security features enabled to provide
Bluetooth authentication APIs to the user's app. Users can choose to
disable this level of security for the Bluetooth mcumgr transport if
they do not require it.
Fixes#16482
Signed-off-by: Nick Ward <nix.ward@gmail.com>
Although this sensor is demonstrated by the X-NUCLEO-IKS01A3 sample,
maintenance of the driver is simplified if it can be tested in
isolation. Provide a sample modeled on hts221.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Before introducing the code for ARM64 (AArch64) we need to relocate the
current ARM code to a new AArch32 sub-directory. For now we can assume
that no code is shared between ARM and ARM64.
There are no functional changes. The code is moved to the new location
and the file paths are fixed to reflect this change.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
The TCP code expects that we know when the socket has called accept()
in order to continue connection attempt.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
By this commit user gets possibility to register USB
device satutus callback. This callback represents device state
and is added so user could know what happend to USB device.
Callback is registered by providing it to usb_enable()
USB api is extended by this callback handler.
Samples using using USB are by default provide no callback
and the usb_enable() is called with NULL parameter.
Status callback registered by hid class is deleted as now
USB device has global callback for all classes within device.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
Some drivers may be unable to write less than 4 bytes. Increase the
test to use at least 4 bytes and refactor so the logic is no longer
explicitly size-dependent.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Rename global variable ciphertext used in cbc_mode() to
cbc_ciphertext and move it closer to cbc_mode(). Also, move
global variable iv into cbc_mode() to be consistent with
other *_mode() methods.
Signed-off-by: Siddharth Chandrasekaran <siddharth@embedjournal.com>
SOC_FAMILY_NRF has no prompt. Assignments in configuration files have no
effect on symbols without prompts. A prompt means the symbol is
user-configurable.
SOC_FAMILY_NRF is instead enabled indirectly through being selected by
other symbols.
Detected through some work-in-progress improved error checking.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
When networking is selected, building the test
fails with:
error: static assertion failed: "Too many traffic classes"
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
This reverts commit da0f3311ff. It was
clearly intended to be a debugging aid when developing TCP2, not
intended for mainline. This fixes building this sample on POSIX
systems with Makefile.posix.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The sample needs key.c file but that cannot be generated by
sanitychecker. So disable compilation by sanitycheck.
Eventually we should make it possible to compile the sample
using some pre-defined values so that the sample will not
bit-rot but that is for later.
Fixes#21450
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit provides a sample dummy application demonstrating
the usage of the added dynamic Tx power control over the HCI
commands and HCI interfaces.
Signed-off-by: Andrei Stoica <stoica.razvan.andrei@gmail.com>
MQTT Azure and Google IoT samples are based on cloud
infrastructure. It would be nice to place all cloud
based samples in one single folder.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
The application main() in Zephyr is defined as having a prototype:
void main(void), as expected by the kernel init (bg_thread_main).
So, correct the different samples and tests that were defined
otherwise.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
The application main() in Zephyr is defined as having a prototype:
void main(void), as expected by the kernel init (bg_thread_main).
So, correct the different samples and tests that were defined
otherwise.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
This samples demonstrates how to connect to Azure Cloud
IoT hub which is based on MQTT protocol. User has to
create an account in Azure Cloud and provide those details
using Kconfig options. This sample first acquires DHCPv4
address and opens a secure connection with Azure cloud.
Then opens a MQTT connection and publish messages randomly.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Remote wakeup for Nordic SoCs should always be enabled.
Thus do not depend it for each SoC. Instead depend it on
chosen driver.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
The example should work on the cc3220sf_launchxl by following the same
flow as on other boards, ie. by connecting with plain http by default
and use TLS only when an overlay is specified. We update the
configuration for cc3220_launchxl to not use TLS by default and the
README to point users to the right overlay file to use.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Remove leading/trailing blank lines in .c, .h, .py, .rst, .yml, and
.yaml files.
Will avoid failures with the new CI test in
https://github.com/zephyrproject-rtos/ci-tools/pull/112, though it only
checks changed files.
Move the 'target-notes' target in boards/xtensa/odroid_go/doc/index.rst
to get rid of the trailing blank line there. It was probably misplaced.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Added some preprocessor directive so that code get compile
for some more nRF52 boards which has only one LED & one button.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Changes in MOVE message handler are as per Mesh Model
Specification which says:
"Upon receiving a Generic Move Set message, the Generic Level
Server shall respond with a Generic Level Status message.
The target Generic Level state is the upper limit of the
Generic Level state when the transition speed is positive,
or the lower limit of the Generic Level state
when the transition speed is negative."
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Removed global variable 'default_tt' & code depend on it
which is redundant as per latest implementation.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Added support of constrain_temperature() function.
Used constrain_lightness() & constrain_temperature()
whereever possible.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Separately saved default & last target values of lightness,
temperature & delta_uv on flash (using settings layer).
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Split Link Layer implementation uses 80 bytes more ISR stack
in comparison to Legacy Link Layer, hence increase the
required ISR_STACK_SIZE for the BBC micro:bit and other
nRF51 QFAA SoC based mesh and mesh_demo samples.
Fixes#20414.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This sample demonstrates BLE peripheral for ST BLE Sensor.
You can test button notification and LED service using
ST BLE Sensor Android application
Signed-off-by: Marcio Montenegro <mtuxpe@gmail.com>
If we ran out of net_buf's while sending, ignore the issue
and try to finish the test instead. Solving the "running out
of network buffers" case would require careful tuning of
number of network buffers, buffer size, upload speed etc. which
is difficult to solve with generic buffer count options.
The user should tweak mainly the CONFIG_NET_BUF_TX_COUNT option.
Optionally CONFIG_NET_PKT_TX_COUNT can be changed too. Information
about these options is printed to console after the test is finished.
Fixes#20315
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add "sample quit" shell command which can be used to stop the
sample application and allows the generation of coverage report.
Fixes#21099
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The Nordic SOC doesn't support multiple system power states, only one
deep sleep state. Replace the old example with a simpler one that can
be used to measure CPU active, normal sleep, and system off modes.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The seasonal overhaul of test identifiers aligning the terms being used
and creating a structure. This is hopefully the last time we do this,
plan is to document the identifiers and enforce syntax.
The end-goal is to be able to generate a testsuite description from the
existing tests and sync it frequently with the testsuite in Testrail.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit removes the CMakeLists.txt file for the stale 'random'
driver sample.
The 'random' driver sample was previously renamed to 'entropy'.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The definition was removed in commit 7ccc7889fa ("logging: Remove
SYS_LOG implementation").
Adding detection of unused symbols in samples and tests to CI.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
In order to enable sample to be run and evaluated in sanitycheck,
add a harness_config to validate sample output:
- Add "regex" to match on sample output
- Add "timeout" to save some time when debugging
- Add "ordered" instruction. Since sample is running a while loop
test verdict can potentially be computed on previous run output,
issuing a wrong status.
Last, since sanitycheck regex does not play well them, rework
sample to output without parenthesis.
Tested on disco_l475_iot1
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Some of defines are present in several header files.
Those defines are the same with value but with different naming.
Common defines are brought to usb_common.h
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
echo_client and echo_server configuration for 802.15.4 and OpenThread is
covered by overlay files and default board configuration. Board-specific
configuration for frdm_kw41z was redundant in this case.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This adds a README.rst for the UP Squared board GPIO counter sample
using details in the application source code and giving context.
This offers overview, requirements, and instructions to build and
flash, in complement to the cited reference.
Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
The sensor API returns the temperature in celsisus degree. The Bluetooth
temperature characteristics uses M = 1, d = -2, b = 0, which corresponds
to a resolution of 0.01 degree. This means that the value returned by
sensor_value_to_double has to be multiplied by 100.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
The mesh_badge sample uses a GATT Characteristic instead of a Mesh
Device Property to report the temperature. In addition to that the
status message is filled with with a GATT Unit instead of a the Mesh
Device Property.
Fix that by reporting a Present Device Operating Temperature, ie 0x0054
instead. This has the advantage of keeping the an s16t value to report
the temperature. This however change the marshalled format from B to A.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
When the value of an unknown sensor property ID is requested, the length
field should represent the value of zero, as explain in the comment in
sens_unknown_fill. However the marshalled representation of a zero
length is wrong in the code. The format A uses a 1-based uint4 length
value, so the range 0x0–0xF represents the range 1-16. The zero length
is represented by format B using the 0x7F value.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
The functionality of samples/drivers/gpio sample application duplicates
already existing code in samples/basic/blinky and samples/basic/button.
This commit removes the gpio sample application.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Bool symbols implicitly default to 'n'.
A 'default n' can make sense e.g. in a Kconfig.defconfig file, if you
want to override a 'default y' on the base definition of the symbol. It
isn't used like that on any of these symbols though.
Also replace some
config
prompt "foo"
bool/int
with the more common shorthand
config
bool/int "foo"
See the 'Style recommendations and shorthands' section in
https://docs.zephyrproject.org/latest/guides/kconfig/index.html.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Removes redundant and invalid configurations from the bluetooth/mesh
sample. Removes some stale disabled config entries.
Fixes L2CAP related warning in config step of sample.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Switch to using the synchronous bt_init call before starting the main
loop in the peripheral samples. This is to avoid sending notifications
before bluetooth has been properly initialized.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
The following samples:
- boards/nrf91/nrfx
- boards/nrf52/power_mgr
are actually not specific to nRF91 and nRF52 Series SoCs, respectively,
hence the current naming of the above board/ subdirectories may be
misleading. Thus, use nrf/ directory for holding all nRF board specific
samples that apply to several boards.
Paths to the moved samples that are mentioned in their documentation
are also updated accordingly.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This define is not of use anymore since there's a global net_buf user
data Kconfig variable and its definition already guarantees a
sufficient minimum for Bluetooth.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
For some reasons SOC_SERIES_SAME70 was selected in civetweb sample,
which prevents build on other platforms.
This issue was silent since sample yaml file limits sample testing on
sam_e70_xplained.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
echo_server crashes if the coverage is enabled due to the insufficient
stack size.
Use bigger stack size when the coverage is enabled.
Fixes#20797
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
Use malloc/free instead of k_malloc/k_free in operator new/delete
implementation or use libstdc++ implementation when available.
Further updated cpp_synchronization sample to enable minimal libc heap
as virtual destructor requires operator delete which depends on free.
Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
Corrected & improved transition implementation so that
no_transition_work thread will not get triggered twice at the
end of transition.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
User can set transition time as Zero & delay as non-zero value.
In that case, we have to depend upon timer.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
On LSM6DSO sensor the INT1 pin is used for both generating the drdy
interrupt and for switching to I3C hotjoin mode just after reset if
it is at logical '1' level. If you reset the x_nucleo_shield3 board
the LSM6DSO enter in hot join, as INT1 '1' level is preserved by
the level shifter.
This commit switch to INT2 to generate DRDY interrupt, so that INT1
always remain to logical '0' level.
Fixes: #20933
Signed-off-by: Armando Visconti <armando.visconti@st.com>
This test is failing on platforms requiring a bigger stack size. This
issue is fixed by adding the missing CONFIG_TEST_EXTRA_STACKSIZE to
tweak the thread stack size.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Fix scanning so that we always use active scanning in case the UUID we
are looking for is in the scan response, and disable duplicate filtering
to handle devices that modify their advertising data at runtime, such as
smartphones reacting to apps being opened and closed.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Update the sample to indicate which device it was using, which helps
mitigate the existing problems identifyin Arduino I2C buses. Also
output a summary of results so cases where no devices are found
provide output after the Starting... line.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
It is important to clarify when to launch audio capture command in
order to avoid that initial boot characters enter into the audio
file leading to bad initial data.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
As noted in the issue #20666 discussion, though the console is not used
by this sample app, it can't really be "disabled" using this Kconfig
option, so remove the CONFIG_SERIAL=n line.
Fixes: #20666
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Some architectures require more space on the stack when running samples
and tests. Use the CONFIG_TEST_EXTRA_STACKSIZE also on the philosophers
sample to deal with such cases.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
A reference to CONFIG_CAN_AUTO_BOFF_RECOVERY was added in commit
1b88658f9f ("samples: driver: Extend CAN sample"), but it's never been
defined as a Kconfig symbol.
Should have been CONFIG_CAN_AUTO_BUS_OFF_RECOVERY according to
alexanderwachter, so change it to that.
Adding detection of unused symbols in samples and tests to CI.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Corrected spellings in printk messages plus removed
unnecessary blank lines.
In case of Gen. Move client's message to Server, reduced
values of delta & transition time to improve demonstration.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
The device address can only be 0x18 through 0x1F. C6 is connected to
the FXOS870 and is not exposed on a header: switch to Arduino D0.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The i2c_msg API details do not work correctly with Nordic TWI. Switch
to the higher-level and simpler API for register read and write. Also
add a tree configuration on a Nordic-based board.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Commit 16d8ce519c introduced changes
that caused this sample to no longer behave according to documentation
and for some hardware to no longer work at all.
On nRF51 SoCs for instance, the reported number of cycles per second
is 16M, what makes the calculated max_period and min_period to be 16
and 0 microseconds, respectively, what effectively makes it impossible
for the sample to return to the initial blinking frequency. Moreover,
with such short PWM periods, the blinking is not even noticeable.
This patch partially reverts the changes mentioned above, and instead
of calculating max_period and min_period basing on the reported clock
rate, it tries to only decrease the max_period if needed, accordingly
to what the used hardware can handle.
Documentation is also updated to mention the possible change in
observed behavior of the sample on some hardware.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Name convention for nordic USB driver changed
Kconfig files for custom boards have to be udapted accordingly.
Changes affect only name convention change.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
By adding new SoC to Zephyr drivers has to be updated.
Commit affects:
- USB driver
- support for nRF52833 added.
- support for USB_DEVICE_REMOTE_WAKEUP in hid-mouse added.
- SPI
- IEEE 802.15.4
- CLOCK CONTROL
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
There are compiler error about the entry functions of two threads
not returning anything. So add return statement to fix it.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Removed unnecessary global variable & replaced them with different
variable defined in struct light_ctl_state.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Removed redundant coding which was related to old implementation.
Now Server will publish the new state information to the model’s Publish
Address only when there is mismatch between target & current values.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Fix build reply function. The sample uses return value
from net_pkt_read() to determine data length,
but the return value is 0 on success.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Add internal API to enter and exit deep power-down mode. Add Kconfig
option to return to DPD whenever device is not active.
When device power management becomes more mature it should be possible
to implement it, which would allow use of DPD without having to enter
and exit DPD between consecutive transactions.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
This commit converts the existing hcm5883l 3-axis magnetometer
driver to use device tree for the I2C and GPIO selection.
It also adds a basic sample application for this sensor, using the
frdm-k64f development board to demonstrate how the interrupt
GPIO pin and I2C bus can be selected.
Signed-off-by: Kevin Townsend <kevin@ktownsend.com>
Add a special target that's marked build_only so the BLE SW LL
implementation on VEGABoard is built daily. This helps ensuring
that it doesn't get inadvertedly broken by subsequent updates.
The name of the target is peripheral_hr_rv32m1_vega_ri5cy
and it can be run with the following command:
sanitycheck -v --all -p rv32m1_vega_ri5cy \
-x=CMAKE_REQUIRED_FLAGS=-Wl,-dT=/dev/null \
--test samples/bluetooth/peripheral_hr/\
sample.bluetooth.peripheral_hr_rv32m1_vega_ri5cy
Note: The extra CMake flags are required if running with the official
VEGABoard compiler, due to this linker issue:
https://github.com/pulp-platform/pulpino/issues/240
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
Add the required specific HW configuration for SW defined
BLE LL on RV32M1 SoC, by means of DTS overlays:
- enable INTMUX0 channels 2 & 3
- route Generic FSK RF0 interrupt to INTMUX channel 3
- route LPTMR1 interrupt to INTMUX channel 2
This change is done for all Bluetooth samples that are intended to
run on RV32M1 using BLE SW LL.
Signed-off-by: George Stefan <george.stefan@nxp.com>
Signed-off-by: Radu Alexe <radu.alexe@nxp.com>
Signed-off-by: Ionut Ursescu <ionut.ursescu@nxp.com>
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
Complement GPIOTE HAL function calls with the NRF_GPIOTE parameter.
Update nrfx_gpiote_init() function call with the newly introduced
parameter.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Convert bmg160 sensor driver and sample app to utilize device tree.
Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert bmm150 sensor driver and sample app to utilize device tree.
Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert max44009 sensor driver and sample app to utilize device tree.
Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert mcp9808 sensor driver and sample app to utilize device tree.
Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert sx9500 sensor driver and sample app to utilize device tree.
Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert tmp112 sensor driver and sample app to utilize device tree.
Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert th02 sensor driver and sample app to utilize device tree.
Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Mark the old time conversion APIs deprecated, leave compatibility
macros in place, and replace all usage with the new API.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Several macros were documented as deprecated but lacked the
infrastructure to produce deprecation warnings. Add the deprecation
marker, and fix the in-tree references to the deprecated spellings.
Note that one non-deprecated macro should have been deprecated, and
is, referring to a newly added line control bit.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Adds the model extension concept to the access layer, as described in
the Mesh Profile Specification, Section 2.3.6. Extensions are
implemented as a tree, using two pointers in each model:
The extends pointer points to the first extended model, and the next
pointer points to the next sibling or (if the NEXT_IS_PARENT flag is
set) the parent model in the tree, forming a cyclical "Left-child
right-sibling" (LCRS) tree. The tree root can be obtained by calling
bt_mesh_model_root_get(), and the extended models can be walked by
calling bt_mesh_model_tree_walk().
According to the Mesh Profile Specification Section 4.2.3, all models in
the same extension tree share one subscription list per element. This is
implemented by walking the model's extension tree, and pooling the
subscription lists of all models in the same element into one. If the
config server adds a subscription to a model, it may be stored in any of
the model tree's models' subscription lists. No two models in the same
extension tree and element will have duplicate groups listed. This
allows us to increase extended models' capacity for subscriptions
significantly.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Replace CONFIG_WDT_0_NAME with DT_ALIAS_WATCHDOG_0_LABEL in samples and
test code. Now that all drivers are DT aware we don't ever set the
Kconfig option.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Update shield description and sample to allow testing of LIS3MDL
sensor IRQ pin.
Update sample yaml file to state dependency on arduino_gpio.
Additionally, fix redundant line in sample yaml
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit removes the disco sample because it is basically
the same as blinky but with two LESs and adds no new value
to the samples.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
Previous defconfig for dma is DMA_STM32F4X in this board, while the new
generic driver uses DMA_STM32 to enable DMA support, and also dma driver
of stm32 now needs HEAP_MEM_POOL_SIZE to be big enough to hold dma
stream instances.
Additional .conf files are added for also adding HEAP_MEM_POOL_SIZE
configuration to two test cases.
Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
As the iPerf2 protocol is not documented properly, depend on
exact iPerf 2.0.5 version when testing.
Fixes#20313
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>