Commit graph

41120 commits

Author SHA1 Message Date
Ulf Magnusson
07bf345db3 boards: arm: mps2_an521/musca: kconfig: Clean up BOARD defaults
Putting 'if's directly on the defaults is simpler here.

I'm guessing BOARD should always be "musca_{a,b1}_nonsecure" if it isn't
"musca_{a,b1}", so I removed the condition on the
"musca_{a,b1}_nonsecure" default (turning it into an "else").

Avoiding a top-level 'if'/'depends on' also avoids adding direct
dependencies to the BOARD symbol, which looks a bit neater in the
generated docs (though direct dependencies only matter for symbols that
might be selected/implied).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-05 19:32:31 +01:00
Jan Van Winkel
aab26c5ec2 CODEOWNERS: Added code owner for subsys/debug/asan.c
Added myself as code owner for subsys/debug/asan.c

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-11-05 09:46:02 -08:00
Jan Van Winkel
4286cb830f debug: Disable "at exit" LSAN leak check
Disable "at exit" memory leak check by LSAN if building for a 64-bit
target with GCC. This is need to fix a potential deadlock in GCCs
libasan implementation.

Fixes #20122

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-11-05 09:46:02 -08:00
Ulf Magnusson
3ac7c6fcbf binding-template.yaml: Improve 'include:' docs and mention base.yaml
Explain how 'include:' works in some more detail and mention base.yaml,
along with an example of how it can be used.

This was adapted from
https://github.com/zephyrproject-rtos/zephyr/pull/19846.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-05 17:47:47 +01:00
Torsten Rasmussen
1f9723af19 cmake: app mem partion flexibility
This commit allows a more dynamic approach for specifying that a zephyr
library must be placed in a dedicated app memomory partition.
This is still done by defining the partition in code using
K_APPMEM_PARTITION_DEFINE, but now the zephyr library can be added to
the generation of partition table using zephyr_library_app_memory
instead of modifying the overall zephyr/CMakeLists.txt file.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2019-11-05 08:44:26 -08:00
Sebastian Bøe
5871fc24fb cmake: Don't test whether the installed west is the bootstrapper
Of the 1.7s or so that CMake spends in Configure-time there is 0.1s
spent to determine whether west can flash or not. This is significant
compared to the usefulness of flash-check.

AFAICT when installing west there is no longer a two-step procedure
where first a bootstrapper that can't flash is installed, and then a
proper west is installed, so the risk of having installed the
bootstrapper is no longer something we should spend 100ms testing for.

This patch removes the check, thereby speeding up CMake by 100ms.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-11-05 17:43:50 +01:00
Peter A. Bigot
ea956f4ac3 scripts: dts: add dependency information to edtlib
Device tree nodes have a dependency on their parents, as well as other
nodes.  To ensure driver instances are initialized in the proper we
need to identify these dependencies and construct a total order on
nodes that ensures no node is initialized before something it depends
on.

Add a Graph class that calculates a partial order on nodes, taking
into account the potential for cycles in the dependency graph.

When generating devicetree value headers calculate the dependency
graph and document the order and dependencies in the derived files.
In the future these dependencies may be expressed in binding data.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-11-05 17:03:23 +01:00
Ioannis Glaropoulos
46b728204e bluetooth: controller: nrf5: use nrfx function to get CCM IRQ line
We use the nRFx API nrf_get_irq_number(.) to retrieve the IRQ
line of the CCM peripheral, instead of the hard coded enum
value from MDK. We do this for portability, since these
enums may be different for different nRF SoC series.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-05 16:42:15 +01:00
Sebastian Bøe
540bd67a7d kconfig: cpp: Have LIB_CPLUSPLUS depend on ! MINIMAL_LIBC
The C++ STD library is not compatible with the minimal C library. To
ensure that users do not accidentally enable LIB_CPLUSPLUS while also
enabling a minimal libc library we add a dependency in Kconfig.

Also, use depends instead of select between EXCEPTIONS, RTTI, and
LIB_CPLUSPLUS as use of select is discouraged in this situation.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-11-05 16:19:27 +01:00
Anas Nashif
4f04386e61 sanitycheck: exit thread executor on exceptions
When something goes wrong, exit thread execution pool and report and
error.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-11-05 10:06:00 -05:00
Anas Nashif
89c83044c8 sanitycheck: get environment regardless of option specified
environment is passed to execution thread and should be available
regardless of SAN being enabled or not.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-11-05 10:06:00 -05:00
Jukka Rissanen
c03af056a0 samples: net: zperf: Clarify that only iPerf 2.0.5 is supported
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>
2019-11-05 09:29:15 -05:00
Peter Bigot
1042b04152 scripts/requirements: update PyYAML to >=5.1
sanitycheck now requires yaml.FullLoader to support generating
hardware maps.  This feature was introduced in PyYAML 5.1.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-11-05 08:30:30 -05:00
Andrzej Puzdrowski
af0abb2b8d doc/reference: move the settings doc higher
Settings documentation was placed under storage paragraph
in documentation tree, which suggested that it was another
storage solution. In fact settings uses storage modules as
its persistent storage back-end.

This patch creates dedicated run-time configuration paragraph
which aim to explain existence (and emphasize) of common run-time
configuration system in Zephyr-RTOS and rationale for using it.
The Settings paragraph is placed under this paragraph as it is only
sub-module which implements the solution.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-11-05 14:06:22 +01:00
Anas Nashif
bad4c93318 arch: doxygen: group architecture interfaces
Group all architecture interfaces under one group in doxygen.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-11-05 07:05:55 -05:00
Kumar Gala
47fbf5bb4e soc: stm32: Convert CCM config from DT Kconfig symbol to function
Introduce a Kconfig symbol that utilizes a dt function to determine if
we have STM32 CCM functionality being utilized.  This removes the
dependance on parsing symbols from generated_dts_board.conf.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-05 12:04:33 +01:00
Kumar Gala
07e5d89d86 kconfig: Add dt_chosen_enabled function
Add function that will return 'y' or 'n' if a node pointed to by a
chosen property exists and is enabled.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-05 12:04:33 +01:00
Sigurd Olav Nevstad
911180368c boards: arm: nrf9160_pca10090: increase reset line wait time
The 1ms wait time has been shown to not be enough. Increasing to 10ms.

This change has been shown to be necessary after
CONFIG_SYS_CLOCK_TICKS_PER_SEC was changed from 128 to 32768
in https://github.com/zephyrproject-rtos/zephyr/pull/16782

Signed-off-by: Sigurd Olav Nevstad <sigurdolav.nevstad@nordicsemi.no>
2019-11-05 11:40:10 +01:00
Vinayak Kariappa Chettimada
709dee5ed0 Bluetooth: controller: split: Fix conditional compile error
Fix conditional compilation error in building the central
only samples as all peripheral structure member accesses in
the controller where not correctly compiled out.

Regression introduced in commit 6d8b12468e ("Bluetooth:
controller: split: Refactor LLL conn structure").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-11-05 11:22:38 +01:00
Fabio Utzig
d6d79933c1 boards: nucleo_wb55: align partition boundaries
This MCU has sectors of size 4096, but some partitions were aligned to
0x800 addresses. MCUBoot detects this incosistency and halts. This patch
fixes the partitions to use properly aligned addresses (multiples of
0x1000).

Signed-off-by: Fabio Utzig <utzig@apache.org>
2019-11-05 08:58:33 +01:00
Ulf Magnusson
39f2281c89 kconfig: Change some '#Comment' comments to '# Comment'
For consistency. Newly-introduced stuff.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-04 17:31:27 -05:00
Ulf Magnusson
1f38ea77ba kconfig: Clean up 'config FOO' (two spaces) definitions
Must've been copy-pasted around.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-04 17:31:27 -05:00
Ulf Magnusson
1d7155cb4b doc: kconfig: Document recommended header format
Might help keep things consistent.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-04 17:31:27 -05:00
Ulf Magnusson
bd6e04411e kconfig: Clean up header comments and make them consistent
Use this short header style in all Kconfig files:

    # <description>

    # <copyright>
    # <license>

    ...

Also change all <description>s from

    # Kconfig[.extension] - Foo-related options

to just

    # Foo-related options

It's clear enough that it's about Kconfig.

The <description> cleanup was done with this command, along with some
manual cleanup (big letter at the start, etc.)

    git ls-files '*Kconfig*' | \
        xargs sed -i -E '1 s/#\s*Kconfig[\w.-]*\s*-\s*/# /'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-04 17:31:27 -05:00
Fabio Utzig
86360cb2f7 dts: enable uart3 for frdm_k64f
Building `smp_svr` for this board results in a build error due to
undefined symbols `DT_NXP_KINETIS_UART_4006D000_*` which are related to
uart3 DTS symbols not being generated. This marks uart3's status as OK.

Signed-off-by: Fabio Utzig <utzig@apache.org>
2019-11-04 15:22:04 -06:00
Karsten Koenig
8a6fd43439 boards: riscv: rv32m1_vega: Add onboard SPI flash
Enable the MX25R32 SPI NOR Flash on the VEGAboard and provide board
config file for the spi_flash sample.

Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
2019-11-04 14:11:18 -06:00
Karsten Koenig
ee2dd7322f drivers: spi: rv32m1: Add driver for RV32M1 LPSPI
Add SPI driver and bindings for LPSPI peripheral for the RV32M1 SOC.
Based heavily on the existing mcux LPSPI driver.

Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
2019-11-04 14:11:18 -06:00
Karsten Koenig
e031477892 dts: bindings: vendor-prefixes: add openisa
OpenISA is used as vendor for drivers for the rv32m1 cores.

Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
2019-11-04 14:11:18 -06:00
Mohamed ElShahawi
21096b0316 esp32: pinmux: Add Device tree support
- Add PINMUX module to esp32.dtsi

Signed-off-by: Mohamed ElShahawi <ExtremeGTX@hotmail.com>
2019-11-04 19:45:50 +01:00
Mohamed ElShahawi
2d2f4de5b8 drivers: watchdog: esp32: Add Watchdog Device tree support
- Add WDT(0,1) to esp32.dtsi
- Extend the module to be able to use WDT(0,1)
- Some minor refactoring due to usage of device tree

Tests:
- samples/drivers/watchdog
- tests/drivers/watchdog/wdt_basic_api

Note:
- timer module interrupt registers shall be removed when
timer driver implemented.

Signed-off-by: Mohamed ElShahawi <ExtremeGTX@hotmail.com>
2019-11-04 18:00:36 +01:00
Jan Van Winkel
21212f30b5 sanitycheck: native: Added option to enable ASAN & LSAN
Added option to sanitycheck script to enable address - and leak
sanitizer.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-11-04 17:38:39 +01:00
Ioannis Glaropoulos
73483094da bluetooth: controller: nrf5: simplify preprocessor conditionals
We make a minor simplification in the way we define
RADIO_PDU_LEN_MAX in Nordic nRF LE radio driver; as
nRF51 SoC series is the only series where the LL PDU
max length representation is limited to a 5-bit field,
we simplify the conditional preprocessor expression,
to avoid having to list all nRF5x SoCs with PDU LEN
MAX is represented by an 8-bit integer field.

In addition, we modify the preprocessor conditional,
that compiles in the CCM support for 8-bit length field,
PDUs to be an #ifndef CONFIG_SOC_SERIES_NRF51X, instead
of #ifdef CONFIG_SOC_COMPATIBLE_NRF52X; this will
simplify the expression when adding nRF53X series
support.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-04 17:14:06 +01:00
Marcio Montenegro
5634d70374 drivers: hci: stm32_ipm: add UID BLE address
The STM32WB has a 64 bit Unique Device Number UID.
The UID is used by firmware to derive 48-bit
Device Address EUI-48.

Signed-off-by: Marcio Montenegro <mtuxpe@gmail.com>
2019-11-04 16:40:01 +01:00
Peter Robinson
2e1f8090b0 linker: riscv: discard .note.GNU-stack
Similar to what was required for x86 in #12719 / PR#12752

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2019-11-04 09:10:19 -05:00
Peter Robinson
ccd40d5502 linker: arm: discard .note.GNU-stack
Similar to what was required for x86 in #12719 / PR#12752

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2019-11-04 09:10:19 -05:00
Kumar Gala
9b5720d76c sanitycheck: remove import of dt kconfig symbols
All users of dt kconfig symbols for tests and samples are using dt
functions instead so we can remove the support for parsing the
generated file.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-04 09:02:14 -05:00
Kumar Gala
4cc91fdd00 sample/tests: replace DT_ define filters with dt_ functions
convert sample and test yaml filters that utilize a DT_ define to
instead use a dt_ function.  The intent is to remove the Kconfig
generated DT defines and just make directy queries into the device tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-04 09:02:14 -05:00
Kumar Gala
7733b94224 sanitycheck: Add functions to query device tree for filters
Add the following functions to allow filtering based on device tree

dt_compat_enabled(compat) - Returns true if a device tree node
compatible matches 'compat' and the node is enabled.

dt_alias_exists(alias) - Returns true if a device tree node exists with
'alias' and the node is enabled.

dt_compat_enabled_with_alias - Returns true if a device tree node
compatible matches 'compat' and the node has 'alias' and the node is
enabled.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-04 09:02:14 -05:00
Mario Noseda
1acea13767 tests: benchmark: boot_time: fixed kernel clock value
Using a device with a kernel clock below 1MHz (e.g. nRF52) resulted in
a division by zero. Added support for such devices by multiplying
before dividing.

Signed-off-by: Mario Noseda <mario.noseda@zhaw.ch>
2019-11-04 08:51:58 -05:00
Ulf Magnusson
97c310e225 sanitycheck: Remove pointless shutdown() from BoundedExecutor
Just calls through to concurrent.futures.Executor.shutdown() in the base
class, which has the same signature. Removing it means the base class
version will get used directly.

Fixes this pylint warning:

    W0235: Useless super delegation in method 'shutdown'
    (useless-super-delegation)

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-04 08:42:12 -05:00
Ulf Magnusson
e73d286b89 sanitycheck: Make log_info_file() a regular function
Fixes this pylint warning:

    R0201: Method could be a function (no-self-use)

Could also make it a class method.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-04 08:42:12 -05:00
Ulf Magnusson
5c2e814212 sanitycheck: Suppress bogus not-subscriptable pylint warning
pylint gets confused by contextlib.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-04 08:42:12 -05:00
Joakim Andersson
23e8e6891b Bluetooth: Shell: Disallow GATT commands when params are in use
GATT parameters need to remain valid while the procedure is active.
Disallow GATT commands while the procedure is active to avoid asserting.

Fixes: #20232

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-11-04 14:41:15 +01:00
Peter A. Bigot
b4d5e67e21 kernel: use internal spelling of macro deprecation marker
When scanning for how to deprecate macros this file provides an
unsuitable example.  Use the preferred spelling.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-11-04 14:36:17 +01:00
Sean Nyekjaer
9ab206d414 mailmap: add entry for Sean Nyekjaer
As I no longer is working for Prevas, add a mailmap entry
so any mail directed towards me reaches the appropriate mailbox.

Secondly. point to my work mail instead of my private one.

Signed-off-by: Sean Nyekjaer <sean@geanix.com>
2019-11-04 14:33:31 +01:00
Sebastian Bøe
a5eb70fc70 cmake: Fixed a bug where python 3.8 was not detected on Windows
Fixed a bug where python 3.8 was not detected on Windows.

Python 3.8 was released two weeks ago and any Windows user that
installs it will detect the wrong version.

Also add detection for 3.9 for future-proofing.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-11-04 14:32:41 +01:00
Vinayak Kariappa Chettimada
eed51cc018 Bluetooth: controller: split: Fix missing terminate_ack initialization
Add the missing initialization of master role terminate_ack
flag. This caused slave initiated remote termination as
procedure timeout.

Fixes #20135.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-11-04 10:44:59 +01:00
Vinayak Kariappa Chettimada
6d8b12468e Bluetooth: controller: split: Refactor LLL conn structure
Refactor the LLL connection context to move out the member
fields not accessed in LLL execution context.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-11-04 10:44:59 +01:00
Laczen JMS
e07227ffe7 ext: lib: tinycrypt: do not select entropy_generator
Tinycrypt ECC_DH and ECC_DSA are selecting the entropy generator, this
is not required. ECC_DH and ECC_DSA require a default_CSPRNG definition
that could be based on the entropy generator, but the entropy generator
does not provide this function.

Removing the entropy generator results in smaller code in case only
validation needs to be done (which does not need default_CSPRNG). The
modules that are providing the default_CSPRNG (e.g. subsys/jwt/jwt.c or
subsys/bluetooth/host/hci_ecc.c) are deciding themselves to use the
entropy generator or not.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2019-11-04 10:26:29 +01:00
François Delawarde
5317008ad3 bluetooth: host: fix missing bt_conn_unref
Fix missing bt_conn_unref when using the ccc match callback.

Fixes: #20299

Signed-off-by: François Delawarde <fnde@oticon.com>
2019-11-04 09:43:13 +01:00