Commit graph

42249 commits

Author SHA1 Message Date
Carles Cufi
340ead4239 samples: sensor: bme280: Add overlay
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>
2020-03-04 20:29:00 +02:00
Piotr Mienkowski
18a744861f boards: set CONFIG_WDT_DISABLE_AT_BOOT=y for all Atmel SAM boards
On Atmel SAM family the watchdog peripheral is enabled by default. To
ease maintenance of tests and samples, which typically don't handle
watchdog, disable the watchdog during the boot.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2020-03-04 18:25:04 +02:00
Piotr Mienkowski
7e0f31e3e7 samples: tests: don't disable watchdog when it is used
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>
2020-03-04 18:25:04 +02:00
Piotr Mienkowski
e609ad0c43 Revert "drivers: watchdog: Make WDT_DISABLE_AT_BOOT default to y"
This reverts commit 382e6fbccf.

Disabling watchdog at boot breaks watchdog API contract. Production
firmware should never ship with the option enabled. Unfortunately, this
is dangerosly easy to overlook. If left enabled, in the best case, it
will degrade functionality of the subsystem. In the worst case it
will leave watchdog permanently disbled.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2020-03-04 18:25:04 +02:00
Johann Fischer
23ace0e556 usb: mass_storage: check LBA range
Check if LBA is in range of the memory size.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-03-04 17:14:52 +02:00
Johann Fischer
c88155fd2d usb: mass_storage: fix possible page buffer overflow
The page buffer can overflow if dCBWDataTransferLength
is multiple of the BLOCK_SIZE but the host uses
OUT packets smaller than MPS durng transfer.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-03-04 17:14:52 +02:00
Anders Montonen
219d9fc082 kconfig: Fix typo in ARM_MPU help
The ARMv7-M MPU requires power-of-two alignment, not the ARMv8-M MPU, as
noted a few lines later.

Signed-off-by: Anders Montonen <Anders.Montonen@iki.fi>
2020-03-04 10:18:27 +02:00
Johann Fischer
e0318ff3ee doc: release notes: refine USB relese notes
Refine USB relese notes.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-03-04 09:36:46 +02:00
Johan Hedberg
de3c5ae9ff doc: release notes: Add information for Xtensa SoCs and boards
Mention the Intel Apollolake Audio DSP SoC and board that were added
for Zephyr 2.2.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-03-03 19:05:43 +02:00
Emil Obalski
a95298e54a doc: release notes: Add 2.2 release notes for USB subsystem
Added usb related notes for Zephyr 2.2

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2020-03-03 18:40:28 +02:00
Ravi kumar Veeramally
cfd0f3e18d tests: net: Enable NET_IPV4_HDR_OPTIONS in tests
Test case for IPv4 header options was added but
CONFIG_NET_IPV4_HDR_OPTIONS option was not enabled.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2020-03-03 16:50:32 +02:00
Ravi kumar Veeramally
491367115d net: ipv4: Fix compilation errors
opts_len renamed to total_opts_len in previous changes.
But it's not replaced at one place.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2020-03-03 16:50:32 +02:00
Krzysztof Chruscinski
0cc209d5b2 doc: release notes: Add 2.2 release notes for logging subsystem
Added entry regarding changes in the logger.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-03-03 14:01:56 +02:00
Krzysztof Chruscinski
ea331fd03f doc: release notes: Add 2.2 release notes for nrf_uarte serial driver
Added entry regarding UARTE driver implementation changes.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-03-03 14:01:56 +02:00
Krzysztof Chruscinski
e81a3ee8c2 doc: release notes: Add 2.2 release notes for clock control
Added entry regarding clock_control driver implementation changes.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-03-03 14:01:56 +02:00
Jan Van Winkel
e5ddc31f74 doc: release notes: Add display related release notes
Added display related release notes for Zephyr 2.2

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-03-03 09:31:14 +02:00
Martí Bolívar
f2469ce576 doc: board_porting: add link to west flash/debug info
Makes this page a little more visible to porters.

Suggested-by: Lucian Copeland <hierophect@gmail.com>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-03-03 09:30:32 +02:00
Martí Bolívar
24ce05c841 doc: improve west flash help for dfu-util
Try to make it clearer what's going on here.

Suggested-by: Lucian Copeland <hierophect@gmail.com>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-03-03 09:30:32 +02:00
Carles Cufi
8a5063924c doc: relnotes: Add Bluetooth Controller 2.2 release notes
Fill the Bluetooth Controller section in the 2.2 release notes.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-02 22:50:01 +02:00
Flavio Ceolin
fbeaa0a510 kernel: Stack pointer random depends on MULTITHREADING
Don't pretend with have stack randomization without multithreading.
When multithreading is disabled the "main" thread never starts. Zephyr
will run on the stack used for the z_cstart(), which on most
architectures is the interrupt stack.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2020-03-02 22:49:37 +02:00
Tomasz Bursztyka
18dee338d8 doc: release notes: Add 2.2 release notes for DMA
DW and STM32 changes added.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-03-02 21:27:46 +02:00
Carles Cufi
53431884c3 doc: toolchains: Remove warning about GNU Arm 8
Since the latest version available for download works well, there is no
reason anymore to warn the users about a particular, older toolchain
version not working correctly on Windows.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-02 21:27:30 +02:00
Johan Hedberg
50a396720d doc: release process: Update release creation instructions
Fix the GitHub web UI button name, and update the instructions to use
signed tags.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-03-02 19:36:51 +02:00
Johan Hedberg
8d645b4a8e doc: release notes: Add 2.2 changes for Bluetooth Mesh
Add release notes for Bluetooth Mesh.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-03-02 19:36:29 +02:00
Johan Hedberg
0280e0a471 doc: release notes: Add 2.2 changes for Bluetooth host
Add release notes for the Bluetooth host.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-03-02 19:36:29 +02:00
Johan Hedberg
ede8f165af doc: release notes: Add 2.2 changes for Bluetooth drivers
Add release notes for Bluetooth drivers.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-03-02 19:36:29 +02:00
Carles Cufi
b3bb324735 doc: gsg: Update SDK version
Several users have noticed that the SDK version in the GSG is outdated.
Update it to the latest, 0.11.2.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-02 18:52:10 +02:00
Andrzej Puzdrowski
177e075bb5 doc/releases/release-note-2.2: setting sample addition
Add info on introduction of the settings sample.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-03-02 17:41:21 +02:00
Andrzej Puzdrowski
f39f762054 doc/releases/release-note-2.2: flash driver part
Described changes in flash driver implementations.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-03-02 17:41:21 +02:00
Johann Fischer
105849cf38 usb: dfu: check requested length (wLength) during DFU_UPLOAD
During DFU_UPLOAD, the host could requests more data
as stated in wTransferSize. Limit upload length to the
size of the request buffer (USB_REQUEST_BUFFER_SIZE).

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-03-02 17:37:24 +02:00
Johan Hedberg
5372e78827 release: Zephyr 2.2.0-rc3
Bumped to v2.2.0-rc3

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-02-29 21:10:38 +02:00
Vinayak Kariappa Chettimada
4bacb0e098 Bluetooth: controller: legacy: Fix cond. compile error
Fix conditional compilation error when enabling
BT_CTLR_FAST_ENC for central only application builds.

Also added additional compilation to code exclusive to
central or peripheral role.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-02-29 19:39:41 +02:00
Martí Bolívar
dc0948424e scripts: run_common: fix command line --hex-file and friends
This is yet another bug introduced by the move to runners.yaml.
Sigh. I should have tested this better.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-29 19:38:49 +02:00
Martí Bolívar
f8cb3d4d53 scripts: run_common: rename 'args' to 'user_args'
This will also make the reason for a following bug fix easier to see.

Update a comment block to include all the work that needs doing.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-29 19:38:49 +02:00
Martí Bolívar
97dbda2088 scripts: run_common: rename unknown_args to user_runner_args
This makes its true value clearer, and will make a later bug fix patch
easier to understand.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-29 19:38:49 +02:00
Vinayak Kariappa Chettimada
ca66f5b2e5 tests: Bluetooth: shell: Fix conditional compile error
When building the tests/bluetooth/shell application without
the BT_CENTRAL feature, compilation fails:

subsys/bluetooth/shell/bt.c:1642: undefined reference to
`bt_conn_create_auto_le'

Signed-off-by: Vinayak Kariappa Chettimada <vinayak.kariappa@gmail.com>
2020-02-29 10:47:18 +02:00
Ravi kumar Veeramally
2709b14bcb tests: net: Add wrong options length case
Wrong option length in IPv4 header options testcase
added. This should cover malformed packet case.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2020-02-28 22:34:11 +02:00
Ravi kumar Veeramally
22f93b35ab net: ipv4: Fix parsing of IPv4 header options
If IPv4 header options has wrong options length
(e.g. options length is more that actual data),
then parser decrements opts_len without checking
actual data length. Which crashes the network stack.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2020-02-28 22:34:11 +02:00
Tobias Svehagen
60563977df Bluetooth: Mesh: Fix handling of app index and local device key
Fix problem of not checking if the remote device key is actually our
own. This bug was intruduced in
46a95f12ad and causes failure of models
that use app_idx BT_MESH_KEY_DEV_REMOTE. Since this is used by cfg_cli,
it was not possible to do self-configuration.

Signed-off-by: Tobias Svehagen <tobias.svehagen@gmail.com>
2020-02-28 20:18:54 +02:00
Daniel Leung
2ac3a85273 soc: mec1501: wait for UART FIFO clear before deep sleep
It is observed that after each test, weird characters appear on
console. This problem goes away if deep sleep is disabled.
The theory is that the CPU runs to deep sleep (_sys_suspend())
faster than UART can shift all the bits out. If we spin wait
for UART FIFO to clear, this is no longer an issue. This is
circumstantial evidence to the theory. So for now, put in
a workaround to spin wait for UART FIFO to clear before
going into deep sleep.

Relates to #22885

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-02-28 20:18:13 +02:00
Jukka Rissanen
67e43a21c8 doc: release notes: Add information about GSM modem
The Modem chapter was missing mention about generic GSM modem
support.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-02-28 16:37:41 +02:00
Martí Bolívar
647fe7a47a doc: dts/macros.rst: "clocks" macro fixes
The "fixed-clock" value referenced in the documentation is actually a
compatible value, not a property name. Fix that.

Harden the "expected to have a clock-frequency property" language to
use "must" instead of "expected". The scripts error out if a node with
fixed-clock compatible is missing a clock-frequency property; it's not
a soft expectation.

Be explicit about clock-frequency units.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-28 12:50:36 +02:00
Vinayak Kariappa Chettimada
f972fb057d Bluetooth: controller: Add Kconfig for Optimize for Speed
Add Kconfig option to support building the controller
optimized for speed.

Fixes #21601.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-02-28 10:55:33 +02:00
Vinayak Kariappa Chettimada
e1d9620187 Bluetooth: controller: legacy: Fix assert on DLE procedure stall
Fix local initiated Data Length Update procedure from being
stalled when a remote initiates a procedure with instant.

Fixes #23069.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-02-28 10:02:15 +02:00
Stephanos Ioannidis
fa19193898 boards: qemu_cortex_r5: Add board documentation
This commit adds the board documentation to the qemu_cortex_r5
platform.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-02-28 09:55:39 +02:00
Alexander Wachter
b96477dd69 SoC: SAM3x and SAM4: Add the Flash Controller to the DT
This commit adds Device-Tree instances of the Flash controller
to the SAM3X, SAM4E and SAM4S series. The Flash-Controller
is used to get the unique device identifier.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2020-02-27 21:14:54 +01:00
Alexander Wachter
a22f0ac1ab drivers: hwinfo: Don't disable CLOE on SAM3x seies
CLOE (Code Loop Optimization) does not exist on SAM3x.
Make the EEFC_FMR_CLOE disable depending on CONFIG_SOC_SERIES_SAM3X.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2020-02-27 21:14:54 +01:00
Alexander Wachter
4cfd4a707d SoC: stm32: Include LL utilities if HWINFO is selected
Include stm32XXxx_ll_utils.h in soc.h for every stm32 SoC,
if CONFIG_HWINFO_STM32 is selected.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2020-02-27 21:14:54 +01:00
Alexander Wachter
57bd09186b boards: Remove "supported: -hwinfo" from all boards
Remove all "supported: -hwinfo" definitions from the boards
yaml files and documentation. hwinfo can generally be tested
on every board because it returns -ENOTSUP if not supported.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2020-02-27 21:14:54 +01:00
Alexander Wachter
e49de0d866 drivers: hwinfo: Exclude NRF53 non-secure from hwinfo driver
Make the NRF hwinfo driver depending on !TRUSTED_EXECUTION_NONSECURE
because the FICR registers are not accessible from the non-secure
world.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2020-02-27 21:14:54 +01:00