Commit graph

41264 commits

Author SHA1 Message Date
Sebastian Bøe
3a4d547c5a cmake: Change the DTS preprocessing work directory
Change the DTS preprocessor working directory from the binary
directory to the application directory.

This is done so that the user can specify
-DDTC_OVERLAY_FILE=overlay.dts with a relative path from the
application directory as is possible for CONF_FILE, and as is
reasonably expected to be possible by users.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-12-09 16:34:55 -05:00
Jukka Rissanen
3dcefbb316 samples: net: echo-server: Generate coverage report
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>
2019-12-09 16:34:18 -05:00
Peter Bigot
e83b079e22 samples: nrf52: replace power_mgr with system_off
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>
2019-12-09 16:33:03 -05:00
Kumar Gala
c8c35f76ab scripts: dts: Remove deprecated extract_dts_includes.py script
We now use EDTS and gen_defines.py to generate DTS defines.  We
deprecated the old script and defines several releases ago, so lets now
remove them.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-12-09 16:31:42 -05:00
Kumar Gala
e1fa7286cf boards: lpcxpresso55s69: Fix use of deprecated macro
In board pinmux.c ifdef of the form DT_GPIO_KEYS_SWx_GPIO_CONTROLLER
should be DT_GPIO_KEYS_SWx_GPIOS_CONTROLLER.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-12-09 16:31:42 -05:00
Jan Van Winkel
ef6ac67573 modules: gui: Updated LVGL version to v6.1.1
Updated LVGL module revision to support LVGL v6.1.1

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-12-09 15:07:28 -06:00
Jan Van Winkel
fe1aa252ab tests: gui: Enable new LVGL features in tests
Enable the new features introduced in LVGL v6.1 in the LVGL tests

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-12-09 15:07:28 -06:00
Jan Van Winkel
a1e336e7af gui: Added support for LVGL v6.1
Added support for new features in LVGL v6.1

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-12-09 15:07:28 -06:00
Anas Nashif
21847528a9 tests: document test identifier rules
Document test identifier rules.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-12-09 15:53:44 -05:00
Anas Nashif
3680f2f6ae tests: spi: fix test function name
Use test_spi_loopback instead of testing_spi to allow parsing.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-12-09 15:53:44 -05:00
Anas Nashif
8dd6cd8ec4 tests: kernel: split pending testing
Split long test into 3 sections, once for each object being tested.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-12-09 15:53:44 -05:00
Anas Nashif
434995cc99 sanitycheck: print testsuite tree
Print all tests using a tree structure (depends on anytree module). This
now can be done using --test-tree option.

sanitycheck --test-tree  -T tests/kernel/

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-12-09 15:53:44 -05:00
Anas Nashif
467d24fea1 tests: samples: portability: fix test tags and identifiers
Fix sample tags, use cmsis_rtos for all samples related to CMSIS RTOS
APIs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-12-09 15:53:44 -05:00
Anas Nashif
c1c3cc6ad9 sanitycheck: output a sort list of tests
Make --list-tests output a sorted list.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-12-09 15:53:44 -05:00
Anas Nashif
70758c4374 tests: fix test identifiers
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>
2019-12-09 15:53:44 -05:00
Thomas Schmid
9a06428244 sensor: add ms5607 sensor
Implement a driver for the te connectivity ms5607 pressure and
temperature sensor.

Signed-off-by: Thomas Schmid <tom@lfence.de>
2019-12-09 12:22:25 -06:00
Stephanos Ioannidis
6d531a36aa samples: Remove stale 'random' driver sample.
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>
2019-12-09 13:19:26 -05:00
Jukka Rissanen
e3dc05f14d net: config: Wait network interface to come up
Before we try to set IP addresses to the network interface,
make sure that the interface is up.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-12-09 12:55:56 -05:00
Jukka Rissanen
6378ac4e38 net: Verify correctness of iface_api inside L2 driver API
Add build time check that guarantees that iface_api struct is the
first entry inside L2 driver data. This makes sure we do not miss
a case when the ordering of the fields in the struct is changed.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-12-09 12:55:29 -05:00
Ulf Magnusson
2bd6858db4 samples: syslog_net: Remove ref. to CONFIG_SYS_LOG_BACKEND_NET_SERVER
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>
2019-12-09 12:55:07 -05:00
Lauren Murphy
e0b2fb75db hardening: Introducing hardenconfig tool
Basic tool to help checking Kconfig options against a list of
hardening preferences.

This tool is available as a kconfig target, so to run it:

make/ninja hardenconfig

[Flavio Ceolin: Simplify logic and fix python lint issues]

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-12-09 12:54:29 -05:00
Peter Bigot
647062adcd drivers: clock_control: nrf_power_clock: use unsigned reference count
The implementation did not account for the incrementing the reference
count past the maximum positive value.  Doing so on a signed integer
results in undefined behavior.  Switch to an unsigned integer where
such an increment results in a zero count, and add an assert that this
has not happened.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-12-09 12:54:06 -05:00
Krzysztof Chruscinski
a124f29032 drivers: clock_control: nrf: Add protection to getting item from list
When items were removed from the list there was not lock which may
lead to race condition and list corruption. Extracted list handling
into external function.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-12-09 12:54:06 -05:00
Krzysztof Chruscinski
aada984132 drivers: clock_control: nrf: Fix race condition in clock start
If clock started immediately after requesting then request was
not yet placed in the list and user callback was not called.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-12-09 12:54:06 -05:00
Peter Bigot
8a35df6fb2 boards: bbc_microbit: reference board variations
The original v1.3 had MMA8653+MAG3110, but v1.5 has verified LSM303AGR
and theoretical FXOS8700.  Add the v1.5 variant 1 nodes in disabled
form; they can be enabled through overlays.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-12-09 12:53:27 -05:00
Erwan Gouriou
e0353db10b samples: lsm6dsl: Add a harness_config
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>
2019-12-09 12:52:35 -05:00
Steven Wang
6a407f4fe0 sanitycheck: remove "--detailed-report" from help message.
The option has been deprecated. So remove it from help message.

Signed-off-by: Steven Wang <steven.l.wang@linux.intel.com>
2019-12-09 12:51:09 -05:00
Martí Bolívar
2de12df6b9 drivers: clock_control: clock_control_on should be blocking
Document this behavior. This partially addresses #20708, but we'll
have to deal with driver bugs case by case now that the desired
behavior is clear.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2019-12-09 12:50:36 -05:00
Ulf Magnusson
fc5cd772da scripts: dts: Accept 'status = "ok"'
Erroring out for 'status = "ok"' broke backwards compatibility for a
downstream project. Accept it instead.

Maybe the error could be selectively re-enabled later.

The rest of the code only checks for 'status = "disabled"' (like the old
scripts), so no other updates are needed.

(It's a bit weird that we duplicate the property check in base.yaml.
Thinking of including base.yaml implicitly. Could clean things up then.)

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-09 12:49:32 -05:00
Emil Obalski
85a08da966 usb: Rename defines to match present naming convention
This commit renames two defines:
CS_INTERFACE -> USB_CS_INTERFACE_DESC
CS_ENDPOINT -> USB_CS_ENDPOINT_DESC
in order to match current naming convention when it comes
to descriptors fields.

All relevant files are updated to match renamed macros.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2019-12-09 12:48:13 -05:00
Emil Obalski
c1f5e11bb6 usb: Cleanup for multiplied defines
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>
2019-12-09 12:48:13 -05:00
Robert Lubos
44c947ec3e drivers: ieee802154_kw41z: Create a fake ACK frame for upper layers
Upper layers like OpenThread expect the radio driver to forward ACK
frame received by the radio.
Simulate this behavior on kw41z by recreating the ACK frame from the
available data.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-12-09 12:47:45 -05:00
Robert Lubos
6b2a371272 samples: net: Remove redundant frdm_kw41z configs from echo samples
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>
2019-12-09 12:47:45 -05:00
Robert Lubos
e871ae9407 net: openthread: Allow to configure SED
Allow to select Sleepy End Device, and configure it during OpenThread
initialization.

According to Thread Specification, Sleepy End Devices should always
attach to the network as SED, to indicate increased buffer requirement
to a parent. Therefore, we reconfigure the Link Mode on each boot.

Note, that Poll Period value is not stored in the persistent storage,
hence we also need to initialize it on each boot.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-12-09 12:47:45 -05:00
Robert Lubos
4fe1da9f58 net: openthread: Process real ACK frame instead of fake one
OpenThread radio layer did not implement `ieee802154_radio_handle_ack`
API and provided fake ACK frame to the OpenThread.

This prevented proper Sleepy End Device operation, as it expects to
receive information in the ACK whether it should wait for more data to
come or should it put the radio to sleep.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-12-09 12:47:45 -05:00
Robert Lubos
2624d65b60 drivers: ieee802154_nrf5: Add ACK handling
nRF5 driver did not utilize `ieee802154_radio_handle_ack` API, therefore
did not provide ACK frames to the upper layer. This commit fixes this
problem.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-12-09 12:47:45 -05:00
Flavio Ceolin
e86ec977fb syscalls: Remove references to __syscall_inline
There is no code to handle __syscall_inline so it is better removing
it from doxygen and checkpatch.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-12-09 12:47:15 -05:00
Flavio Ceolin
4afa181831 x86: fatal: Explicitely include syscall header
This file is using definitions from ia32/syscall.h, just properly
including this file.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-12-09 12:47:15 -05:00
Olof Kindgren
754d56891e drivers: interrupt_controller: Add SweRV PIC support
Add support for the built-in Programmable Interrupt Controller
found in the SweRV EH1 RISC-V CPU

Signed-off-by: Olof Kindgren <olof.kindgren@gmail.com>
2019-12-09 12:46:56 -05:00
Christian Taedcke
cac5e8f251 west: openocd: Add config file dir to search path
Use the folder the config file is in as an additional search directory
for openocd. This way additional files, like custom debug interface
files can be put in the support folder of a board and the openocd.cfg
can use them.

Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
2019-12-09 12:46:10 -05:00
Jennifer Williams
6c2d25204c samples: boards: Add readme for gpio counter.
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>
2019-12-09 12:45:04 -05:00
Andrew Boie
c1863875b7 ztest: fix ztest_1cpu_user_unit_test()
The start/stop functions do a whole pile of supervisor-
only stuff; resolve this by making them ztest-specific
system calls.

Fixes: #20927

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-12-09 12:40:47 -05:00
Andrew Boie
9849c7d3e7 x86: don't use privilege stack areas as a guard
This is causing problems, as if we create a thread in
a system call we will *not* be using the kernel page
tables if CONFIG_KPTI=n, resulting in a crash when
the later call to copy_page_tables() tries to initialize
the PDPT (which is in the same page as the privilege
stack).

Just don't fiddle with this page's permissions; we don't
need it as a guard area anyway since we have a stack
guard placed immediately before it, and this page
is unused if user mode isn't active.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-12-09 12:40:31 -05:00
Maureen Helm
6cfd8113a7 boards: arm: Extend usb device support to all nxp imx rt boards
Extends the usb device support from mimxrt10{50,64}_evk to all other imx
rt boards.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-12-09 11:40:12 -06:00
Scott Worley
60915c884f soc : mec1501 : Deep and light sleep example
Created MEC1501 deep and light sleep example for MCHP MEC1501.
Modifications were made to SoC, board, timer, and hello world
sample program. Power management split into SoC power
implementing the interface and device power for device specific
logic.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2019-12-09 11:57:03 -05:00
Jan Van Winkel
cba129ae96 drivers/flash: Removed native posix flash driver
Removed native posix flash driver as functionality is merged with flash
simulator driver.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-12-09 11:56:21 -05:00
Jan Van Winkel
8cd4a817d9 drivers/flash/flash_simulator: Added file back end for posix arch
Extended flash simulator for posix architecture to read/write data
from a binary file on the host file system.

Further enable the flash simulator by default on native_posix(_64)
boards and updated the documentation accordingly.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-12-09 11:56:21 -05:00
Daniel Leung
01c03a27d7 counter: mchp_xec: update driver for counter tests
The counter driver tests have been updated so the driver needs
to be updated too.

() Test expects a free running counter.
() Test expects any alarms cannot be set beyond the top value.
() Also, the counter only triggers interrupts when counter reaches
   zero (as configured as counting down), it can be do relative
   alarms. So return -ENOTSUP when absolute alarms are requested.
() The test expects the callback to be removed once alarm is
   triggered. Implement this too.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-12-09 11:53:21 -05:00
Aurelien Jarno
a5c53ff3ae samples: mesh_badge: fix temperature format
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>
2019-12-09 11:51:46 -05:00
Aurelien Jarno
0e11d1385b samples: mesh_badge: fix property ID
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>
2019-12-09 11:51:46 -05:00