Commit graph

41120 commits

Author SHA1 Message Date
Vinayak Kariappa Chettimada
505a83414e drivers: gpio: nrf5: Fix GPIOTE channel use overlap
Fixes issues caused in GPIO driver due to overlapping GPIOTE
channel use in nRF5 software PWM driver and in Bluetooth
controller for implementing PA/LNA feature.

The issue is solved by assigning the base and available
channel count for GPIOTE considering whether PWM and/or
PA/LNA feature is selected in the Kconfig.

Fixes #8815.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2018-07-10 11:25:32 +02:00
Krzysztof Chruscinski
e854dd0069 logging: log_output: Data lost because of uninitialized variable
Uninitialized variable error could lead to a situation where
printk calls processed by the logger were dropped.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-07-09 12:09:43 -04:00
Jukka Rissanen
5cac62387a logging: Avoid compile warning because of wrong type
The macro parameters need to be protected by (), otherwise it
is possible to get this kind of warning

   include/logging/log_core.h:214:6: note: expected
     ‘u32_t {aka unsigned int}’ but argument is of type ‘char *’
     void log_3(const char *str,

This can happen for example if the macro parameter is not plain
variable. Example:

  NET_DBG("Route %p nexthop %s", route,
         nexthop ? net_sprint_ipv6_addr(nexthop) : "<unknown>");

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-09 11:17:14 -04:00
Jukka Rissanen
f10cbe5ee9 logging: Print 7, 8 or 9 parameter macros properly
The log prints for 7, 8 and 9 parameters were not properly printed.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-09 11:16:49 -04:00
Jukka Rissanen
4aaeaaaf2e logging: Provide 8 and 9 parameter logging macros
It is quite reasonable to provide logging macros that can have
8 or 9 parameters.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-09 11:16:49 -04:00
Maureen Helm
3a988a5e22 CODEOWNERS: Update entry for sensor drivers
Adds @MaureenHelm as code owner for sensor drivers, and updates the
pattern to match subdirectories.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-07-09 11:16:11 -04:00
Ulf Magnusson
0aedf8d2c5 drivers: console: Kconfig: Remove redundant 'default n' properties
Bool symbols implicitly default to 'n'.

A 'default n' can make sense e.g. in a Kconfig.defconfig file, if you
want to override a 'default y' on the base definition of the symbol. It
isn't used like that on any of these symbols though.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-07-08 22:12:54 -04:00
Anas Nashif
6f29dac25a toolchain: require Zephyr SDK 0.9.3
SDK 0.9.3 has been out for a while, to avoid inconsistency and false
positive when filing bugs, require the latest version.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-07-08 15:39:35 -04:00
Anas Nashif
ae5105c08b boards: more boards with xtools support
Add first set of boards which can be built with xtools, this will
include all boards at some point, so we might need a better way to
whitelist toolchains that does not include changing every single board
definition file. For now enabling those needed for testing the new
toolchain.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-07-08 15:39:35 -04:00
Anas Nashif
0009df8212 toolchains: fix multilib libc linking with xtools
Fixed linking with multilib toolchains by adjust the path to sysroot.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-07-08 15:39:35 -04:00
Anas Nashif
458fe44692 toolchain: iamcu support with xtools toolchain
Support both x86 and iamcu variants of the toolchain.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-07-08 15:39:35 -04:00
Anas Nashif
7c15934b53 toolchains: add xtools support for ARC
Latest crosstools NG supports ARC, so add it here for those who build
their own toolchains using xtools-ng or use the scripts from sdk-ng repo
in the zephyr project.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-07-08 15:39:35 -04:00
Johan Hedberg
5c3d5660ef shell: Fix command completion logic
Similar fix as in commit b26ca13672. Just later in the same
function. This is how the logic used to be before quite heavy redesign
that happened a while ago.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-07-08 08:04:10 -04:00
Jukka Rissanen
2dc28b495e doc: net: gptp: Enhance gPTP documentation
Add TSN (Time Sensitive Networking) description to networking
overview document. Also make sure that gPTP documents are linked
together properly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-06 19:19:26 -04:00
Jukka Rissanen
0068151280 samples: net: gptp: Documentation fixes
Clarify the gPTP sample application documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-06 19:19:26 -04:00
Jukka Rissanen
c7bb8c21ac doc: net: gptp: Fix gptp API function description
The user API function descriptions were pointing to wrong
function documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-06 19:19:26 -04:00
Krzysztof Chruscinski
5ea5b8d35f doc: subsys: logging: Add documentation for new logger
Documentation for new logger subsystem.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-07-06 19:18:19 -04:00
Jukka Rissanen
489b27a22b doc: net: Fix source tree layout documentation
The subsys/net/l2 directory was recently introduced so add it to
the documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-06 19:17:35 -04:00
Christian Tavares
7bc396465f lib: json: add helper macro for array of array
The new JSON_OBJ_DESCR_ARRAY_ARRAY allows use of an array of
array. The macro is based on the comments and directions provided by
Leandro Pereira <leandro.pereira@intel.com> (in #8567).

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Christian Tavares <christian.tavares@ossystems.com.br>
2018-07-06 19:17:07 -04:00
Diego Sueiro
618209af0a board: add i2c support for colibri_imx7d_m4 board
Adds definitions, configurations and device tree entries for
colibri_imx7d_m4 board.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-07-06 15:55:57 -05:00
Diego Sueiro
970c4f9cf3 arch: Add imx7d_m4 i2c definitions
Adds all necessary i2c definitions and configurations for imx7d_m4 soc.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-07-06 15:55:57 -05:00
Diego Sueiro
8c2acab53a drivers: add i.MX I2C driver shim
Adds a shim layer around the imx i2c driver to adapt it to the Zephyr
i2c master interface.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-07-06 15:55:57 -05:00
Johann Fischer
25b0212fc3 subsys: usb: class: add loopback function
Add loopback function. This function can be used to test
USB device drivers and device stack connected to linux host
and has the similar interface as "Gadget Zero" [1] of the Linux
kernel.

Use modprobe usbtest to load the module, see also [2] for the
description of the tests and for Vendor and Product ID of the
"Gadget Zero". The userspace tool testusb [3] is needed to start
the tests.

[1] linux/drivers/usb/gadget/function/f_loopback.c
[2] linux/drivers/usb/misc/usbtest.c
[3] linux/tools/usb/testusb.c

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2018-07-06 11:56:16 -05:00
Johann Fischer
3a471e3240 subsys: usb: stall if there is no data buffer
Return a STALL in the setup or data stage if there is no data buffer.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2018-07-06 11:56:16 -05:00
Johann Fischer
1b5775249d usb: add callback codes for Set/Clear Feature ENDPOINT_HALT
Add callback codes for Set/Clear Feature ENDPOINT_HALT.
These can be used to inform a function that the device stack has
received Set/Clear Feature request ENDPOINT_HALT. The function can
then abort or restart the transfer accordingly.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2018-07-06 11:56:16 -05:00
Yong Jin
cc5ae49133 boards: arm: stm32: basic support for STM32F769I-DISCO board
This patch adds basic support and for the STM32F769I-DISCO board
with GPIO, USART support. Two USARTs are enabled.The GPIOs are
configured for the 4 LEDs and one button on the board.

Signed-off-by: Yong Jin <jinyong.iot@foxmail.com>
2018-07-06 09:56:25 -05:00
Yong Jin
8776835bd6 arch: arm: stm32: add basic support for STM32F769 SoC
The STM32F769 has more interrupts and features than the STM32F746,
but the basic support is similar with STM32F746

Signed-off-by: Yong Jin <jinyong.iot@foxmail.com>
2018-07-06 09:56:25 -05:00
Istvan Bisz
5aaf827a3e arch: arm: stm32f2: remove core zephyr header inclusions from soc.h
The stm32f2 version of soc.h misses the changes done in commit
aee97be ("arch: arm: soc: remove core zephyr header inclusions
from soc.h").

Signed-off-by: Istvan Bisz <istvan.bisz@t-online.hu>
2018-07-06 09:47:18 -05:00
Yannis Damigos
1af5ce40cd dts/arm/st: Fix SPI1 clock property on F0 series
SPI1 is on APB2 on F0 series.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-07-06 09:46:57 -05:00
Yannis Damigos
ebc5e51ef6 dts/arm/st: Fix I2C3 clock property on L0 series
Set the correct bit to enable I2C3 clock on L0
series.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-07-06 09:46:57 -05:00
Yannis Damigos
ce983e77c8 dts/arm/st: Fix I2C1 clock property
Set the correct bit to enable I2C1 clock.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-07-06 09:46:57 -05:00
Yannis Damigos
4e26f9c3a6 arch: stm32f0/f1/f3/l0: remove core zephyr header inclusions
Apply the changes done in commit aee97be to F0, F1, F3, L0 series.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-07-06 09:46:09 -05:00
Armando Visconti
9a8932024a ext: stm32cube: stm32f7xx: shift I2SR field in PLLI2SCFGR register
The I2SR field should be shifted by RCC_PLLI2SCFGR_PLLI2SR_Pos when the
PLLI2SCFGR register is read or written. Without this patch the PLLI2S
configuration is not done properly (R and M params are badly set) and
the PLLI2S generates bad clock waveform.

ST Bug tracker ID: 50108

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2018-07-06 09:44:59 -05:00
Armando Visconti
71ba2de75c ext: stm32cube: stm32f4xx: shift I2SR field in PLLI2SCFGR register
The I2SR field should be shifted by RCC_PLLI2SCFGR_PLLI2SR_Pos when the
PLLI2SCFGR register is read or written. Without this patch the PLLI2S
configuration is not done properly (R and M params are badly set) and
the PLLI2S generates bad clock waveform.

ST Bug tracker ID: 50086

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2018-07-06 09:44:59 -05:00
Jukka Rissanen
f5ec56747e tests: net: trickle: Initialize test variables earlier
The cb_[1|2]_called variables were initialized just before running
the test. This was too late as in some cases the Trickle timer
was triggered before the variables were init, which then caused the
test to fail even though there was no actual timer failure.

This was seen with frdm_k64f and when CONFIG_BOOT_DELAY=1000 was set.

Fixes #8658

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-06 13:07:06 +03:00
Piotr Zięcik
40f7a024ce ext: debug: segger: Fix CONFIG_SEGGER_RTT_MODE generation.
The value of CONFIG_SEGGER_RTT_MODE was incorrectly generated
as last default entry overwritten the previous ones. This commit
fixes this problem and ensures that correct value is selected.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2018-07-06 10:08:07 +02:00
Kumar Gala
db1075e4e5 dts: Fix warning related to arm,v{6,7,8}m-nvic yaml files
The nvic yaml files were missing an id property.  So we'd get a warning
like:

extract_dts_includes.py: 'id' property missing in 'ARMv7-M NVIC Interrupt Controller' binding. Using '<unknown id>

Add the id to fix this warning.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-07-05 15:24:31 -05:00
Ioannis Glaropoulos
54fbcc08a9 arch: arm: mpu: get REGION_SIZE_<X> defines directly from ARM CMSIS
This commit re-defines the REGION_SIZE_<x> macros, present in
include/arch/arm/cortex_m/mpu/arm_mpu_v7m.h, with the help of
the existing ARM MPU regions size definitions in ARM CMSIS.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-07-05 15:23:37 -05:00
Krzysztof Chruscinski
3808ca8e6e syscall: Add support for syscall_ret64_arg2
Add support for syscall returning 64 bit value with 2 arguments.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-07-05 12:56:16 -07:00
Maureen Helm
41dd6622ce arm: Print NXP MPU error information in BusFault dump
The NXP MPU triggers a bus fault when a memory access error occurs. Add
support in the bus fault handler to dump error details from the NXP MPU,
including the port number, mode (supervisor or user), address, bus
master number, and regions.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-07-05 13:42:40 -05:00
Kumar Gala
889b290a98 arch: arm: beetle: Pull in CMSDK header for CMSIS support on Beetle
Pulled CMSDK_BEETLE.h from mbed-os as a starting point to enable CMSIS
support on Beetle.  Trimed the file down that what we need on Zephyr
(dropped Device Specific Peripheral Section and system_CMSDK_BEETLE.h).

This lets us drop soc_mpu.h which duplicates MPU info that is defined in
CMSIS headers.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-07-05 13:40:27 -05:00
Alberto Escolar Piedras
0a5de7df71 native_posix: override C standard version to 2011
Override the C standard used for compilation to C 2011
This is due to some tests using _Static_assert which is a 2011
feature, but otherwise relying on compilers supporting it also
when set to C99.
This was in general ok, but with some host compilers and C
library versions it led to problems. So we override it to 2011
for native_posix board.

Fixes: #8529

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-07-05 12:55:07 -04:00
Alberto Escolar Piedras
c2882410ed cmake: Allow C standard version to be overriden
Allow archs/boards/apps to override the C standard version.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-07-05 12:55:07 -04:00
Ajay Kishore
0de49e5d40 tests: kernel: Add description for test case
Add description to test case in tests/kernel/fatal

Signed-off-by: Ajay Kishore <ajay.kishore@intel.com>
2018-07-05 12:52:21 -04:00
Erwan Gouriou
ff0c5a2afd boards: nucleo_f429zi: state compatibility with Arduino connectors
Set HAS_ARDUINO_XXX flag to state boards is compatible with this
connector. It will enable use of shields that requires these flags.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-07-05 11:28:53 -05:00
Erwan Gouriou
10fc37d78e boards/shields: Add connector flags for compatibility checks
In order to provide a way to control boards/shields compatibility,
provide connector flags.
One should select this flag in Kconfig.board to state connector
compatibility for the board.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-07-05 11:28:53 -05:00
Erwan Gouriou
2a490fd030 boards: Set nucleo_f429zi compatible with configuration guidelines
According to Default Configuration Guidelines, update nucleo_f429zi
- Add SPI_1, pinmux compatible with arduino spi
- Change PWM from PA0 to PE13 (Arduino D3)
- Disable I2C by default
- Update board dts with arduino connectors
- update board yaml file
- update board documentation

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-07-05 11:28:53 -05:00
Erwan Gouriou
deb0941cd5 scripts/extract/globals: treat node alternate names as 'aliases'
Treat new generated dtc element 'alt-name' as usual aliases.
Aim is not to duplicate generation of node elements but provide
pointers using generic alternate names.
For instance, defining following overriding node:
arduino_i2c : i2c1 {};
Will generate following definition:
#define ARDUINO_I2C_LABEL	ST_STM32_I2C_V1_40005400_LABEL

Then 'ARDUINO_I2C_LABEL' could be use a generic binding.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-07-05 11:28:53 -05:00
Erwan Gouriou
fa5d6ec363 scripts: devicetree.py: get alternate labels from dt
Allow use of new element of dtc grammar called overriding nodes:
i2cexp: &i2c2  {};

It allows a node to assign an alternate label to a node that
could be generic and used for adapter boards.
This commit is a derivative of a dtc commit from dtc v1.4.2 [1]

[1] https://bit.ly/2GFLLOa

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-07-05 11:28:53 -05:00
qianfan Zhao
7e2f6ebc7b stm32f2: add stm32f207xe soc
Used and tested(blinky, hello_world) on out of tree custom board.

Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
2018-07-05 11:26:07 -05:00