Commit Graph

44107 Commits

Author SHA1 Message Date
Peter Bigot 1a7cd6ddbd kernel: device: invert sense of ready bit
The device status ready bit replaced the previous hack of clearing the
device API pointer when initialization of the device failed.  It
inadvertently changed the behavior of device_get_binding() when
invoked before the device was initialized: previously that succeeded
for uninitialized devices, after the change it failed.

Multiple driver initializations rely on being able to get a device
pointer for something they're going to depend on in their init
function, even if that device has not yet been initialized.  Although
this is wrong, and would cause faults if the device failed to
initialize before use, in practice it has been working.

It's not feasible to identify all the situations where this has
occurred, nor to add code to diagnose such cases without changing the
state associated with a device to distinguish initialized from
initialization success/failure.  Restore the previous behavior until a
more holistic solution is developed.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-09-15 18:22:38 +02:00
Anas Nashif c3eeab7b04 board: arc: fix nsim_em7d_v22 identifier
Use correct identifier..

nsim_em_em7d_v22 -> nsim_em7d_v22

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-09-15 12:03:56 -04:00
Jukka Rissanen eb3288d5b1 modules: mbedtls: Allow to enable server name indication option
Allow user to enable RFC 6066 server name indication (SNI) in SSL.

Fixes #27783

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-09-15 09:52:44 -05:00
Ievgenii Meshcheriakov aac3174677 shell: Fix typo in a comment
Typo: s/badckends/backends/.

Signed-off-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@nordicsemi.no>
2020-09-15 09:44:42 -05:00
Ievgenii Meshcheriakov b00170436b shell: Make shell UART backend initialization priority configurable
Closes: #28331

Configurable initialization priority is useful when using CDC ACM
serial device, for example.

Signed-off-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@nordicsemi.no>
2020-09-15 09:44:42 -05:00
Watson Zeng c54a6a0d6e boards: arc: nsim: fix yaml identifier for nsim_em_em7d_v22
fix yaml identifier for nsim_em_em7d_v22 configuration

Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
2020-09-15 10:34:49 -04:00
Tomasz Bursztyka ed98883795 device: Fixing new left over device instance made constant
Recent addition that went under the radar.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-09-15 09:18:43 -05:00
Andrzej Głąbek a3430c2caf drivers: spi: nrfx: Restore recently changed spi_context function
Function spi_context_longest_current_buf() has been introduced in
commit ddef35c1da for the purpose of
getting the longest possible (potentially partial) SPI transfer
for which all currently active directions have a continuous buffer.
Such transfer can be done with taking advantage of a DMA that cannot
use scattered buffers (and this is the case for nRF SPI drivers with
which this function has been introduced).
Unfortunately, because of its inadequate name, later on this function
has been incorrectly used in other SPI drivers for getting the longer
of TX/RX buffers. And commit afc480f12b
recently "fixed" the implementation of this function, assumably to
adjust it to those incorrect uses, but this way it has also broken
the nRF SPI drivers.
Instead of restoring the original implementation of the function in
question, this commit adds a new one with functionality equivalent
to that original but with a hopefully less misleading name, and this
function is used in the nRF SPI drivers.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-09-15 15:59:18 +02:00
Fabio Utzig c5a7e15fd8 doc: update bluetooth to use @option ALIAS
The bluetooth.h header file uses a different tabulation style in the
documentation headers, which for recent Doxygen versions generates
verbatim blocks. This disables usage of the @option ALIAS because
verbatim blocks cannot be nested. With this commit the documentation's
tabulation is fixed and `@option` is used to resolve Kconfig options.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-09-15 15:25:01 +02:00
Fabio Utzig cf7af3a0bc doc: update reference to use :c:macro
This symbol is a macro, so fix the old :cpp:func usage to :c:macro.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-09-15 15:25:01 +02:00
Fabio Utzig 39fa56b834 doc: update Kconfig options to use @option ALIAS
This updates Kconfig options in the Doxygen documentation to use the new
@option ALIAS. There are three categories of fixes:

* Use of `:option:` inside Doxygen headers, which is not valid (this is
  rST syntax!).
* Kconfig options that were just written as plain text and were no
  references were generated.
* Use of `@rst` blocks where the only reason for using them was to have
  Kconfig options resolved.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-09-15 15:25:01 +02:00
Fabio Utzig cb644149c6 doc: add new @option Doxygen ALIAS
This new ALIAS can be used to add references to Kconfig options. To use
it enclose the Kconfig symbol name like this `@option{KCONFIG_FOO}`.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-09-15 15:25:01 +02:00
Fabio Utzig 5ee34e1fae doc: enable SEPARATE_MEMBER_PAGES compatibility
Enable Breathe SEPARATE_MEMBER_PAGES compatibilty; this option allows
resolution of a huge amount of references that are currently broken
(around 650 based on my grep foo!) due to issues in the Doxygen XML
generation when this option is enabled.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-09-15 15:25:01 +02:00
Fabio Utzig 054d89feaf doc: bump breathe>=4.21.0
Breathe 4.21.0 brings a few interesting features that improve the
generated documentation:

* A new `separate_member_pages` config option that patches issues in the
  Doxygen XML generated when SEPARATE_MEMBER_PAGES option is YES.
* A new rST verbatim mode that allows producing inline elements.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-09-15 15:25:01 +02:00
Erwan Gouriou abb06793e7 boards: Fix obsolete link to flash partition doc
"flash_partitions" page in doc disappeared.
Replace by what seems the closest equivalent.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-09-15 12:46:01 +02:00
Dominik Ermel 4e76da8ab1 storage: flash_map: Fix checking unsigned for negative value
The unsigned size_t type variables have been checked for having
negative values.

Fixes #28171, Coverity-CID: 214224

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-09-15 12:44:13 +02:00
Peter Bigot 5f0991d84b kernel/timeout: revert to signed dticks for timeout storage
The fix to handle long duration timeouts in 150e18de6e also
changed the duration value from signed to unsigned.  This can cause
delays in processing alarms when timer handlers run longer than a tick
(either due to delays or if there are many of them).  Revert to a
signed representation.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-09-15 12:11:29 +02:00
Emil Obalski dc79b37167 usb: nrf: Do not allow to clear STALL or dtoggle for ISO ep.
Isochronous transactions do not support handshake phase
so in particular the ISO endpoint cannot be STALLed.
Isochronous transactions do no support data toggle sequencing
and should only send DATA0 PID.

Taking into consideration those requirements do not try to
clear dtoggle or STALL an ISO Endpoint in nRF USBD driver.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2020-09-15 10:15:20 +02:00
Anas Nashif 6c53e93318 power: fix Kconfig help message
Fix help message of Kconfig, this looks like a copy/paste from the
settings subsystem.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-09-14 21:27:23 -04:00
Ioannis Glaropoulos d19d6a76a7 arch: arm: aarch64: remove non-applicable linker section
The non-secure callable functions' section is only applicable
to Cortex-M with TrustZone-M extension. Remove it from AARCH64
linker script. (CONFIG_ARM_FIRMWARE_HAS_SECURE_ENTRY_FUNCTIONS
is only enabled for Cortex-M so this is a no-op, but still, it
is a useful cleanup.)

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-09-14 19:17:04 -05:00
Vincent Wan 7658ca77b7 boards: doc update for cc32xx and cc13x2/cc26x2 boards
Updating docs in anticipation of Zephyr 2.4 release.

Signed-off-by: Vincent Wan <vwan@ti.com>
2020-09-14 19:14:34 -05:00
Sven Herrmann 9ff5dc459a boards: arduino_due: Enable internal pullup on uart rx line
To allow uart communication via the boards ATmega16U2 USB-to-TTL serial
chip.

Signed-off-by: Sven Herrmann <sven.herrmann@posteo.de>
2020-09-14 18:49:05 -05:00
Anas Nashif 4fa08decc1 tests: usb: add fixture requirement
The test for this sample requires a usb connection to a secondary port,
output is not captured on the default usb port.

Fixes #28154

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-09-14 18:37:17 -05:00
Roman Vaughan 4000e2849d drivers: led_strip: APA102 use CS flags from devicetree
The pull request #26269
drivers: SPI: Adds CS flags from devicetree
missed out on the APA102 led_strip driver, most likely due to the driver
not utilising the chip select signal until #25310
drivers: led_strip: Add support for external SPI CS on APA102 LED strips

Signed-off-by: Roman Vaughan <nzsmartie@gmail.com>
2020-09-14 18:35:26 -05:00
Andrew Boie 5397353dde tests: mem_protect: fix SMP race
We try to invoke `ztest_test_pass()` from inside
a fatal exception in a child thread.

On SMP this can result in the next test case starting
on another CPU, re-using the child thread before it
has a chance to exit.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-09-14 17:28:33 -04:00
Andrew Boie 2ba861cb4f tests: mem_protect: fix test prototypes
The implementations of the test cases had the wrong prototype.
The extern declarations (which were in a C file for some reason)
were correct.

I don't want to talk about the subtle code generation and stack
corruption issues that emerged from this which at one point made
me question my own sanity.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-09-14 17:28:33 -04:00
Andrzej Głąbek b197fb0bbe drivers: spi: Kconfig.nrfx: Use RAM buffers for SPIMs by default
Enable by default the use of RAM buffers in the spi_nrfx_spim.c
driver for copying TX data located in flash (as SPIM peripherals
cannot transfer directly form flash). Without this patch, users can
get confused, especially when SPI transaction is used by an upper
level driver which does not check all error codes.
For size of the buffer, use the value used so far in the reel_board
default configuration and in the SPI loopback test, i.e. 8 bytes.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-09-14 16:02:59 -05:00
Siddharth Chandrasekaran 2bdbf362e1 mgmt/osdp: Add MAINTAINERS.yml entry for OSDP
Add myself as collaborator for mgmt/osdp and its relevant paths.

Signed-off-by: Siddharth Chandrasekaran <siddharth@embedjournal.com>
2020-09-14 16:00:45 -05:00
Siddharth Chandrasekaran a3d07cda9b mgmt/osdp: Make CP/PD mode selection as first entry in Kconfig
CP/PD mode selection is the most frequently looked-for/changed key in
Kconfig. Making that as the first entry for ease of use.

Signed-off-by: Siddharth Chandrasekaran <siddharth@embedjournal.com>
2020-09-14 16:00:45 -05:00
Siddharth Chandrasekaran e6789a82ca mgmt/osdp: Change select SERIAL to imply SERIAL_SUPPORT_INTERRUPT
OSDP subsys was doing a `select SERIAL` in its Kconfig. But this has
other unintended side effects. Change this to
`imply SERIAL_SUPPORT_INTERRUPT`.

Signed-off-by: Siddharth Chandrasekaran <siddharth@embedjournal.com>
2020-09-14 16:00:45 -05:00
Armando Visconti 4ea9a8bd95 drivers: sensor: lis2dh: make the driver multi-instance
Make this driver multi-instance and use the new API.
Fixes #27753.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-09-14 13:28:45 -05:00
Simon Guinot 58d236ca3a boards: faze: enable EEPROM support
Since the SoC's built-in EEPROM is used on the FaZe board, then let's
enable it in the default configuration.

Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2020-09-14 12:47:32 -05:00
Simon Guinot 5791602095 boards: faze: enable BUILD_OUTPUT_HEX
Since commit 3124c02987
("cmake: flash/debug: refactor runner configuration"), BUILD_OUTPUT_HEX
must be selected to pass the .hex file to the runner. It is needed when
running the "west flash" command.

In addition the implicit CORTEX_M_SYSTICK option is removed.

Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2020-09-14 12:47:32 -05:00
Simon Guinot 8e3747348c boards: lpcxpresso11u68: enable BUILD_OUTPUT_HEX
Since commit 3124c02987
("cmake: flash/debug: refactor runner configuration"), BUILD_OUTPUT_HEX
must be selected to pass the .hex file to the runner. It is needed when
running the "west flash" command.

In addition the implicit CORTEX_M_SYSTICK and EEPROM_LPC11U6X options
are removed.

Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2020-09-14 12:47:32 -05:00
Simon Guinot fbcaa84a6c soc: lpc11u6x: fix pinmux initialization priority
The commit aac9e2c5e3
("device: Revise how initialization status is being handled") highlights
an initialization priority issue between the clock and pinmux device.
Since this commit Zephyr is not booting anymore on LPC11U6x MCUs. The
clock driver gets a NULL pointer when calling device_get_binding() to
retrieve the pinmux device. It is because the pinmux device is not
initialized yet due to a lesser priority.

This patch fixes this issue by ensuring that Zephyr initializes the
pinmux device before the clock device.

Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2020-09-14 12:47:32 -05:00
Carles Cufi c573bef48f github: labeler: Remove line using negation (!)
The current version of the labeler action doesn't support yet negations.
This is supported in master but we probably want to wait until a release
to update. In the meantime remove the rule that uses negations.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-09-14 18:19:39 +02:00
Carles Cufi 1019fb3fc6 Revert "github: labeler: Fix dts/ folder matching"
This reverts commit d20b6f90ea.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-09-14 18:19:39 +02:00
Andrzej Puzdrowski a9a2d63d03 release-note: settings, management and other updates
Added notes on fallowing items:
EEPROM, IEEE 802.15.4, sensor, NET/PPP, Management,
settings, logging, shell, samples.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Co-authored-by: Maureen Helm <maureen.helm@nxp.com>
2020-09-14 10:47:49 -05:00
Peter Bigot 3c6eaa5468 tests: posix: fix nanosleep tests for clock slew
Use the technique from portability/cmsis_rtos_v1 to compensate for
systems where times are being measured with different clocks.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-09-14 17:01:41 +02:00
Torsten Rasmussen 0328e89352 west.yml: update openthread module
Fixes: #28197

Update openthread to build flag changes for fixing #28197.

see zephyrproject-rtos/openthread/pull/29

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-09-14 16:40:42 +02:00
Torsten Rasmussen 2d2fea8732 cmake: create zephyr_get_targets() functions
Fixes: #28197

zephyr_get_targets() provides a mechanism for retrieving all CMake
targets for a given directory and below.

This is useful when including external modules where only libraries
required by Zephyr should be built.

For example, in openthread, this reduces the number of build steps and
build time significantly.

Before, 780 steps:
`time ninja -Cbuild`
[708/708] Linking CXX executable zephyr/zephyr.elf
135.08user 30.24system 0:46.21elapsed 357%CPU

After, 480 steps:
`time ninja -Cbuild`
[480/480] Linking CXX executable zephyr/zephyr.elf
84.02user 18.92system 0:30.72elapsed 335%CPU

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-09-14 16:40:42 +02:00
Daniel Schaupp d04c328d69 doc: getting_started: updated reel board blinky gif
Fixes: #28095

Signed-off-by: Daniel Schaupp <daniel.schaupp@online.de>
2020-09-14 16:13:58 +02:00
Krzysztof Chruscinski dbf0c9507f doc: releases: Update release notes for 2.4 with shell changes
Added note about fixed/changed behavior when too many arguments are
provided.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-09-14 16:05:11 +02:00
Krzysztof Chruscinski 91675d115a tests: shell: Add test for too many arguments in the command
Added test which validates that shell is not executing a command if
too many arguments provided.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-09-14 16:05:11 +02:00
Krzysztof Chruscinski 770f232a67 shell: Fix case when too many arguments are provided
Shell was accepting CONFIG_SHELL_ARGC_MAX+1 arguments which lead to
memory corruption and fault. Added error message reported when number
of provided arguments exceeds CONFIG_SHELL_ARGC_MAX.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-09-14 16:05:11 +02:00
Torsten Rasmussen 1c3fd85c94 CODEOWNERS: Add reviewers on Synopsys metaware toolchain
Adding Synopsys developers as reviewers on arcmwdt components.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-09-14 09:35:09 -04:00
Carles Cufi d20b6f90ea github: labeler: Fix dts/ folder matching
Use the syntax described in:
https://github.com/actions/labeler#common-examples

in order to rewrite the matching expression for the dts/ folder.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-09-14 09:33:06 -04:00
Eug Krashtan 36128bde19 samples: net: sockets: Fix for multicast filtering
After adding 'Multicast group filtering' (commit b7b73d0) server should
join CoAP IPv6 multicast group to accept multicast CoAP messages.

Signed-off-by: Eug Krashtan <eug.krashtan@gmail.com>
2020-09-14 10:27:50 +03:00
Trond Einar Snekvik 61819f23f9 Bluetooth: Mesh: Virtual address memory leak
Fixes a memory leak when a virtual address subscription is added for a
model that either has this VA already, or the model has no more space
for subscription addresses.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2020-09-12 22:48:20 +03:00
Anas Nashif bc8832f6c8 actions: add backporting bot
With new event 'pull_request_target' it is now possible to run the
backporting action that we used to have in the past as a Github app.

Use labels for backporting as before.

See https://github.com/tibdex/backport for more details.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-09-12 07:28:16 -04:00