Commit graph

10761 commits

Author SHA1 Message Date
Jukka Rissanen
d8b0c28072 samples: net: mdns_responder: Add IPv4 gateway setting
IPv4 packets might not get routed out if IPv4 gateway is missing
so add it here.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-08-28 17:43:36 +02:00
Jukka Rissanen
781da8d540 samples: net: mdns_responder: Add readme file
A readme file describing the usage was missing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-08-28 17:43:36 +02:00
Simon Guinot
53cbe5ff29 samples: drivers: add test sample for TI LP503x LED drivers
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>
2020-08-28 15:04:35 +02:00
Peter Bigot
b33cde6c5d samples: mgmt: updatehub: add label directive
This sample was missing a label to place it in generated documentation.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-08-28 12:54:40 +02:00
Peter Bigot
9e6d041b12 samples: scheduler: metairq_dispatch: add label directive
This sample was missing a label to place it in generated documentation.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-08-28 12:54:40 +02:00
Peter Bigot
75f82dc09a samples: fix reStructuredText target directives
Without the leading underscore these are comments.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-08-28 12:54:40 +02:00
Peter Bigot
e81e88e52e samples: spi_flash: add README
Basic example of basic flash API use when selecting a serial flash
memory.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-08-27 12:39:43 -04:00
Peter Bigot
77aa89bcb5 drivers: flash: remove W25QXXDV driver
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>
2020-08-27 17:39:21 +02:00
Jeremy LOCHE
15c69a8bbc samples: bluetooth: ipsp: add net config auto init
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>
2020-08-27 15:59:20 +02:00
Peter Bigot
9eedb36b68 samples: fxos8700-hid: remove unnecessary check for flags cell in gpios
Also clean up the devicetree node checking logic.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-08-27 15:59:03 +02:00
Peter Bigot
0b286d7304 samples: remove unnecessary check for flags cell in gpios
The devicetree helper macro now provides zero when the cell is not
present.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-08-27 15:59:03 +02:00
Anas Nashif
dca317c730 sanitycheck: inclusive language
change whitelist -> allow.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-08-27 07:04:07 -04:00
Nolwenn Violette
fb88b0aafc sample: tfm_ipc: Add nucleo_l552ze_q support
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>
2020-08-27 12:02:16 +02:00
Ryan Erickson
2ce87da252 net: lib: lwm2m: add new sensor objects
Add generic, humidity and pressure sensor objects.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-08-27 11:01:09 +03:00
Jukka Rissanen
0bac136604 samples: net: socket: packet: Add SOCK_DGRAM support
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>
2020-08-27 10:56:06 +03:00
Gerard Marull-Paretas
4f86a9a2d5 lib: gui: lvgl: align all Kconfig object names
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>
2020-08-26 15:32:59 -05:00
Pawel Sagan
132b35c3ad samples: drivers: i2s: Add LiteX I2S sample
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>
2020-08-26 08:17:42 -04:00
Henrik Brix Andersen
01c6862ad7 samples: usb: mass: add usb_device dependency
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>
2020-08-26 12:32:27 +02:00
Henrik Brix Andersen
5210b82bd6 samples: drivers: spi_flash: add support for arty_a7_arm_designstart_m1
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>
2020-08-26 12:32:27 +02:00
Eug Krashtan
c6bb8b191d samples: net: coap: Wildcard sample
Additional resources to illustrate wild card usage.

Signed-off-by: Eug Krashtan <eug.krashtan@gmail.com>
2020-08-26 12:31:00 +02:00
Jamie McCrae
94721b316f samples: sensor: sm351lt: Add new SM351LT sensor sample
Adds sample for SM351LT sensor and outputs to console.

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2020-08-25 15:29:00 -05:00
Gerson Fernando Budke
46234a0463 samples: mgmt: updatehub: Fix gen privkey inc
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>
2020-08-25 16:46:01 +02:00
Joakim Andersson
5880f3d74f Bluetooth: UUID: Use BT_UUID_16_ENCODE to set UUIDs in adv data
Use BT_UUID_16_ENCODE to set UUIDs in advertising data.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-08-25 16:09:22 +03:00
Carles Cufi
65d4e177ca samples: bluetooth: hci_uart: Add a config for the nRF51 dongle
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>
2020-08-25 15:16:11 +03:00
Jose Alberto Meza
b46d1f3cba samples: drivers: espi: Use non-default frequency.
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>
2020-08-25 09:32:29 +02:00
Flavio Ceolin
0aaae4a039 guideline: Make explicit fallthrough cases
-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>
2020-08-24 20:28:47 -04:00
Anas Nashif
390537bf68 tracing: trace mutex/semaphore using dedicated calls
Instead of using generic trace calls, use dedicated functions for
tracing sempahores and mutexes.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-08-24 13:21:12 +02:00
Henrik Brix Andersen
8b94d67dc8 samples: drivers: jesd216: check return value of flash_sfdp_read()
Check the return value of flash_sfdp_read() and print error message if
not successful.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-08-24 11:06:48 +02:00
Peter A. Bigot
ea8432b92e samples: jesd216: update output to reflect recent bug fix
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>
2020-08-21 13:57:46 -04:00
Peter A. Bigot
c04c40a34e samples: jesd216: fix printf argument to match format
The relative offset will always be small so downcast it to avoid
cross-platform size differences.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-08-21 13:57:46 -04:00
Jukka Rissanen
3e1491de26 samples: net: echo-client: Add userspace support
Allow echo-client to run in user mode for testing purposes.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-08-21 14:45:35 +03:00
Gerard Marull-Paretas
82e58a0707 boards: arm: adafruit_feather_nrf52840: add support for QSPI flash
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>
2020-08-19 15:43:57 -05:00
Jukka Rissanen
db2b5dbaf9 samples: net: gptp: native_posix: Set 1ms clock accuracy
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>
2020-08-19 12:47:09 -04:00
Jukka Rissanen
acb8956bb7 samples: net: gptp: Enable GM support by default
As we support grand master, enable it by default so things
get tested properly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-08-19 12:47:09 -04:00
Jukka Rissanen
fe638d23fc net: native_posix: gptp: Add multiport support
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>
2020-08-19 12:47:09 -04:00
Jukka Rissanen
4223a2e685 samples: net: sockets: Create a test for socket offloading
Create a test of socket offloading. Build the test for
cc3220sf_launchxl board.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-08-19 12:42:40 -04:00
Fabio Utzig
0aaee6dcf5 sample: smp_svr: add shell overlay
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>
2020-08-19 09:52:21 -04:00
Dominik Ermel
cefebbec39 samples: flash_shell: Fix overwriting return value
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>
2020-08-19 15:01:50 +02:00
Jose Alberto Meza
459b0df9fb samples: drivers: espi: Convert espi sample to devicetree
Update sample driver test to use dts instead of kconfig.
Fix #22344

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2020-08-18 14:22:10 -04:00
Ningx Zhao
fa04a4d488 samples: derives/peci can't run at EVB board
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>
2020-08-18 14:20:49 -04:00
Jukka Rissanen
9b9ce0e529 samples: net: socket: packet: Refactor to allow flooding
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>
2020-08-18 10:45:27 -04:00
Robert Lubos
4c64429a97 samples: net: Make echo_client/echo_server wait for IP to be ready
The samples shall wait for IPv4/IPv6 to be ready before starting
operation.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-08-18 15:06:17 +03:00
Peter Bigot
e86e6fa769 samples: jesd16: correct interpretation of NPH field
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>
2020-08-18 09:27:30 +02:00
Peter Bigot
bb86e1958c samples: jesd16: fix overlay cs-gpios settings
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>
2020-08-18 09:27:30 +02:00
Peter A. Bigot
506f02e89e samples: drivers: jesd216: support JESD216 API
Demonstrate use of the JESD216 API as a utility to display the
discoverable parameters.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-08-17 13:38:14 -04:00
Christian Taedcke
61415581a5 samples: net: syslog: Add configs for ipv4- and ipv6-only
This checks if the net logger backend compiles if either ipv4 or ipv6 is
enabled.

Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
2020-08-14 18:51:28 -04:00
Christian Taedcke
29caf10800 samples/drivers/spi_flash: add some efr32 boards
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>
2020-08-14 10:23:56 -05:00
Kumar Gala
d2b0735c12 build: Fix usage of hardcoded zephyr.{elf,bin,hex}
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>
2020-08-14 13:33:49 +02:00
Emil Obalski
c6f7d87142 samples: openthread: Call usb_enable() by the app.
This commit updates openthread sample to call usb_enable() from
the application.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2020-08-13 11:49:47 +02:00
Emil Obalski
57084f32a1 samples: zperf: usb: Enable USB by the application.
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>
2020-08-13 11:49:47 +02:00