Commit graph

41120 commits

Author SHA1 Message Date
Markus Fuchs
8c69941642 drivers: ethernet: stm32: Add MAC address configuration support
This patch adds support for configuring the MAC address through the
Network Management API to the STM32 Ethernet driver.

Signed-off-by: Markus Fuchs <markus.fuchs@de.sauter-bc.com>
2019-09-19 20:46:56 -04:00
Daniel Leung
e17cc8b4cd boards: mec15xxevb_assy6853: enable PWM in DTS
This enables the PWM blocks in DTS. Only PWM0 has been enabled
and tested due to board/jumper configurations.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-09-19 20:45:37 -04:00
Daniel Leung
2c3d287794 boards/mec1501: Configure pinmux relevantly for PWM
Each and every instance has a specific pin.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-09-19 20:45:37 -04:00
Daniel Leung
1ee9e1046a drivers/pwm: Add support for Microchip's XEC PWM devices
A 16bits on/off based PWM, found on MEC1501.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-09-19 20:45:37 -04:00
Tomasz Bursztyka
bea2714cae dts/arm: Add the 9 MEC1501 PWM instances.
All disabled by default.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-09-19 20:45:37 -04:00
Tomasz Bursztyka
6a56b868a5 dts/bindings: Adding Microchip's XEC PWM
Found on MEC1501.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-09-19 20:45:37 -04:00
Vincent Wan
79d626f5c7 CODEOWNERS: Add entry for CC13x2/CC26x2 RTC timer driver
Adding @vanti as an owner.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-09-19 13:43:10 -05:00
Vincent Wan
669c66b551 tests: arm: fix arm_irq_vector_table to plug rtc_isr for CC13x2/CC26x2
Given the RTC is used for system clock, we need to plug its interrupt
to avoid an exception that would occur if it is left unhandled.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-09-19 13:43:10 -05:00
Vincent Wan
2930d000ff tests/kernel/sleep: relax upper bound for TI CC13X2/CC26X2 RTC
The RTC on TI CC13X2/CC26X2 is a 32 KHz clock for which the minimum
compare delay is 3 ticks. When using it as the system clock, we need
to relax the upper bound to ensure the test succeeds.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-09-19 13:43:10 -05:00
Vincent Wan
aeb8d017b5 drivers: timer: add RTC support as system clock for CC13X2/CC26X2
Add RTC timer driver for CC13X2/CC26X2, and use it instead of systick
as system clock. It is necessary to use this timer for power
management support, so that the system can exit from deep sleep upon
expiry of timeouts.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-09-19 13:43:10 -05:00
Andrei Emeltchenko
cf7555a841 boards: mec15xxevb_assy6853: Correct jumper settings
Correct jumper settings.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-09-19 14:40:35 -04:00
Luiz Augusto von Dentz
4f3892c0eb Bluetooth: GATT: Use check_perm to check CCC permission
This moves check_perm code under GAT and make use of it to check if CCC
write permission can be attended by the connection security level or if
it needs to be increased.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-09-19 21:12:39 +03:00
Luiz Augusto von Dentz
03b9ce487c Bluetooth: GATT: Add support to setting permission on CCCD
This adds support to set different permissions to CCCD so security can
be checked when enabling notification which conforms to:

BLUETOOTH CORE SPECIFICATION Version 5.1 | Vol 3, Part G page 2360:

  '3.3.3.3 Client Characteristic Configuration

   Authentication and authorization may be required by the server to
   write the configuration descriptor.'

In addition to that also ensure that notification are not re-enabled
until the proper security level is reached to conform to the following
statement:

  '10.3.1.1 Handling of GATT indications and notifications

   A client “requests” a server to send indications and notifications
   by appropriately configuring the server via a Client Characteristic
   Configuration Descriptor. Since the configuration is persistent
   across a disconnection and reconnection, security requirements must
   be checked against the configuration upon a reconnection before
   sending indications or notifications. When a server reconnects to a
   client to send an indication or notification for which security is
   required, the server shall initiate or request encryption with the
   client prior to sending an indication or notification. If the client
   does not have an LTK indicating that the client has lost the bond,
   enabling encryption will fail.'

Fixes #17983

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-09-19 21:12:39 +03:00
Takumi Ando
3759aa5aa2 tests: degu_evk: add adc test
Add degu_evk to ADC test

Signed-off-by: Takumi Ando <takumi.ando@atmark-techno.com>
2019-09-19 12:06:56 -05:00
Takumi Ando
cb7f9a0f3a boards: arm: add Degu Evaluation Kit
Added config for https://open-degu.com/en/

Signed-off-by: Takumi Ando <takumi.ando@atmark-techno.com>
2019-09-19 12:06:56 -05:00
Erwin Rol
a720d38f29 samples: olimex_stm32_e407: fix coverity warning
Fix a Coverity warning when using %d to print the result
of a sizeof(...)

Since the result of the sizeof() use in the example
will always fit in a int, simply cast the result
to a int so the %d is always correct.

Fixes: #18373

Signed-off-by: Erwin Rol <erwin@erwinrol.com>
2019-09-19 11:07:57 -05:00
Peter Bigot
d566254e3f drivers: fix k_thread_create timeout argument
Use the named representation for no-wait to future-proof against a
change to the representation of timeout values.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-09-19 17:35:53 +02:00
Markus Fuchs
c53755e5dd doc/reference/storage/sdhc: Document SDSC support
Add note about standard-capacity SD card support.

Signed-off-by: Markus Fuchs <markus.fuchs@de.sauter-bc.com>
2019-09-19 09:49:07 -05:00
Markus Fuchs
e52cff81a9 disk: sdhc: Add support for standard-capacity SD cards
This patch adds support for SDSCv1 and SDSCv2 cards. It has been tested
with 2 GiB SDSC and 4 GiB to 32 GiB SDHC cards from SanDisk.

Signed-off-by: Markus Fuchs <markus.fuchs@de.sauter-bc.com>
2019-09-19 09:49:07 -05:00
Markus Fuchs
ff37217117 disk: sdhc: Remove logging variable when not needed
Remove logging helper variable `trace_dir` from device configuration
data when it is not needed.

Signed-off-by: Markus Fuchs <markus.fuchs@de.sauter-bc.com>
2019-09-19 09:49:07 -05:00
Armando Visconti
af0e2c5df9 sample/board: add SensorTile.box sample for testing
Add sample to test SensorTile.box board.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-09-19 09:47:45 -05:00
Armando Visconti
7506188ea0 boards: arm: Add support for SensorTile.box board
The SensorTile.box is a board designed for IoT applications
embedding a wide range of intelligent low power MEMS sensors,
a STM32L4 microcontroller to manage sensor configuration and
process sensor output data, a micro-USB battery charging
interface and an ST Bluetooth Low Energy module for wireless
communication with a BLE-enabled smartphone.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-09-19 09:47:45 -05:00
Armando Visconti
3f72c4262c drivers: pinmux: stm32l4x: Add missing SPI macros
This commit adds:

 1. pin definitions for SPI1 on PE12-15 on STM32L4 devices
 2. SPI3 on PA15_SPI3_NSS

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-09-19 09:47:45 -05:00
Armando Visconti
79c24e3e5e soc: arm: st: add stm32l4r9xx support
Add support for ST stm32l4r9xx System-on-Chip.

See http://www.st.com/en/microcontrollers/stm32l4r9-s9.html
for more details.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-09-19 09:47:45 -05:00
Armando Visconti
c79925bd0f driver/sensor: IIS3DHHC: Fix DT_ macro typo for CS GPIO
The correct suffix name for selecting the GPIO for SPI Chip Select
is _CS_GPIOS_CONTROLLER and not _CS_GPIO_CONTROLLER.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-09-19 09:47:45 -05:00
Peter Bigot
dfd26dbbeb libc/minimal/assert: conditionalize static_assert macro
static_assert was not added to C until C11.  Zephyr builds default to
C99.  To preserve compatibility with newlib avoid defining the
macro at standard levels where it did not exist.

Relates to #17738 and #11754.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-09-19 09:37:42 -05:00
Jan Van Winkel
fbcbe0f11b tests: cmsis_v2: Put/Get msg in queue instead of u32_t
Send and receive messages from message queue instead of using u32_t
stack variables to prevent stack overrun.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-09-19 09:33:03 -05:00
Christoph Reiter
41f54f39c9 samples: fix signed overflow in blinky example
Overflow for int is undefined in C, change to u32_t where it is defined.

Signed-off-by: Christoph Reiter <christoph.reiter@infineon.com>
2019-09-19 09:31:41 -05:00
Sebastian Bøe
c05a931bce cmake: Explicitly set the entry point when testing toolchain flags
We are observing warnings when test-compiling toolchain flags that
look like:

cannot find entry symbol _start; defaulting to 00000000000010d4

To fix this warning we explicitly set an entry point to an arbitrary
address. The files are only compiled, not run, so the entry point does
not need to be correct.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-09-19 09:29:57 -05:00
David B. Kinder
c4f730fcf5 doc: update release notes index to use globbing
Use globbing to find release notes and display them in the expected
reverse-sorted order (newest release first).  Some trickery is needed
because were not using two-digit version/subversion numbers so the list
won't sort naturally. This will eliminate the need to edit the index
page on every release, until we get to subversion 10.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-19 09:27:20 -05:00
Jan Van Winkel
ff36fc7d67 linker: cxx: Include .gcc_except_table sections
Include .gcc_except_table (sub-)sections in linker files to support C++
with exceptions enabled. If these sections are not mapped warnings will
be generated for orphaned sections at link time.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-09-19 09:26:42 -05:00
Jan Van Winkel
70fb574a6e linker: cxx: xtensa: Added .gcc_except_table.*
Make sure that all sub-sections of .gcc_except_table are mapped in
rodata else C++ builds with exceptions enabled will generate warnings
due to orphan sections.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-09-19 09:26:42 -05:00
Jan Van Winkel
75677c6dac tests: cxx: Enable exceptions
Added test run with exceptions enabled.

Boards colibri_imx7d_m4, warp7_m4 and pico_pi_m4 have been excluded
from test run as they do not have sufficient ROM.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-09-19 09:26:42 -05:00
Kumar Gala
25066e7875 compiler: clang: Add setting of ARM related flags
Mimic what we have in cmake/compiler/gcc/target.cmake for clang
targetting ARM.  Match gcc behavior by setting -fshort-enums

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-19 08:55:01 -05:00
Kumar Gala
e5c03925e5 cmake: compiler: introduce target_arm.cmake
Pull ARM flags into cmake/compiler/gcc/target.cmake to be reused between
gcc and clang.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-19 08:55:01 -05:00
Kumar Gala
8fb15826ff cmake: compiler: arm: Fold fpu-for-gcc-m-cpu.cmake into target.cmake
We only use fpu-for-gcc-m-cpu.cmake once, so just fold it into where it
used.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-19 08:55:01 -05:00
Erwin Rol
8bc76b0480 boards: arm: olimex_stm32_p405: Add CAN1 support
Add support for CAN on pins PB8 (CAN1_RX) and PB9 (CAN1_TX).

Signed-off-by: Erwin Rol <erwin@erwinrol.com>
2019-09-19 08:52:53 -05:00
Erwin Rol
efa44b1885 arm: stm32f4: Add CAN1 support
Add CAN1 pinmux definitions and DT entries for STM32F4 series.

Signed-off-by: Erwin Rol <erwin@erwinrol.com>
2019-09-19 08:52:53 -05:00
Ulf Magnusson
0b1ab4ab09 scripts: dts: Replace 'sub-node:' with more general 'child-binding:'
Deprecate 'sub-node:' and add a more general 'child-binding:' mechanism
to bindings. Keep supporting 'sub-node:', but print a deprecation
warning when it's used.

Like 'sub-node:', 'child-binding:' gives a binding to child nodes, but
the binding is required to be a complete binding, and is treated (and
checked) like a normal binding.

'child-binding:' can in turn contain another 'child-binding:', up to any
number of levels. This is automatic from treating it like a normal
binding, and from the code initializing parent Devices before child
Devices.

This lets nodes give bindings to grandchildren.

For example, take this devicetree fragment:

    parent {
            compatible = "foo";
            child-1 {
                    grandchild-1 {
                            ...
                    };
                    grandchild-2 {
                            ...
                    };
            };
            child-2 {
                    grandchild-3 {
                            ...
                    };
            };
    };

The binding for 'foo' could provide bindings for grandchild-1/2/3 like
this:

    compatible: "foo"

    # Binding for children
    child-binding:
        title: ...
        description: ...

        ...

        # Binding for grandchildren
        child-binding:
            title: ...
            description: ...

            properties:
                ...

Due to implementation issues with the old devicetree scripts, only two
levels of 'child-binding:' is supported for now. This limitation will go
away in Zephyr 2.2.

Piggyback shortening 'description:' and 'title:' in some bindings that
provide child bindings. This makes the generated header a bit neater.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-19 08:39:22 -05:00
Anas Nashif
7912f24bf3 tests: timer_api: exclude qemu_x86_coverage
Test keeps failing when coverage is enabled.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-19 09:22:09 -04:00
Michał Oleszczyk
2663f71c6a drivers/sensor: lis2dw12: fix for wrong gpio_callback handling
It seems that gpio_pin_disable_callback() has never been working
for that sensor as it was expected. We used there argument 'dev'
as its own (lis2dw12) device pointer. While this argument is a
gpio_port device pointer not lis2dw12 sensor device pointer. So
cfg->int_gpio_pin always tries to disable callback for some random
pin read from accidental data sector.

Signed-off-by: Michał Oleszczyk <oleszczyk.m@gmail.com>
2019-09-19 08:04:05 -05:00
Peter Bigot
2dfbf21410 testsuite: support reboot to retry intermittent tests
When a test fails intermittently there is currently no alternative to
looking at logs and pressing a hardware reset button.  This commit
adds a Kconfig option that can be set when diagnosing an intermittent
failure.  The behavior is to do a cold reset of the board when the
test passes.  A counter is maintained in noinit memory to track the
number of times it takes to reproduce a failure.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-09-19 09:03:23 -04:00
Peter Bigot
0cab77f42d testsuite: clean up Kconfig dependencies
Move all the dependencies into a conditional.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-09-19 09:03:23 -04:00
Andrzej Puzdrowski
4ade5e9c32 cmake: check sdk_version format
Encountered situation when sdk_version string was empty
(as the result of corrupted installation).

The version should had 0.0.0 format.
Patch add check for this and descriptive failure message.

Objective is to help the user to recognize the installation failure.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-09-19 08:16:19 -04:00
Stephanos Ioannidis
571741a0c5 toolchain: Add __BYTE_ORDER__ definition to the GCC toolchain header.
__BYTE_ORDER__ preprocessor definition is not defined by older versions
of GCC. The definitions for __ORDER_BIG_ENDIAN__,
__ORDER_LITTLE_ENDIAN__ and __BYTE_ORDER__ by automatic detection using
arch-specific endianness definitions have been added.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2019-09-19 08:13:52 -04:00
Joakim Andersson
ff2bd93eea Bluetooth: GATT: Add initializer for GATT CCC
Add GATT initializer macro for GATT CCC and allow the
BT_GATT_CCC_MANAGED to accept an already initialized CCC user data.
This allows the application to specify the storage location of the CCC
user data.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-09-19 14:08:12 +02:00
Luiz Augusto von Dentz
296f92276f Bluetooth: GATT: Fix not storing SC changes
CCC storaged is no longer declared separetly so check if ccc->cfg
matches with sc_ccc_cfg no longer works so instead use the cfg_changed
callback and match against sc_ccc_cfg_changed.

Fixes #19267

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-09-19 12:58:18 +02:00
Nicholas Lowell
5b322d9331 debug: tracing: add sys_trace_thread_name_set
Initial thread creation and tracing information
occurs with empty thread names.  For better tracing information,
we need to a way to get actual thread names if they are set
in order to better track thread names and their IDs.

Signed-off-by: Nicholas Lowell <nlowell@lexmark.com>
2019-09-19 00:37:35 -04:00
Håkon Øye Amundsen
4e13501a37 scripts: pep8 gen_relocate_app.py
Add styling to make it more pep8 compliant.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2019-09-19 00:34:38 -04:00
Paul Sokolovsky
be1eac6058 samples: sockets: Fix syntax of combined "filter" clauses in sample.yaml
Now that we have support for properly combine conditions from multiple
"filter" clauses in one sample.yaml file (e.g. from "common" and
test-specific sections), use it instead of previous adhoc syntax
relying on string concatenation.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-09-19 00:29:41 -04:00