Commit graph

41120 commits

Author SHA1 Message Date
Erwan Gouriou
010e35850e tests/kernel: timer_api: Remove build_only tickless variant
'build_only' directive may not be justified here and
prevent to see issue when running the test.

Similarly to non tickless version exclude qemu_x86_coverage
and qemu_cortex_m0 platforms.
It was actually tested failed on qemu_cortex_m0, no error
reported on qemu_x86_coverage, but removed to be safe on that side
as well.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-16 07:43:40 -06:00
Ioannis Glaropoulos
86a1cc78c2 boards: arm: nrf5340_dk: include soc.h in nrf5340_cpunet_reset.c
We need to include soc.h in nrf5340_cpunet_reset.c, to include
the nRF5340 device headers. Fixes a compilation error when we
build with CONFIG_ARM_MPU=n.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-01-16 07:37:12 -06:00
Lyle Zhu
b3df27afcf driver: interrupt_controller: Filter invalid channel for RV32M1 SOC
Invalid channel should be filtered in intmux isr, please refer to
page 1243~1244 of chapter 36 INTMUX of RV32M1 RM.

Note: Unlike the NVIC, the INTMUX does not latch pending source
interrupts. This means that the INTMUX output channel ISRs must
check for and handle a 0 value of the CHn_VEC register to account
for spurious interrupts.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2020-01-16 07:10:23 -06:00
Dominik Ermel
50f7555789 Bluetooth: Selecting ENTROPY_GENERATOR for crypto
Bluetooth sample with controller crypto, requires sys_rand32_get that
used to be linked with Tinycrypt. The selection, within Kconfig of
Tinycrypt, that has been enabling compilation of the symbol has
been removed and thus preventing controller crypto to link.

This commit moves the selection to BT_CTLR_CRYPTO.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-01-16 13:25:31 +01:00
Trond Einar Snekvik
19718fd6da Bluetooth: Mesh: Skip publish if update fails
Allow models to skip a periodic publish interval by returning an error
from the publish update callback.

Previously, an error return from publish update would cancel periodic
publishing. This can't be recovered from, and as such, no valid model
implementation could return an error from this callback, and there was
no way to skip a periodic publish.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2020-01-16 14:13:37 +02:00
Audun Korneliussen
a68ef65bc4 drivers: uart: Enable rx byte counting timer only in active power state
Nrfx_uarte uses a hardware timer/counter to count received bytes.
Keeping this timer enabled increases power consumption for some SoCs.

This change disables the timer when an inactive power state is set.

Signed-off-by: Audun Korneliussen <audun.korneliussen@nordicsemi.no>
2020-01-16 11:55:56 +01:00
Timor Gruber
0039fb86e7 doc: cmake: fixed 'strip_prefix' inconsistency
The `zephyr_get_xxx` API for option fetching
enables prefix stripping.  For some reason
the main API docs named it 'SKIP_PREFIX' instead.

Signed-off-by: Timor Gruber <timor.gruber@gmail.com>
2020-01-16 11:29:46 +01:00
Vinayak Kariappa Chettimada
b5c63c69ca Bluetooth: controller: split: Fix ull_disable hang
Under race conditions it is possible that there is no call
to k_sem_give to the waiting k_sem_take in the ull_disable
function.

ull_disable function checks for reference count before
using a mayfly to schedule lll_disable, which in turn
would close requested currently active role event leading
to done event being propogated to ULL. Done event would
then call the set disabled_cb callback when the reference
count is zero, giving the semaphore to the waiting
k_sem_give in the ull_disable.

Under race conditions if the reference count reached zero
after the reference count check and before the disabled_cb
was assigned in the ull_disable function, then there are
chances that a k_sem_give is not called while ull_disable
proceeds to waiting using k_sem_take.

Fixes #21586.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-01-16 10:54:40 +01:00
Gerson Fernando Budke
3d5c911612 board: atsamr21_xpro: Update docs
Add reference to wpanusb and wpan_serial examples. This links user with
some IEEE 802.15.4 applications.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-01-16 10:47:10 +02:00
Gerson Fernando Budke
7e4216a6c9 samples: wpanusb: Add atsamr21_xpro board support
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>
2020-01-16 10:47:10 +02:00
Wolfgang Puffitsch
dbdfd2995b Bluetooth: host: Guard calls to bt_conn functions
Guard calls to bt_conn functions in bt_le_adv_start_internal with
IS_ENABLED(CONFIG_BT_PERIPHERAL) to avoid undefined symbols in builds
that do not support that role.

Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
2020-01-16 08:53:21 +01:00
Andrew Boie
d3314851df tests: userspace: test syscall irq context
Interrupts should not be locked when servicing a system call,
and the kernel should not think we are in an interrupt handler
either.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-01-16 08:51:16 +01:00
Vinayak Kariappa Chettimada
9a6d200cb9 Bluetooth: controller: legacy: Fix redundant priv variable check
Fix the redundant check of priv flag variable introduced as
regression in commit f8877e39ce ("Bluetooth: controller:
legacy: Fix controller address check").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-01-16 08:49:35 +01:00
Ulf Magnusson
5c1a3fd6f7 boards: cc322xsf_launchxl: Do not assign promptless HAS_CC3220SDK sym
Assignments have no effect on promptless symbols. Flagged by
https://github.com/zephyrproject-rtos/zephyr/pull/20742.

This symbol is (always) selected, in
soc/arm/ti_simplelink/cc32xx/Kconfig.soc.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-15 18:02:48 -05:00
Maureen Helm
ee65932c96 drivers: watchdog: Refactor mcux wdog driver to use generated dts macros
Refactors the mcux wdog driver to use generated device tree macros
directly. Removes now unused dts fixup macros from kinetis socs.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-01-15 18:02:19 -05:00
Maureen Helm
9329c0db27 drivers: counter: Refactor mcux rtc driver to use generated dts macros
Refactors the mcux rtc driver to use generated device tree macros
directly. Removes now unused dts fixup macros from kinetis socs.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-01-15 18:02:19 -05:00
Maureen Helm
94c5a75998 drivers: spi: Refactor mcux dspi driver to use generated dts macros
Refactors the mcux dspi driver to use generated device tree macros
directly. Removes now unused dts fixup macros from kinetis socs.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-01-15 18:02:19 -05:00
Maureen Helm
93b457f4da drivers: serial: Refactor mcux lpsci driver to use generated dts macros
Refactors the mcux lpsci driver to use generated device tree macros
directly. Removes now unused dts fixup macros from i.mx rt and kinetis
socs.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-01-15 18:02:19 -05:00
Maureen Helm
5df8b5d63e drivers: serial: Refactor mcux uart driver to use generated dts macros
Refactors the mcux uart driver to use generated device tree macros
directly. Removes now unused dts fixup macros from kinetis socs.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-01-15 18:02:19 -05:00
Maureen Helm
806813bb6a drivers: i2c: Refactor mcux i2c driver to use generated dts macros
Refactors the mcux lpi2c driver to use generated device tree macros
directly. Removes now unused dts fixup macros from kinetis socs.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-01-15 18:02:19 -05:00
Ulf Magnusson
f200e76773 boards: kconfig: Do not assign promptless SOC_FAMILY_TISIMPLELINK
Assignments have no effect on promptless symbols. Flagged by
https://github.com/zephyrproject-rtos/zephyr/pull/20742.

This symbol is selected by the SOC_SERIES_CC13X2_CC26X2,
SOC_SERIES_CC2650, SOC_SERIES_CC32XX, and SOC_SERIES_MSP432P4XX symbols.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-15 18:01:26 -05:00
Ulf Magnusson
d6b19611c3 boards: kconfig: Do not assign promptless SOC_FAMILY_EXX32
Assignments have no effect on promptless symbols. Flagged by
https://github.com/zephyrproject-rtos/zephyr/pull/20742.

This symbol is selected by the SOC_SERIES_EFM32HG,
SOC_SERIES_EFM32PG12B, SOC_SERIES_EFM32WG, SOC_SERIES_EFR32FG1P, and
SOC_SERIES_EFR32MG12P symbols.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-15 18:01:00 -05:00
Anas Nashif
009037185a cmake: print version to stdout, not stderr
The version message from cmake is not an error and should not go to
stderr.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-15 15:19:22 -05:00
Brooks Prumo
92f61b8075 include: dfu: Add extern "C" in mcuboot.h
I ran into a build failure trying to use Zephyr's MCUmgr.  It was a
missing symbol at link time, and since I am using C++, I looked to see
if it was a name mangling issue.  The mcuboot.h header file was missing
`extern "C"` guards, which was the root cause of the issue.

This commit adds C++ support to mcuboot.h by adding in `extern "C"`
guards.  I validated this change by building and running my DFU
application with MCUmgr successfully.

Signed-off-by: Brooks Prumo <brooks@prumo.org>
2020-01-15 12:18:59 -06:00
Kumar Gala
5a911ec47f dts: gpio: ti,boosterpack: Remove title as its deprecated
Move title info into description as we've deprecated the title field.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-01-15 11:37:28 -06:00
Kumar Gala
50a23de5af dts: silabs,gecko-spi-usuart: Remove title as its deprecated
Move title info into description as we've deprecated the title field.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-01-15 11:37:28 -06:00
Kumar Gala
ae77fe1369 dts: dht: Remove title as its deprecated
Move title info into description as we've deprecated the title field.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-01-15 11:37:28 -06:00
Anas Nashif
3f3c72a911 x86: qemu_x86_64: workaround SMP issues in x86
We have some races causing random failures with this platform, set cpu
number to one while we investigate and fix the issue.

Related to #21317

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-15 12:05:44 -05:00
Ulf Magnusson
a3f97e853e boards: cy8ckit: kconfig: Do not assign promptless SOC_FAMILY_PSOC6
Assignments have no effect on promptless symbols. Flagged by
https://github.com/zephyrproject-rtos/zephyr/pull/20742.

This symbol is selected by SOC_SERIES_PSOC62, in
soc/arm/cypress/psoc6/Kconfig.series.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-15 11:31:34 -05:00
Maureen Helm
c0e2c6369b soc: nxp_imx: Fix counter_basic_api test for i.mx rt boards
The counter_basic_api test was broken for i.mx rt boards when we
refactored the mcux gpt driver to use generated device tree macros in
commit b8ad9969ef.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-01-15 11:30:44 -05:00
Dominik Ermel
8cb200309b drivers: sensors: qdec_nrfx: Fix compilation after HAL update
hal_nordic update 1e8103ae require changes to sensor code,
to make it compile.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-01-15 16:16:09 +01:00
Erwan Gouriou
fc85361cfe drivers: flash: stm32: Update SR define
Following update of stm32wb package, FLASH_FLAG_SR_ERROR
has been renamed to FLASH_FLAG_SR_ERRORS.
Update driver to fix compilation issue.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-15 08:39:05 -06:00
Erwan Gouriou
716580377f west.yml: Update hal_stm32 with latest STM32Cube packages
Update hal_stm32 to new version including latest STM32Cube packages.
Includes the following:
- stm32cube: update stm32wb to version V1.3.0 (commit 374333f)
- stm32cube: update stm32g0 to version V1.3.0 (commit e209cea)
- stm32cube: update stm32f0 to version V1.11.0 (commit 08833e5)
- stm32cube: update stm32f3 to version V1.11.0 (commit 2a412a4)
- stm32cube: update stm32h7xx cube version to V1.5.0 (commit a08d1dc)
- stm32cube: update stm32f2xx cube version to V1.8.0 (commit b4226d5)
- stm32cube: update stm32f1xx cube version to V1.8.0 (commit a515c67)

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-15 08:39:05 -06:00
Vinayak Kariappa Chettimada
51c46d94ed Bluetooth: controller: Fix CONFIG_BT_CTLR_TX_BUFFER_SIZE range
Fix CONFIG_BT_CTLR_TX_BUFFER_SIZE value range to 251 Bytes
due to implementation limitation in use of u8_t for PDU
length fields in controller Tx buffers.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-01-15 15:26:19 +01:00
Vinayak Kariappa Chettimada
8cd9a94b2f Bluetooth: controller: split: Fix controller privacy address check
Fix controllers address check in cases of controller-based
privacy is supported but not used to start advertising.

This fixes regression introduced in
commit 896619ad40 ("Bluetooth: controller: Fix
controller address check").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-01-15 15:24:55 +01:00
Łukasz Hejnak
09933fbdca samples: drivers: soc_flash_nrf: Tagged sample with nrf9160
Extended the tags section to also match this sample for nrf9160.

Signed-off-by: Łukasz Hejnak <lukasz.hejnak@nordicsemi.no>
2020-01-15 07:39:53 -06:00
Łukasz Hejnak
35fc0bea46 samples: drivers: soc_flash_nrf: add test harness
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>
2020-01-15 07:39:53 -06:00
Håkon Øye Amundsen
e3da8cc18c soc: nordic: add HAS_HW_NRF_ACL for nrf53 net core
The network core has the ACL peripheral, reflect this in the
SoC kconfig.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2020-01-15 14:13:05 +01:00
Ulf Magnusson
699b28a089 doc: dts: Remove 'title:' from binding example
'title:' was deprecated in commit 2934ee2cda ("dts: bindings: Remove
'title:' and put all info. into 'description:'"). Overlooked leftover.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-15 14:02:51 +01:00
Andries Kruithof
98430a61cf Bluetooth: controller: split: Refactor DLE prepare
Refactor the event_len_prep routine to increase readability without
affecting code size

Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
2020-01-15 14:01:23 +01:00
Andries Kruithof
26a97aed4f Bluetooth: controller: split: Fix LENGTH_REQ PDU prepare
There is an obscure bug in the case that CFG_BT_CTLR_PHY is not defined;
when a feature-exchange already has happened the lr->max_tx_time and
lr->max_rx_time are not calculated.
This bug is fixed by this commit.

Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
2020-01-15 14:01:23 +01:00
Asger Munk Nielsen
86116fe7de Bluetooth: Controller: Add unit test of SW privacy feature
Unit test of Sw deferred privacy data structure and related functions.

Signed-off-by: Asger Munk Nielsen <asmk@oticon.com>
2020-01-15 12:52:25 +01:00
Andrew Boie
75bd9b6ce0 sanitycheck: improve summary output
Show how many tests passed out of those that were actually
performed, not including skipped tests (which we also report
a count of)

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-01-14 23:26:06 -05:00
Ulf Magnusson
d3bdb67cd7 doc: dts: Use definition list for compatible/label/ref
See https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html.
Gives neater output compared to a bullet list.

Also tweak the text a bit.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-14 16:53:12 -05:00
Ulf Magnusson
0ddc7b819b doc: dts: Say <BOARD> instead of BOARD
Makes it clearer that it's not meant literally.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-14 16:53:12 -05:00
Ulf Magnusson
8d8b06978c dts: Remove generation of <BOARD>.dts_compiled
Unused after the old devicescript were removed in commit c8c35f76ab
("scripts: dts: Remove deprecated extract_dts_includes.py script"). The
old scripts relied on parsing the output of 'dts -Odts', which replaces
e.g. phandle references. The new scripts parse the DTS files directly.

Keep running the dtc compiler just to catch any warnings/errors from it.

The edit to doc/guides/build/build-config-phase.svg is to remove the box
with '*.dts_compiled' in it (and the arrows to/from it). https://draw.io
can be used to edit it.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-14 16:53:12 -05:00
Ulf Magnusson
9f18df0274 doc: dts: Add more details, implementation notes, and examples
Rewrite most of the 'Input and output files' section to add more details
and implementation notes, and to make some description more more
concrete:

 - Mention dtlib, edtlib, and gen_defines.py, and explain what they do

 - Add an example of how macros get generated from the devicetree, and
   explain the DT_<node>_<property> format of the generated identifiers.

   Merge the 'Include files generation' section into the 'Input and
   output files' section at the same time.

 - Explain that the base devicetree and the overlays just get
   concatenated, and why this works

 - Add more details on how dts_fixup.h files work

 - Mention that the C dtc compiler is only run to catch errors and
   warnings from it

 - Mention that the concatenated devicetree appears in
   zephyr/<BOARD>.dts.pre.tmp

 - Mention /include/, which is the native DTS mechanism for including
   other files

 - Misc. other minor tweaks

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-14 16:53:12 -05:00
Ulf Magnusson
fbd3d4b907 tests: counter: kconfig: Fix debug log level enabling
COUNTER_LOG_LEVEL (defined in
subsys/logging/Kconfig.template.log_config) is derived automatically and
has no prompt. Assignments have no effect on promptless symbols.

Set COUNTER_LOG_LEVEL_DBG=y instead, which corresponds to
COUNTER_LOG_LEVEL=4.

Flagged by https://github.com/zephyrproject-rtos/zephyr/pull/20742.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-14 16:51:57 -05:00
Ulf Magnusson
2f2a04d167 tests: bluetooth: kconfig: Do not assign promptless BT_MESH_PROV
Assignments have no effect on promptless symbols. Flagged by
https://github.com/zephyrproject-rtos/zephyr/pull/20742.

BT_MESH_PROV is already selected by BT_MESH_PB_ADV and BT_MESH_PB_GATT,
which these configuration files enable.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-14 16:49:25 -05:00
Ulf Magnusson
aa6178b777 boards: stm32: kconfig: Do not assign promptless SOC_FAMILY_STM32
Assignments have no effect on promptless symbols. Flagged by
https://github.com/zephyrproject-rtos/zephyr/pull/20742.

This symbol is enabled through being select'ed by other symbols.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-14 16:48:35 -05:00