Commit graph

41161 commits

Author SHA1 Message Date
Anas Nashif
7ee9a0328b ci: changes to python requirements should not trigger sanitycheck
Those have no impact on code and should not trigger full sanitycheck
run.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-05-06 11:07:22 -05:00
Anas Nashif
2601c2e54b requirements: add psutil, needed by sanitycheck
Needed for tracking cpu time in sanitycheck.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-05-06 11:07:22 -05:00
Pauli Salmenrinne
30003ffb86 drivers: serial: stm32: Support for parity in DTS for STM32 uart.
Add support for devicetree property 'parity' for stm32 serial devices.

Signed-off-by: Pauli Salmenrinne <susundberg@gmail.com>
2020-05-06 11:00:12 -05:00
Alexandre Bourdiol
18f2129895 board/arm/stm32h747i_disco: add documentation for support of openocd
Add documentation for OpenOCD usage and restrictions

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-05-06 10:57:56 -05:00
Alexandre Bourdiol
28c9271939 board/arm/stm32h747i_disco: add support of flash with openocd
Allow to flash either Cortex M4 or M7 with OpenOCD
(depending on which Board/Core has been compiled)
Command: west flash

Warning: Dependency with recent OpenOCD patch:
Windows: https://gnutoolchains.com/arm-eabi/openocd/
         version 20200408
Linux : http://openocd.zylin.com/
        SHA1: 0a804222da63c5f849efa23b019a59e2dea76842

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-05-06 10:57:56 -05:00
Kumar Gala
a5b45d9567 boards: Remove Kconfig I2C_[0-9] usage
The Kconfig I2C_[0-9] sybmols don't have any meaning for the majority of
SoCs.  The drivers doesn't utilize them and no sample or test code does
either so we can remove setting them in board Kconfig.defconfig files.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-06 10:55:38 -05:00
Pete Johanson
91d6139338 boards: arm: nucleo_wb55rg: Enable USB for stm32wb.
* Define USB driver for base stm32wb device.
* Enable USB for the nucleo_wb55rg board.
* Properly initialize USB power + clock for the platform.

Signed-off-by: Pete Johanson <peter@peterjohanson.com>
2020-05-06 10:46:23 -05:00
Armando Visconti
9f52bfd12b samples/shields: add samples to test x-nucleo-iks02a1 shield
Provide three basic examples to test the x-nucleo-iks02a1 shield:

    - Test shield standard mode
        Acquire sensor data from shield configured in mode 1.

    - Test shield sensorhub mode
        Acquire sensor data from shield configured in mode 2.

    - Test on-shield microphone
        Acquire microphone PDM audio and output it in 16-bit
        PCM format to console.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-05-06 10:33:07 -05:00
Armando Visconti
1cd7eac0c7 boards/shields: add support for x-nucleo-iks02a1 shield
x-nucleo-iks02a1 shield is an arduino compatible companion board
which can be used on top of Nucleo standard boards for industrial
applications. It extends the Nucleo functionalities adding following
MEMS sensor support:

    - ISM330DHCX 3-axis accelerometer and 3-axis gyroscope
    - IIS2MDC 3-axis magnetometer
    - IIS2DLPC 3-axis accelerometer
    - IMP34DT05 digital microphone.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-05-06 10:33:07 -05:00
Armando Visconti
b6b44b2fea boards/nucleo_f411re: Enable I2S support
I2S may be needed by any shield mounted on this nucleo.
So change pinmux and dts file.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-05-06 10:33:07 -05:00
Armando Visconti
5097ce6e35 soc: arm: stm32: Enable I2S_STM32 in the common part
Enable I2S_STM32 in the soc common part, so it will no
longer be required in board default configuration.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-05-06 10:33:07 -05:00
Armando Visconti
fb815c65eb drivers/sensors: ism330dhcx: use endop bit in shub wait_completed
Use the endop bit in the status register (instead of using a k_sleep)
to wait until the current shub operation is completed.

Please note that the recent changes to k_sleep() API was also
breaking the compilation.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-05-06 10:33:07 -05:00
Martí Bolívar
a6b86446d4 doc: hello_world: touch up README
Since this is such a basic sample, it's worth nitpicking the wording a
bit:

- Add a link to the supported boards, since many first time users
  will not know where it is and may start near here.

- Remove the single and multi threaded note. There's no information on
  how to build it in either of these two modes or what the default is,
  so it feels like a distraction for such a basic sample.

- Give a clue about how to build for another board.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-06 17:25:49 +02:00
Martí Bolívar
3b7918360a doc: blinky: touch up README
The devicetree link is rendering as "Devicetree Guide" instead of
"devicetree". Fix that.

My guess is that most users won't care about the details of the
requirements, and rather just want to know if their board is supported
or not. So move the error you'll see on unsupported boards before the
details about how to add support (which involve a pretty significant
learning curve).

Also mention overlays as a way to get this working.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-06 17:25:49 +02:00
Martí Bolívar
908fe14e47 doc: gsg: unify 'get zephyr' steps
Various commands are getting put into their own sections when they are
really just steps along the way towards getting zephyr and installing
Python dependencies. Group them together in a section by that name,
moving the west install step there.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-06 17:25:49 +02:00
Martí Bolívar
d5533765ff doc: gsg: simplifications and fixups
Strip out text that isn't needed to try to minimize the GSG's length.
Fix up some grammar nits.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-06 17:25:49 +02:00
Carles Cufi
a5949e74f6 doc: feature tracking: Update with two new categories
Update the feature tracking page with a couple of new categories that
have been identified as missing during the Release Readiness meetings:

- Hardware support
- Meta

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-05-06 17:25:30 +02:00
Joakim Andersson
c6edfa0971 Bluetooth: shell: Add name option control to advertise parameters.
Add control over the use name option to advertise shell parameters as
an optional argument.
The argument count for extended advertise parameters had not been
updated for the maximum directed advertise parameter count.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-05-06 17:08:49 +03:00
Joakim Andersson
4592cb64ea Bluetooth: host: Add BT_LE_ADV_OPT_USE_NAME for new advertising API
Implement the BT_LE_ADV_OPT_USE_NAME when using bt_le_ext_adv_* APIs
to start the advertiser.
When starting an extended connectable advertiser the name must be
included in the advertising data, since scan response data is
not allowed in this configuration.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-05-06 17:08:49 +03:00
Joakim Andersson
e9002a4fb4 Bluetooth: host: remove duplicate flags set.
Remove setting state flags in bt_le_adv_start_ext since they are set
by le_ext_adv_param_set, except for BT_ADV_PERSIST flag.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-05-06 17:08:49 +03:00
Joakim Andersson
a2a7cc9fe6 Bluetooth: host: Only persist advertising with bt_le_adv_start API
Only persist advertising when the bt_le_adv_start API is used to start
the advertiser. For multiple advertising set a connectable advertiser
can only be started if there is a connection object available for the
advertiser. Leave the decision on which advertising set should be
advertising up to the application instead of suspending advertising
when no connection object is available.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-05-06 17:08:49 +03:00
Krzysztof Chruscinski
fa3729fd11 sys: util: Add missing doxygen tags
Some macros were missing doxygen tag.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-05-06 14:30:18 +02:00
Krzysztof Chruscinski
32d9da7224 sys: util: Deprecate MACRO_MAP
MACRO_MAP has the same functionality as FOR_EACH macro. Removed macro
implementation and replaced with FOR_EACH call.

Deprecated macro to avoid having two macros with the same
functionality.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-05-06 14:30:18 +02:00
Krzysztof Chruscinski
ae6749f65f logging: Replace MACRO_MAP with FOR_EACH
In process of deprecating MACRO_MAP macro which has same functionality
as FOR_EACH macro, replaced MACRO_MAP with FOR_EACH.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-05-06 14:30:18 +02:00
Krzysztof Chruscinski
69577eb619 sys: util: Update FOR_EACH and FOR_EACH_FIXED_ARG implementation
Updated implementation of FOR_EACH and FOR_EACH_FIXED_ARG to use same
engine as FOR_EACH_IDX macro.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-05-06 14:30:18 +02:00
Krzysztof Chruscinski
8fcabf6032 tests: unit: util: Add test for FOR_EACH_FIXED_ARG macro
Added test for FOR_EACH_FIXED_ARG macro.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-05-06 14:30:18 +02:00
Krzysztof Chruscinski
8ab4a60471 tests: unit: util: Add tests for FOR_EACH and FOR_EACH_IDX macros
Extended suite to test macros.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-05-06 14:30:18 +02:00
Krzysztof Chruscinski
925540a112 sys: util: Add FOR_EACH_IDX and FOR_EACH_IDX_FIXED_ARG macros
Added macros which iterate over provided parameters and call specific
macro with this parameter, index and fixed argument
(FOR_EACH_IDX_FIXED_ARG).

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-05-06 14:30:18 +02:00
Andreas Sandberg
ff26eebb7e samples: lora: Remove unnecessary config option
LoRa drivers no longer depend on CONFIG_COUNTER. Remove this
configuration option from the samples.

Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
2020-05-06 07:29:52 -05:00
Kumar Gala
cb913173ae boards: lpcxpresso55s16: Fix DT_HAS_NODE_STATUS_OKAY conversion
Rename a few cases of DT_HAS_NODE to DT_HAS_NODE_STATUS_OKAY that snuck
in after the initial global change.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-06 07:28:15 -05:00
Jukka Rissanen
f95c349c36 tests: net: dns: Increase stack size for coverage support
Increase stack size so that coverage information can be generated.

Fixes #17323

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-05-06 13:43:17 +03:00
Stephanos Ioannidis
95c6da0c82 scripts: checkpatch: Revert dt-binding vendor prefix check regex change
This commit reverts the device tree binding vendor prefix check regular
expression change that was introduced by the following commit:
5b10fac97e

The changed regular expression fails to detect the correctly specified
vendor prefixes in the `vendor-prefixes.txt`.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-05-06 12:40:35 +02:00
Kumar Gala
fdd85d5ad7 dts: Rename DT_HAS_NODE macro to DT_HAS_NODE_STATUS_OKAY
Rename DT_HAS_NODE to DT_HAS_NODE_STATUS_OKAY so the semantics are
clear.  As going forward DT_HAS_NODE will report if a NODE exists
regardless of its status.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-06 05:25:41 -05:00
Vinayak Kariappa Chettimada
93c5e253a4 samples: Bluetooth: Restart scanning on connection failure
Restart scanning if connection creation fails; could happen
when devices with low RSSI are discovered but not available
thereafter to establish a connection.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-05-06 13:05:18 +03:00
Charan Pudiyaneravana Venkatesh
afcf01d7dc samples: Bluetooth: Added central health thermometer
Added central sample to read die temperature value from peripheral
device.

Signed-off-by: Charan Pudiyaneravana Venkatesh <charan.pv@sixoctets.com>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-05-06 13:05:18 +03:00
Charan Pudiyaneravana Venkatesh
6ec8349875 samples: Bluetooth: Integrate temperature sensor sample fetch
Integrated temperature sensor sample fetch and use of the value
in the GATT indications.

Signed-off-by: Charan Pudiyaneravana Venkatesh <charan.pv@sixoctets.com>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-05-06 13:05:18 +03:00
Andy Ross
7e3d43b558 lib/cmsis_rtos_v2: Update to newer timeout API
Mostly simple.  Note that the CMSIS RTOS2 API specifies timeout values
in system ticks instead of milliseconds, so the conversions here are
able to elide a conversion that the original code had to do.  That's a
good thing, but does mean that in practice runtime behavior will not
be 1:1 identical.

Also note that the switch away from legacy timeouts involved a change
to 64 bit timeouts by default, which pushed
tests/portability/cmsis_rtos_v2 over the limit on qemu_xtensa.
Unfortunately CMSIS stacks have a fixed limit we can't increase, so I
turned off 64 bit timeouts (CMSIS apps won't need them by definition
anyway -- their API is 32 bit).

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-05-06 06:05:03 -04:00
Andy Ross
4d417034e9 kernel/Kconfig: Add prompt for CONFIG_TIMEOUT_64BIT
This was missing a prompt string, causing recent kconfig logic to
throw an error if an app tried to set it directly.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-05-06 06:05:03 -04:00
Andy Ross
1003ab806c subsys/cmsis_v1: Port to new timeout API
No complexity here.  The CMSIS API was always in milliseconds, needs
nothing but a few wrapper macros for kernel timeout arguments.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-05-06 06:05:03 -04:00
Peter A. Bigot
88c0545ea4 samples: usb: mass: add support for littlefs file systems
This allows mass storage exposure of a littlefs file system,
specifically one on the SPI NOR flash of the nrf52840dk_nrf52840.  In
combination with littlefs-fuse this allows a host system to examine
and change the local storage of a Zephyr application.

Note that it is critical that all parameters of the file system match
between what Zephyr is using and what littlefs-fuse is using.
Inconsistencies can produce confusing results where each system sees
different content.  The README has been updated with a detailed
example.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-05-06 11:31:44 +02:00
Peter A. Bigot
f128cbe80f samples: usb: mass: update nrf52840dk board configuration
Drop the old redefine-everything-in-a-special-conf approach and put
the customization appropriate for this board into the board directory
where it's handled automatically.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-05-06 11:31:44 +02:00
Peter A. Bigot
f5e31c4d5d samples: fs: littlefs: fix lost flash area reference
The API call to close the flash area was only invoked when the flash
area was erased.  It should be closed in all paths.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-05-06 11:31:44 +02:00
Peter A. Bigot
2b33467a61 disk: disk_access_flash: align buffer
Flash drivers may impose alignment requirements on the destination
buffers due to use of DMA transfers.  In particular Nordic QSPI flash
API requires that addresses, sizes, and buffers all be 4-byte aligned.
Align the ready/copy buffer to satisfy this requirement.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-05-06 11:31:44 +02:00
Peter A. Bigot
ebd19ad10b usb: mass_storage: align page buffer
Flash drivers may impose alignment requirements on the destination
buffers due to use of DMA transfers.  In particular Nordic QSPI flash
API requires that addresses, sizes, and buffers all by 4-byte aligned.
Align the page buffer to satisfy this requirement.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-05-06 11:31:44 +02:00
Dominik Ermel
28a6829b74 west.yml: Snapshot update of mcumgr from upstream
This commit updates mcumgr with latest snapshot from upstream.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-05-06 11:14:00 +02:00
Håkon Øye Amundsen
0aa21a632a dfu: use stream_flash in flash_img
Leverage strem_flash in flash_img.c to reduce code size.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2020-05-06 11:14:00 +02:00
Håkon Øye Amundsen
a9676831cb storage: add stream flash library
This library supports stream writes to flash with
optinal progressive erase.

This module is a direct copy of the functionality found in
subsys/dfu/img_util/flash_img.c

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2020-05-06 11:14:00 +02:00
Adam Serbinski
61aff640f9 boards: arm: adafruit_feather_m0_basic_proto: Set flash offset
On this board, it is required to flash beyond the locked bootloader.

Signed-off-by: Adam Serbinski <aserbinski@gmail.com>
2020-05-06 10:20:17 +02:00
Alexander Wachter
464f135ce6 canbus: Convert canbus driver and subsys to new timeout API
Convert all canbus related API/samples/tests/subsys
to the new timeout API with k_timeout_t.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2020-05-06 10:19:13 +02:00
Piotr Mienkowski
637dd67c66 drivers: i2s: fix i2s_handlers.c
Fix syntax error in i2s_handlers.c causing compile time error.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2020-05-06 09:47:42 +02:00