Commit graph

50053 commits

Author SHA1 Message Date
Krzysztof Chruscinski
beb62d2946 lib: os: cbprintf: Minor fixes
Added missing errno.h include. Fixed Z_CBPRINTF_ARG_SIZE macro for
void * and cleaned up macro description.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-03-18 19:33:19 -04:00
Yestin Sun
93ff119afc boards: nucleo_l552ze_q: Leverage consolidated TFM signing code
This commit removes the signing commands from the post build steps,
in order to leverage the consolidated TFM signing code.

Also with the support to adjust the hex base address when signing,
there is no need to run the TFM_UPDATE.sh script. We can use west
flash to flash the merged hex file on the board.

Signed-off-by: Yestin Sun <sunyi0804@gmail.com>
2021-03-18 23:23:39 +01:00
Yestin Sun
46cab056bc boards: stm32l562e_dk: Enable TF-M IPC application
This commit enables the TF-M IPC sample application on stm32l562e_dk
board.
It provides device tree flash partition as an overlay in order to
configure and flash the bl2, secure/non secure firmwares.

Signed-off-by: Yestin Sun <sunyi0804@gmail.com>
2021-03-18 23:23:39 +01:00
Yestin Sun
fd4e51754f boards: stm32l562e_dk: Avoid GPIO pinctrl for non secure target
After TZ is enabled, the GPIO peripherals are secured and are
not accessible from non secure world.
This commit prevents the GPIO pinctrl from the non secure target
for stm32l562e_dk board.

Signed-off-by: Yestin Sun <sunyi0804@gmail.com>
2021-03-18 23:23:39 +01:00
Yestin Sun
19d397d88e boards: stm32l562e_dk: Add non secure target
This commit adds a second target for the stm32l562e_dk board.
The non secure target can be configured for TFM IPC application.

Signed-off-by: Yestin Sun <sunyi0804@gmail.com>
2021-03-18 23:23:39 +01:00
Yestin Sun
4215955e84 modules: trusted-firmware-m: Allow to adjust hex file base address
This commit allows to append an optional --hex-addr argument to
the wrapper script if speficied. This can adjust the base address
of the output hex file when signing the non-secure or secure
firmware images.

Signed-off-by: Yestin Sun <sunyi0804@gmail.com>
2021-03-18 23:23:39 +01:00
Scott Worley
dde796a1c9 drivers: gpio: mchp: Fix pin configure after disconnect
GPIO driver properly disconnects a pin. On subsequent pin
configure calls the driver does not clear the GPIO pin's
power gate field resulting in the pin remaining disconnected.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2021-03-18 14:55:44 -04:00
Shihao Shen
477f4d4e2b tests: kernel: pipe: second part of testcases to improve pipes coverage
Added test_pipe_get_large to cover branches in both k_pipe_put and
k_pipe_get. Added trivial testcases in test_pipe_avail_no_buffer to
cover trivial branches for k_pipe_read_avail and k_pipe_write_avail.
This is the second patch as the continuation of #31037.

Signed-off-by: Shihao Shen <shihao.shen@intel.com>
2021-03-18 12:53:06 -04:00
Peter Bigot
0f93d58994 net: dhcpv4: switch to new work API
Use the reschedule variant throughout.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-03-18 11:57:21 -04:00
Ningx Zhao
184f0e29a2 kernel: rbtree: test rbtree minmax api
Add a testcase to test some api
to enhance the coverage of rbtree's source code.

Signed-off-by: Ningx Zhao <ningx.zhao@intel.com>
2021-03-18 11:53:44 -04:00
Vinayak Kariappa Chettimada
7f727ac322 Bluetooth: controller: Fix regression in ctrl tx queue handling
Fix control Tx buffer leak into data Tx pool that happens
after a cross-over control procedure response was paused due
to currently active encryption setup procedure, and a new
control Tx PDU in addition to the paused one is enqueued
thereafter.

When the control tx PDUs is resumed but not yet enqueued
towards the radio, if there is a new control Tx PDU enqueued
then the paused control Tx PDU is not set as the head of the
control PDUs in the Tx queue. This caused the paused control
Tx PDU to be associated with data Tx pool, hence causing the
incorrect release into data Tx pool.

Relates to the commit bff76b4cce ("Bluetooth: controller:
split: Fix control tx queue handling") and to the
commit 6991d09977 ("Bluetooth: controller: Fix control tx
queue handling").

Fixes #32898.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-03-18 11:52:23 -04:00
Kumar Gala
7d35a8c93d kernel: remove arch_mem_domain_destroy
The only user of arch_mem_domain_destroy was the deprecated
k_mem_domain_destroy function which has now been removed.  So remove
arch_mem_domain_destroy as well.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-03-18 16:30:47 +01:00
Dean Weiten
14f541325a tests: kernel: mem_protect: add Ronoth Lodev to supported boards
The Ronoth LoDev in an open source board which uses
the AcSIP S76S, which itself contains an STM32L073.

Signed-off-by: Dean Weiten <dmw@weiten.com>
2021-03-18 08:48:30 -05:00
Dean Weiten
d0f93941e1 tests: drivers: dac: add Ronoth Lodev to supported boards
The Ronoth LoDev in an open source board which uses
the AcSIP S76S, which itself contains an STM32L073.

Signed-off-by: Dean Weiten <dmw@weiten.com>
2021-03-18 08:48:30 -05:00
Dean Weiten
1e10bc3180 tests: drivers: adc: add Ronoth Lodev to supported boards
The Ronoth LoDev in an open source board which uses
the AcSIP S76S, which itself contains an STM32L073.

Signed-off-by: Dean Weiten <dmw@weiten.com>
2021-03-18 08:48:30 -05:00
Dean Weiten
567afc0371 samples: drivers: dac: add Ronoth Lodev to supported boards
The Ronoth LoDev in an open source board which uses
the AcSIP S76S, which itself contains an STM32L073.

Signed-off-by: Dean Weiten <dmw@weiten.com>
2021-03-18 08:48:30 -05:00
Dean Weiten
5e82563601 board: arm: ronoth_lodev: add Ronoth LoDev board support
The Ronoth LoDev in an open source board which uses
the AcSIP S76S.

Signed-off-by: Dean Weiten <dmw@weiten.com>
2021-03-18 08:48:30 -05:00
Dean Weiten
ed1b220ba5 dts: arm: s76s: add AcSIP S76S SiP support
The AcSIP S76S is a STM32L073+SX1276+PA SoC which
supports LoRa communications.

Signed-off-by: Dean Weiten <dmw@weiten.com>
2021-03-18 08:48:30 -05:00
Vinayak Kariappa Chettimada
bc782cf11b Bluetooth: controller: Remove redundant connection initiated check
Remove the redundant connection initiated check as the event
is closed on connection initiated and it is sufficient to
check in the prepare_cb function to abort any events in the
pipeline after the connection has been initiated.

Relates to commit 5ce5dc055e ("Bluetooth: controller:
Avoid race between ULL and LLL when initiating conn") and
commit 18f5fb99c1 ("Bluetooth: controller: Remove use of
lll_stop").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-03-18 13:52:42 +01:00
Giancarlo Stasi
39a3b3c71e drivers: entropy: stm32: fix discarding of false negative rng values
Function random_byte_get() returns only the least significant byte of
the 32-bit random datum, as this is the used value, so avoiding that
higher numbers are interpreted as negative error codes and their value
is not discarded.

Signed-off-by: Giancarlo Stasi <giancarlo.stasi.co@gmail.com>
2021-03-18 08:47:09 -04:00
Shlomi Vaknin
41ca34a752 drivers: stm32: rtc: Add option to keep rtc value
Add option to keep rtc value between resets.

Signed-off-by: Shlomi Vaknin <shlomi.39sd@gmail.com>
2021-03-18 08:46:30 -04:00
Jeremy Bettis
d4316cc483 shell: Fix llvm-clang coverage without backend.
Building this file with CONFIG_COVERAGE=y and CONFIG_SHELL_LOG_BACKEND=n
fails on the llvm-clang compiler. Swapping the IS_ENABLED and
log_backend allows the compiler to optimize out the if block even with
coverage enabled.

Signed-off-by: Jeremy Bettis <jbettis@chromium.org>
2021-03-18 07:41:06 -05:00
Vinayak Kariappa Chettimada
62e5db70ef Bluetooth: controller: Fix channel identifier for Periodic Adv/Sync
Fix the channel identifier value used in Periodic
Advertising and Synchronization.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-03-18 13:11:47 +01:00
Vinayak Kariappa Chettimada
545332db98 Bluetooth: controller: Use channel identifier function
Use the channel identifier calculation function in the
central and peripheral implementation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-03-18 13:11:47 +01:00
Vinayak Kariappa Chettimada
c5e75509ac Bluetooth: controller: Add function to calculate channel identifier
Added function to calculate channel identifier value
required for Channel Selection Algorithm #2.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-03-18 13:11:47 +01:00
Kumar Gala
b81361609a devicetree: deprecate DT_DMAS_LABEL APIs
Mark all variants of the DT_DMAS_LABEL APIs:
* DT_DMAS_LABEL_BY_IDX
* DT_DMAS_LABEL_BY_NAME
* DT_INST_DMAS_LABEL_BY_IDX
* DT_INST_DMAS_LABEL_BY_NAME

As deprecated in favor of utilizing:

* DT_DMAS_CTLR_BY_IDX
* DT_DMAS_CTLR_BY_NAME
* DT_DMAS_CTLR
* DT_INST_DMAS_CTLR_BY_IDX
* DT_INST_DMAS_CTLR_BY_NAME
* DT_INST_DMAS_CTLR

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-03-18 06:20:27 -05:00
Nikodem Kastelik
9c02cad509 west.yml: Update hal_nordic revision
The new revision fixes an issue with channel deallocation
in nrfx_gpiote initialization.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2021-03-18 12:04:58 +01:00
Andrzej Głąbek
031aeb2bd9 tests: bluetooth: tester: Remove assignment to CONFIG_LOG_MINIMAL
The LOG_MINIMAL option is no longer user-configurable, as now it has
no prompt. LOG_MODE_MINIMAL should be modified instead.
But in this case, the assignment is redundant, as this option is not
enabled by default. Remove it then, to align the configuration file
for nrf5340dk_nrf5340_cpuapp with the one for nrf52840dk_nrf52840.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-03-18 06:17:45 -04:00
Anas Nashif
8380070dd3 MAINTAINERS: add west documentation to area
Add west documentation in doc/guides/west/ to the West area.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-03-18 06:16:36 -04:00
Anas Nashif
234efa4348 MAINTAINERS: add esspresif area
Add Espressif as a new area with maintainer.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-03-18 06:16:36 -04:00
Anas Nashif
a9e4871a07 MAINTAINERS: expand collaborators on twister
add more collaborators to the twister area.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-03-18 06:16:36 -04:00
Anas Nashif
f3e5794326 MAINTAINERS: add interrupt controllers to X86 area
Add X86 related interrupt controllers to X86 area.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-03-18 06:16:36 -04:00
Anas Nashif
2770cf5157 MAINTAINERS: remove overlap between ARM/ARM64
To assign things correctly, remove overlap between two architectures.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-03-18 06:16:36 -04:00
Peter A. Bigot
6f90d3f764 MAINTAINERS: remove my assignments
I won't be supporting Zephyr for the foreseeable future, so remove my
association with specific subsystems.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2021-03-18 06:16:23 -04:00
Peter A. Bigot
16f4a47694 CODEOWNERS: remove my assignments
I won't be supporting Zephyr for the foreseeable future, so remove my
association with specific subsystems.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2021-03-18 06:16:23 -04:00
Ioannis Glaropoulos
656abe4a6d tests: error_hook: fix sample output in README
Minor fixes to the sample output in the README file,
reflecting the correct error reason (3: oops) instead
of reason 0 (generic CPU error).

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-03-18 10:25:01 +01:00
Ioannis Glaropoulos
31f34e01bc tests: error_hook: fix test_catch_z_oops test case
test_catch_z_oops test case should not run in user mode,
since Z_OOPS needs to be called in supervisor mode, otherwise
we will be getting a reguser user memory access error that is
irrelevant to the test case (and simply is triggered by Z_OOPS
accessing the thread's syscall frame pointer).

In addition to that, we fix the argument of Z_OOPS, because, it
was triggering a null-pointer dereferencing, which results in an
error thrown before Z_OOPS is even executed (if null-pointer
exception is caught).

We also need to generate a dummy thread->syscall_frame, that
Z_OOPS implementation will access. We fix this to
_image_ram_start, because this memory is always part of the
image memory and is always available to supervisor mode. So,
accessing it won't trigger a security fault, for example.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-03-18 10:25:01 +01:00
Ioannis Glaropoulos
3721bb63a8 tests: error_hook: typo and style fixes in main.c
The commit fixes several style and typo errors in main.c.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-03-18 10:25:01 +01:00
Ioannis Glaropoulos
f78759ea86 tests: error_hook: documentation and style fixes in README
Add documentation, style and typo fixes in the README.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-03-18 10:25:01 +01:00
Sidhdharth Yadav
8ce99a8602 samples/drivers: nucleo_f767zi: Enable DAC sample application.
This commit enables DAC sample application for nucleo_f767zi.

Signed-off-by: Sidhdharth Yadav <sidhdharth.yadav@hcl.com>
2021-03-18 10:21:12 +01:00
Sidhdharth Yadav
ffd89a03b6 drivers/dac: stm32: Adding DAC driver for nucleo_f767zi
Adding DAC driver for STM32 based nucleo_f767zi platform.

Signed-off-by: Sidhdharth Yadav <sidhdharth.yadav@hcl.com>
2021-03-18 10:21:12 +01:00
Sidhdharth Yadav
49c27317cd boards/arm: nucleo_f767zi: enabling dac for nucleo_f767zi in device tree
Enabling DAC support for STM32 nucleo_f767zi in device tree.
Documentation has been updated.

Signed-off-by: Sidhdharth Yadav <sidhdharth.yadav@hcl.com>
2021-03-18 10:21:12 +01:00
Sidhdharth Yadav
db73903ed4 dts/arm: STM32: enable dac support for stm32f7 in dtsi
Enabling DAC support for STM32 in dtsi.

Signed-off-by: Sidhdharth Yadav <sidhdharth.yadav@hcl.com>
2021-03-18 10:21:12 +01:00
Torsten Rasmussen
41e283c262 cmake: move the BOARD variable watch below deprecated board handling
Fixes: #33138

Board alias and deprecated board handling is setting the BOARD variable
after zephyr_boilerplate_watch(BOARD) has been executed.

This results in the board changed warning.

This commit moves the zephyr_boilerplate_watch(BOARD) code below the
board alias and deprecation handling.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-03-18 10:20:41 +01:00
Piotr Mienkowski
d697d26bf0 samples: sensor: Add simple quadrature decoder demo
Add simple application to demonstrate quadrature decoder sensor.

Tested on Atmel SMART SAM E70 Xplained board.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2021-03-18 10:20:17 +01:00
Piotr Mienkowski
f5163e2ce2 drivers: sensor: Add Atmel SAM QDEC (TC) Driver
Tested on Atmel SMART SAM E70 Xplained board

Origin: Original

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2021-03-18 10:20:17 +01:00
Piotr Mienkowski
d6f2ba8011 dts: add support for Atmel SAM Timer Counter (TC)
Add support for Timer Counter (TC) on SAM E70/V71 series.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2021-03-18 10:20:17 +01:00
Robert Lubos
c50c0f6d07 net: lwm2m: Use link_format writer for Register/Update
The payload of the Register/Register Update message is also formatted as
application/link-format. Therefore it's reasonable to reuse the new
content writer instead of filling the payload manually.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-03-18 10:18:57 +01:00
Robert Lubos
b17555eb9e net: lwm2m: Add application/link-format content writer
This commit adds a new content writer, application/link-format, which
can be used during the Discovery procedure, to fill the content of the
response payload.

Introducing this new content writer, which encapsulates some of the
details like attribute handling which is different for bootstrap/regular
discovery, allows to unify the discovery handler in the lwm2m_engine,
thus it's no longer needed to have spearate handler functions for
bootstrap/regular discovery.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-03-18 10:18:57 +01:00
Robert Lubos
6ba362b11b net: lwm2m: Remove .well-known/core handling
`.well-known/core` resource is described by the CoAP RFC as an optional
method of resource discovery. The LwM2M specification though makes no
mentionon about this mechanism and provides an alternative method of
resource discovery instead (Device Management Discover, sec 5.4.2, and
Bootstrap Discovery, sec 5.2.7.3).

Since LwM2M does not require to implement `.well-known/core` resource
and it complicates the existing Discovery mechanism (and likely cause a
security concern) remove its handling from the LwM2M implementation.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-03-18 10:18:57 +01:00