Commit graph

41120 commits

Author SHA1 Message Date
Steven Wang
2b2fa660b0 [Code coverage]: Fix the issue of function code coverage in device.c.
It was reported in the code coverage report that Z_SYSCALL_HANDLER() was
not called by other code, if we run "sanitycheck -p qemu_x86 --coverage
-T tests/kernel/device/".

The root cause is that we include "errno.h", which includes
"include/generated/syscalls/device.h". It causes that the
declare of device_get_binding() in "include/generated/syscalls/device.h"
is marked as "has been called", rather than Z_SYSCALL_HANDLER()
in device.c.

So I remove "#include <errno.h>", which is useless in device.c. Also,
"#include <sys/util.h>" is removed for the same reason.

Signed-off-by: Steven Wang <steven.l.wang@linux.intel.com>
2019-09-17 12:35:30 +08:00
Torstein Grindvik
d888e012ed subsys/testsuite: make tc_util overridable
A Kconfig boolean is added to allow users to provide their own
output strings when running tests via ztest.
This allows changing e.g. the PASS/FAIL/SKIPPED strings,
add counters, change separators, and similar.

A test using the feature and relevant documentation is added.

Signed-off-by: Torstein Grindvik <torstein.grindvik@nordicsemi.no>
2019-09-17 07:11:33 +08:00
Jan Van Winkel
c983c85d8f tests: gui: Added tests for LVGL glue logic
Added test for LVGL library glue logic

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-09-16 16:08:36 -05:00
Kumar Gala
d005f772ed doc: release notes: Add note on kconfig function deprecation
Add some info on the deprecation of the kconfigfunctions.py that have
been deprecated.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-16 16:06:06 -05:00
Anas Nashif
9b30cf70e1 doc: tracing: link kconfig options using :option:
Add a reference to Kconfig option documentation.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-17 04:44:42 +08:00
Anas Nashif
7d82e1765b doc: c library: document which c functions are implemented.
Add supported C library functions in the minimal libc

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-17 04:44:42 +08:00
Anas Nashif
d53c87a3ca doc: tracing: include API docs into documentation
Group tracing documentation in header file and include them into
documentation.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-17 04:44:42 +08:00
Anas Nashif
c1229f0ade doc: tracing: move ctf docs into index
Move CTF section into main tracing document.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-17 04:44:42 +08:00
Anas Nashif
6543e6a1e5 doc: tracing: add figure for tracing with systemview
Add figure and example project configuration for systemview.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-17 04:44:42 +08:00
Henrik Brix Andersen
5d4607554e drivers: can: flexcan: limit number of concurrent rx filters on k6x soc
Limit the number of concurrent FlexCAN RX filters in Kconfig on the
NXP Kinetis K6x SoC.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-09-16 15:36:37 -05:00
Jan Van Winkel
7a70fa8488 usb: tests: Pass correct lengths to hexdump in usb bos test
Pass correct length to hexdump in usb bos test to prevent overun
of global data.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-09-16 15:33:10 -05:00
Markus Fuchs
f08caaf677 drivers: ethernet: stm32: Add carrier state detection
This patch adds carrier state detection to the STM32 Ethernet driver.

Fixes #16097

Signed-off-by: Markus Fuchs <markus.fuchs@de.sauter-bc.com>
2019-09-16 15:27:11 -05:00
Bruno TISSERAND
1911a7599c boards: Add support of arduino connector on nucleo_wb55rg board
Add the support of the Arduino connector on nucleo_wb55rg board

Signed-off-by: Bruno TISSERAND <bruno.tisserand@st.com>
2019-09-16 15:13:33 -05:00
Trond Einar Snekvik
b7d05fbf13 Bluetooth: Mesh: Add model reset callback
Adds additional model callback that gets called on node_reset. Will also
erase any user data when this happens.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2019-09-16 22:56:22 +03:00
Trond Einar Snekvik
91ca7ca763 Bluetooth: Mesh: Add persistent model user data
Adds user data file in the model settings, allowing each model instance
to store some application specific data without having to reinvent the
settings path encoding for model element/ID combinations. Exposes the
settings_handler interface in the model callback structure and adds a
data store function.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2019-09-16 22:56:22 +03:00
Trond Einar Snekvik
c2c05c916a Bluetooth: Mesh: Add model callback structure
Adds a structure of callbacks for each model instance. This allows for
more flexible model implementations, that can interact with the Mesh
stack without going through the application.

For now, only an init callback is added, replacing the init mechanism in
the foundation models. The init callback does not provide the primary
flag that used to be in the foundation model callbacks, but replaces
this with an inline function in access.h.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2019-09-16 22:56:22 +03:00
Loic Poulain
9608a8e64e soc: nxp:rt: Add DATA_OCRAM config
Enable config for On-Chip RAM data.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-09-16 14:55:20 -05:00
Loic Poulain
f78f7076aa soc: nxp: rt: Add custom memory areas to linker script
RT SOCs have several memory areas (OCRAMs, DTCM, ITCM, SDRAM, FLASH...)
but only two are selected for FLASH (code) and RAM (data).
It would be good to let the linker be aware about other regions, which
could then be used by drivers or application to create dedicated
sections and relocate memory. For example if we have code in ITCM and
data in DTCM, we still need a dma-able region/section for e.g.
video/camera buffers.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-09-16 14:55:20 -05:00
Christian Taedcke
1c91a385b1 boards/arm: Add arduino_header support to nucleo f429zi
Add arduino_header support to nucleo f429zi board.
Create a dedicated connector file to hold arduino connector
information for nucleo_f429zi board.
Add missing arduino_spi feature to yaml file.

Signed-off-by: Christian Taedcke <hacking@taedcke.com>
2019-09-16 14:47:29 -05:00
Vinayak Kariappa Chettimada
28f46131b3 Bluetooth: controller: split: Fix Rx reserved for conn cmplt
When both central and peripheral are supported, one each Rx
node will be needed by connectable advertising and the
initiator to generate connection complete, hence
conditionally set the count.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-09-16 21:46:35 +02:00
Jukka Rissanen
c755be0ee7 net: socket: The socket flags need to use uintptr_t
The socket flags are stored in void* so we need to use uintptr_t
instead of u32_t when manipulating the flag variable.

Fixes #19181

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-09-16 14:41:18 -05:00
Erwin Rol
e6ffb3fdc4 spinlock: Make sure C and C++ have the same sizeof(k_spinlock) value
If CONFIG_SMP and SPIN_VALIDATE are both not defined the k_spinlock
struct will have no members. The result is that in C the sizeof
value of struct k_spinlock is 0 and in C++ it is 1.

This size difference causes problems when the k_spinlock
is embedded into another struct like k_msgq, because C and
C++ will have different ideas on the offsets of the members
that come after the k_spinlock member.

To prevent this we add a 1 byte dummy member to k_spinlock
when the user selects C++ support and k_spinlock would
otherwise be empty.

Signed-off-by: Erwin Rol <erwin@erwinrol.com>
2019-09-16 14:34:24 -05:00
Armando Visconti
871d132577 driver/sensor: add IIS3DHHC accelerometer sensor
Add support to STM IIS3DHHC the ultra-low noise, high-stability
three-axis linear accelerometer.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-09-16 14:07:56 -05:00
Ulf Magnusson
b4094ea6c1 shell: kconfig: Fix wrong UART_SHELL_ON_DEV_NAME value due to typo
The $(dt_chosen_label) preprocessor function should be passed
$(DT_CHOSEN_Z_SHELL_UART), not $(UART_SHELL_ON_DEV_NAME).

DT_CHOSEN_Z_SHELL_UART is set right before the Kconfig symbol
definition, to work around the comma in 'zephyr,shell-uart'.

The Kconfig preprocessor functions are defined in
scripts/kconfig/kconfigfunctions.py.

Fixes: #19178

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-16 20:10:09 +03:00
Vinayak Kariappa Chettimada
78b461ae3e Bluetooth: controller: Refactor use of SWI
Refactor to abstract the use of software interrupts in nRF5
Series.

Also, reduce the number of SWI used when interrupt priority
level configured is same for ULL High and ULL Low contexts.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-09-16 19:06:51 +02:00
Ioannis Glaropoulos
ee85f248fc bluetooth: controller: abstract PPI handling for LE Coded
This commit completes the refactoring of radio.c, so it
calls abstract functions for PPI handling for LE Coded
PHY (e.g. enable, disable channels, or configure endpoints),
which, then, call the platform-specific functions for PPI
handling. The abstract functions are simple wrappers,
implemented in radio_nrf5_ppi.h, conditionally, if we
build the controller with support for LE Coded PHY.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-16 19:06:51 +02:00
Ioannis Glaropoulos
f754ee4aa8 bluetooth: controller: conditionally define macros for LE Coded PHY
Make the definitions of LE Coded PHY-specific macros
and inline functions conditional, i.e. only if we
actually build the controller with support for LE
Coded PHY.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-16 19:06:51 +02:00
Ioannis Glaropoulos
dc3e9b1755 bluetooth: controller: abstract PPI handling functions
This commit refactors radio.c, so it calls abstract functions
for PPI handling (e.g. enable, disable channels, or configure
endpoints), which, then, call the platform-specific functions
for PPI handling. The abstract functions are simple wrappers,
implemented in radio_nrf5_ppi.h.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-16 19:06:51 +02:00
Ioannis Glaropoulos
d72d4f356d bluetooth: controller: define generic macros for LLL, ULL LOW IRQs
This commit defines generic macros for the software interrupt
(SWI) IRQ lines that are used for LLL and ULL LOW interrupts.
This is done for both the cases of the legacy and new (split)
controller architectures. In addition, it abstracts some of
the functionality around software-IRQ signals, to generic
functions, which have platform-specific implementations.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-16 19:06:51 +02:00
Daniel Leung
36a780c5bb west.yml: update hal_microchip to latest revision
This adds HAL headers for peripheral devices on MEC1501.

Fixes #18539
Fixes #18540

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-09-16 09:05:46 -05:00
Trond Einar Snekvik
532241d5ad Bluetooth: Mesh: Encrypt friend packets on send
Stores friend queue packets unencrypted, removing any out-of-order
issues caused by seqnum allocation. Also moves as much of the metadata
storage as possible into the packet, allowing us to free up some bytes
of net_buf user data for friend packets.

Fixes #18488

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2019-09-16 14:00:57 +03:00
Trond Einar Snekvik
9e85c33239 Bluetooth: Mesh: Expose SeqZero mask
Makes a define for the seqzero 13-bit mask in transport, and exposes it
in the header for use in the friend module.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2019-09-16 14:00:57 +03:00
Erwan Gouriou
c9dcf37e6c Revert "gpio: stm32: support disabling and reenabling interrupts on pin"
This reverts commit 0951ce2d34.

This change introduces regression on GPIO interrupts handling
when several GPIOs are configured.

Fixes #19177

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-09-16 05:44:15 -05:00
Peter A. Bigot
372a4fe5be kconfig: support multiple DTS bindings directories
Some confluence of recent changes resulted in builds with
application-specific bindings being unable to find bindings present in
the system directory.  Add quotes and splits as necessary to propagate
multiple directories through the system.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-09-16 05:29:27 -05:00
Paul Sokolovsky
5e2ec2244b manifest: mbedtls: Update to pick latest config-tls-generic.h
Following recent config patches were merged:
* https://github.com/zephyrproject-rtos/mbedtls/pull/1
config: Allow to enable OpenThread optimizations for mbedTLS
* https://github.com/zephyrproject-rtos/mbedtls/pull/3
configs: config-tls-generic.h: Add CONFIG_MBEDTLS_ECDSA_DETERMINISTIC

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-09-16 11:55:32 +02:00
Anas Nashif
7d27cf9f27 doc: link-roles: convert bytes to string
Get the correct branch name as a string instead of bytes.

Fixes #19165

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-15 18:44:45 -04:00
Charles E. Youse
f914669075 tests/posix/common: restructure to eliminate casts
Restructure code to reduce the number of obnoxious casts.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-15 11:33:47 +08:00
Charles E. Youse
dc0314af7f arch/x86: honor CONFIG_INIT_STACKS in 64-bit mode
Initialize the IRQ stacks with 0xAA bytes when the option is enabled.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-15 11:33:47 +08:00
Charles E. Youse
a926fa0a82 arch/x86: clean up inline assembly format
Not sure why these were formatted the way they were, but I've removed
unnecessary line breaks, embedded control characters (actual embedded
tabs, not escape sequences) and escape sequences.

No functional change.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-15 11:33:47 +08:00
Charles E. Youse
d506489999 arch/x86: optimize nested IRQ entry/exit
We don't need to save the ABI caller-save registers here, because
we don't preempt threads from nested IRQ contexts.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-15 11:33:47 +08:00
Charles E. Youse
097c30c863 tests/subsys/logging/log_core: increase log buffer size
The test needs to cram at least 8 messages into the log buffer, but
with 64-bit pointers only 5 fit, so make the buffer a bit bigger.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-15 11:33:47 +08:00
Charles E. Youse
468cd4d98f arch/x86: add support for CONFIG_STACK_SENTINEL
Apparently I missed the arch-dependent bit of this. Fixed.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-15 11:33:47 +08:00
Charles E. Youse
a5eea17dda arch/x86: add SSE floating-point to Intel64 subarch
This is a naive implementation which does "eager" context switching
for floating-point context, which, of course, introduces performance
concerns. Other approaches have security concerns, SMP implications,
and impact the x86 arch and Zephyr project as a whole. Discussion is
needed, so punting with the straightforward solution for now.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-15 11:33:47 +08:00
Charles E. Youse
2e788040d8 tests/posix/common: make 64-bit clean
Use the INT_TO_POINTER() and companion macros to silence compiler
warnings about casting between pointers and ints of different sizes.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-15 11:33:47 +08:00
Charles E. Youse
0f98cdd457 arch/x86: tests/cmsis: disable some CMSIS tests in 64-bit mode
The CMSIS layer doesn't like large stacks, and x86 in long mode
requires large stacks, so we disable these tests for now (as was
previously done on the x86_64 port for the same reasons).

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-15 11:33:47 +08:00
Charles E. Youse
65b1f62ee3 arch/x86: disable inapplicable tests for Intel64
In long mode, x86 does not support static IDTs or OpenOCD,
so disable the tests related to these features.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-15 11:33:47 +08:00
Charles E. Youse
c08d01211a arch/x86: add Z_ARCH_THREAD_STACK_LEN() macro
Implement standard Z_ARCH_THREAD_STACK_LEN() arch interface macro.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-15 11:33:47 +08:00
Charles E. Youse
b8cadce677 arch/x86: refactor bitfield-manipulation functions
These inline-assembly functions are identical between IA32 and
Intel64 arches, so move them to the common arch.h file.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-15 11:33:47 +08:00
Charles E. Youse
91896dde5e arch/x86: select CONFIG_64BIT when CONFIG_X86_LONGMODE
We need a 64-bit clean kernel when in long mode.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-15 11:33:47 +08:00
Charles E. Youse
640c5a5e95 boards/x86: add Intel64 (64-bit long-mode) QEMU target board
Add qemu_x86_long board (with CONFIG_X86_LONGMODE=y) for testing.

This requires adding support to soc/ia32 for long mode (trivial),
and adding a quick 64- to 32-bit ELF conversion before invoking
QEMU, which apparently doesn't like 64-bit kernel files.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-15 11:33:47 +08:00