Commit graph

41120 commits

Author SHA1 Message Date
Peter Bigot
e5af53a32f tests: kernel: critical: add output to support diagnostics
As implemented this test runs for 20 s with no output, which makes it
difficult to identify the cause of failure.  Add output indicating
progress, and emit diagnostics a particular failure observed on iMX
boards.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-11-19 15:22:01 -05:00
Alberto Escolar Piedras
d70b4aa2c8 CODEOWNERS: remove duplicate entries
/lib/libc/ was listed twice in the file
The first entry was overriden by the 2nd

And so was the case for
/samples/bluetooth/
In this second case, the override lost a user, so add it

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-11-19 14:33:52 -05:00
Piotr Mienkowski
8f0aa32ad5 soc: gecko: Enable SWO output during SoC initialization
Enable SWO debug output during system initialization and not as part of
GPIO driver initialization. After the modification the logger output
becomes available earlier during the boot process. Also, it's not
necessary anymore to build full GPIO driver only to enable SWO. This may
be critical when building small images.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-11-19 13:56:06 -05:00
Peter A. Bigot
825aab3c28 drivers: i2c_sifive: fix deprecation warnings
The init macro used outdated spellings for the instance-specific
properties, resulting in build warnings when I2C was enabled.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-11-19 13:55:27 -05:00
Peter A. Bigot
b61574d81b boards: hifive1_revb: add ardunio_i2c support
Add node label and missing label property.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-11-19 13:55:27 -05:00
Peter A. Bigot
0a8dc5b338 boards: hifive1_revb: add arduino gpio nexus map
Provide the mapping from FE310-G002 GPIO pins to the Arduino Uno
headers.  Note where pins have pre-assigned functions that may
interfere with use as GPIOs with the default pinmux assignments.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-11-19 13:55:27 -05:00
Vinayak Kariappa Chettimada
3805290055 Bluetooth: controller: legacy: Fix the slow Enc Setup alternative
Fix the implementation of slow encryption setup design
alternative to send ENC_RSP PDU before sending REJECT_IND
or REJECT_EXT_IND PDU.

Fixes #19917.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-11-19 13:53:50 -05:00
Maureen Helm
3bbb96f49d boards: arm: Add missing supported features to nxp imx rt boards
Adds missing items to the list of supported features for all nxp imx rt
boards. These features were already supported, just missing from the
list.

This change increases the number of samples and tests that sanitycheck
selects for these boards.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-11-19 13:53:09 -05:00
Maureen Helm
5ca1e08ab9 boards: arm: Sort supported list in alpha order for nxp boards
Sorts the list of supported features in alphabetical order for all nxp
boards. No features are added or removed.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-11-19 13:53:09 -05:00
Ioannis Glaropoulos
01f1ad4621 boards: arm: nrf: change board docs to link to Nordic Infocenter
Link to Nordic Semiconductor Infocenter, instead of DocLib
in the documentation for nRF-based Development Kits.

Change Nordic Semi to Nordic Semiconductor in the
DK figure captions.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-19 13:52:40 -05:00
Joakim Andersson
667886d63d Bluetooth: Kconfig: Fix host phy and data length update dependency
Fix dependency on the Host to include the PHY update procedure and the
data length update procedure. In a host-only build this feature should
be possible to select without relying on the supported features of the
controller. The host will check support using HCI command to read
attached controller features and commands supported.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-11-19 16:57:18 +01:00
Alberto Escolar Piedras
5ef243dce5 nrf52_bsim: doc: Change to fetch manifest thru http
Some people are behind firewalls that prevent them
from doing ssh connections.
Change the default BabbleSim fetching instructions to
be over https which should work for everybody.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-11-19 10:22:23 -05:00
Vinayak Kariappa Chettimada
62f939adb8 Bluetooth: controller: split: Fix typo EVENT_RX_TX_TURNARROUND
Fix typo in EVENT_RX_TX_TURNARROUND.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-11-19 15:37:56 +01:00
Ioannis Glaropoulos
c2385389d1 boards: arm: nrf53: add missing Dev Kit information
Adding missing information (image and link) for the
nRF5340 Development Kit.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-19 06:35:39 -06:00
Armando Visconti
8d32c2ce84 samples/96b_argonkey: Add a note in microphone test README file
It is important to clarify when to launch audio capture command in
order to avoid that initial boot characters enter into the audio
file leading to bad initial data.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-11-19 07:29:34 -05:00
Maksim Masalski
e8beacdfad tests: remove duplicate name for the kernel arch.interrupt test
After SanityCheck I found out, that test arch.interrupt
still has same duplicate names.
To get rid of it, I decided to change the duplicate test case name in
arch/arm/arm_interrupt to arch.interrupt.arm since that is not
a generic interrupt test but is ARM-specific.

Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
2019-11-19 12:18:18 +01:00
Andrzej Puzdrowski
8f555773ca boards/arm/nrf5340_dk_nrf5340: make cpunet flash partitions relative
A partition start offsets should be expressed relative to the flash
device base address. For cpunet flash partitions start offsets
were improperly expressed as absolute flash address.

This patch fixes partitions start addresses for nRF5340 cpunet.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-11-19 10:33:01 +01:00
Andrzej Puzdrowski
38510cec22 doc/reference/runtime_conf: fix example snippets
Removed some cut/paste from mynewt with references to os_callout,
os_event in example snippets.

code examples were also aligned to current settings handle API.

fixes #20743

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-11-19 10:21:37 +01:00
Peter Bigot
59cea85c52 CODEOWNERS: update power management for Nordic staffing changes
pizi-nordic is no longer active in Zephyr development; replace with
pabigot.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-11-18 20:29:48 -05:00
Ioannis Glaropoulos
e33ae1d613 arch: arm: userspace: add ip to clobber list in arch_syscall_invokeX
We should be adding a compiler barrier for IP register
when we are doing syscall generation on Cortex-M
architecture. The syscall generation itself only
does an SVC trigger; the execution returns to thread
mode and ARM does not guarantee that IP register is
preserved, when we finally get back to the point where
the syscall was invoked. This may be a problem, when
the compiler inlines the arch_syscall_invoke function,
so the IP register may be in use.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-18 18:01:03 -06:00
Kumar Gala
e9d0f1812b arch/arm: Fix gcc-9.2 warning with z_arch_syscall_invoke6
Fix the following warning from gcc-9.2:

arm/syscall.h:52:2: error: listing the stack pointer register 'sp'
 in a clobber list is deprecated [-Werror=deprecated]
   52 |  __asm__ volatile("svc %[svid]\n"
      |  ^~~~~~~

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-18 18:01:03 -06:00
Richard Osterloh
c82f3d4492 boards: arm: nucleo_g431rb: Fix flash back storage settings
Flash storage requires at least 2 sectors in order to work correctly

Signed-off-by: Richard Osterloh <richard.osterloh@gmail.com>
2019-11-18 11:56:49 -06:00
Ioannis Glaropoulos
d58f8bee79 cmake: copy globals from libc_nano.a to z_libc_partition
When building with NEWLIB_LIBC_NANO we need to copy
the globals from libc_nano.a into application memory
partition z_libc_partition, exactly as we do for
libc.a globals. This is required so that these globals
are accessible by nPRIV code, when building with
user mode support.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-18 09:38:29 -06:00
Ioannis Glaropoulos
e7fe10b1c7 test: lib: mem_alloc: enable user mode in newlibcnano test
libc.newlibcnano test-case shall run with user mode
enabled, similarly to the remainder of the test-cases
in the tests/lib/mem_alloc test-suite.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-18 09:38:29 -06:00
Ioannis Glaropoulos
9c0efe1adf tests: lib: mem_alloc: minor typo fixes in README file
Some minor typo and style fixes in the README file
of tests/lib/mem_alloc test-suite.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-18 09:38:29 -06:00
Francois Ramu
d3ffa8d089 driver: serial: Error handling issues in uart_stm32_set_baudrate
This patch tests the return code when calling clock_control_get_rate
and completes the issue #20503 seen on watchdog
[Coverity CID :205655]

Fixes #20503

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2019-11-18 09:18:13 -06:00
Francois Ramu
458a8a0a41 driver: pwm: Error handling issues in pwm_stm32_get_cycles_per_sec
This patch tests the return code when calling clock_control_get_rate
and completes the issue  #20503 seen on watchdog
[Coverity CID :205655]

Fixes #20503

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2019-11-18 09:18:13 -06:00
Francois Ramu
a0bd434fa5 driver: spi: Error handling issues in spi_stm32_configure
This patch tests the return code when calling clock_control_get_rate
and completes the issue  #20503 seen on watchdog
[Coverity CID :205655]

Fixes #20503

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2019-11-18 09:18:13 -06:00
Francois Ramu
fe28447cdf driver: i2c: Error handling issues in i2c_stm32_runtime_configure
This patch tests the return code when calling clock_control_get_rate
and completes the issue  #20503 seen on watchdog
[Coverity CID :205655]

Fixes #20503

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2019-11-18 09:18:13 -06:00
Francois Ramu
fc06346a77 driver: watchdog: Error handling issues in wdt_wwdg_stm32.c #20503
This patch tests the return code when calling clock_control_get_rate
[Coverity CID :205655]

Fixes #20503

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2019-11-18 09:18:13 -06:00
Joakim Andersson
ea7a1859af Bluetooth: GATT: Fix taking address of packed member of struct sc_data.
Fix GCC9 warning "warning: taking address of packed member of
'struct sc_data' may result in an unaligned pointer value"
Issue is that the on-air structure of sc_data was re-used for the gatt
service changed data.

Added build assert because data is stored in settings, so the structure
should be the same size to be compatible.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-11-18 13:54:15 +01:00
Peter Bigot
eb2c3307cc samples: sensor: lps22hb: remove trigger-related code
The driver for this sensor does not support asynchronous sampling.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-11-18 13:53:20 +01:00
Maureen Helm
3118c926c6 disk: sdhc: Remove logically dead code from spi sdhc driver
We already returned out of the function if err is nonzero, therefore it
is impossible to reach this return statement.

Coverity-CID: 205612

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-11-18 13:53:02 +01:00
Andrew Boie
e794da070a lib: os: uncrustify sem.c
Also fix a spelling error.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-11-18 13:52:15 +01:00
Andrew Fernandes
d52ba5102a arch/arm: Fix formatting in arch/arm/core/fatal esf_dump
arch/arm/core/fatal: fix formatting in esf_dump

Signed-off-by: Andrew Fernandes <andrew@fernandes.org>
2019-11-18 13:51:47 +01:00
Peter A. Bigot
6770d1c671 usb: dfu: correct upload implementation
The routine to read the image from the device and upload it to the
host stored data in a buffer unrelated to the one transferred to the
host, resulting in a corrupt image.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-11-18 13:50:43 +01:00
David B. Kinder
da963d94f9 samples: remove CONFIG_SERIAL from blinky
As noted in the issue #20666 discussion, though the console is not used
by this sample app, it can't really be "disabled" using this Kconfig
option, so remove the CONFIG_SERIAL=n line.

Fixes: #20666

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-11-18 13:49:42 +01:00
Stephane D'Alu
6ba1fcec3f Bluetooth: shell: Fix missing return statement for name command
Return once bt name has been displayed

Signed-off-by: Stephane D'Alu <sdalu@sdalu.com>
2019-11-17 21:03:24 +02:00
Stephanos Ioannidis
3cc5bda2fa cmake: Support renode 1.8.2.
Renode 1.8 introduced a behaviour change in which it automatically
launches the telnet monitor on the TCP port 1234 by default.

In order to prevent sanitycheck failures from multiple renode instances
attempting to listen on the TCP port 1234 simultaneously, this commit
disables renode telnet monitor by specifying '--port -2' (a negative
number lower than -1 is required to disable telnet monitor because of
the way renode command line parser is implemented).

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2019-11-15 17:37:17 -05:00
Wolfgang Puffitsch
138be8e3d8 tests: Add test for MetaIRQ preemption of cooperative thread
Test that meta-IRQ returns to the cooperative thread it interrupted,
and not to whichever thread is highest priority at that point.

Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
2019-11-15 17:10:36 -05:00
Anas Nashif
28af508552 mbedtls: make all options depend on MBEDTLS
MBEDTLS options were showing up when no mbedtls was used.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-11-15 17:00:13 -05:00
Flavio Ceolin
91fd6d0866 kernel: thread: Fix randomness problem with stack pointer random
In some platforms the size of size_t can be different of 4 bytes. Use
sys_rand_get to proper fill this variable.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-11-15 13:43:32 -08:00
Jan Tore Guggedal
8134001148 drivers: sensor: bme680: Use DBG log level for non-error
Use LOG_DBG instead of LOG_ERR when BME680 chip is detected
and its ID verified successfully.

Signed-off-by: Jan Tore Guggedal <jantore.guggedal@nordicsemi.no>
2019-11-15 16:00:46 -05:00
Maureen Helm
edfd6617c2 CODEOWNERS: Fix sensor samples
There were two conflicting entries for sensor samples, which resulted in
the wrong person getting assigned as a reviewer.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-11-15 15:59:11 -05:00
Flavio Ceolin
05cb5b3ef0 docs: guide: Add build system information
A detailed overview of Zephyr's build system. This is a
thorough view of the low level build process starting from CMake and
using Make as the build system tool. Things missing here that will be
further documented:

- west
- external modules/libraries

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-11-15 14:58:51 -05:00
David Leach
aa91113af7 kernel: Kconfig: Define dependencies for STACK_CANARIES
STACK_CANARIES relies on random value for the canarie so
ENTROPY_GENERATOR or TEST_RANDOM_GENERATOR needs to be
selected to get sys_rand32_get included in the build.

Fixes: #20587

Signed-off-by: David Leach <david.leach@nxp.com>
2019-11-15 10:13:15 -06:00
Johann Fischer
1c2e965569 usb: bluetooth: do not use ZLP for HCI event transfers
Linux btusb driver do not relies on ZLP to determine the
end of a transfer. Instead the data is transmitted
continuously and the driver obtains the length of a event
from the HCI Event Packet header.

Fixes: #20250

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-11-15 17:02:43 +01:00
Johann Fischer
0230b46ce5 usb: bluetooth: make HCI event endpoint size configurable
Make HCI event endpoint size configurable.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-11-15 17:02:43 +01:00
Vinayak Kariappa Chettimada
4a42e636e8 Bluetooth: controller: Fix Code PHY update support dependency
Fix the regression introduced as part of
commit 57d9411837 ("bluetooth: kconfig: disable some
options for openisa/RV32M1").

Also, prior to PR that introduced this regression, the Coded
PHY support selection was incorrectly depending on PHY update
support Kconfig BT_PHY_UPDATE. This was already fixed as part
the previous PR.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-11-15 16:01:31 +01:00
Martí Bolívar
d8f459ab2e scripts: west sign: use edtlib for flash configuration
This command needs access to DT configuration, but can no longer
access it through BuildConfiguration since
9da1d41a12.

Import edtlib and use that instead.

Fix up some other error handling and output issues while we're here to
make the script's behavior easier to inspect and debug.

Fixes: #20545
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2019-11-15 07:53:25 -06:00