Commit graph

41120 commits

Author SHA1 Message Date
Dennis Wildmark
791def84b1 usb: bluetooth: l2cap buffer size now configurable
Added check to see if CONFIG_BT_CTLR_TX_BUFFER_SIZE is defined,
and use that as the BT_L2CAP_MTU if that is the case. Otherwise,
use the previously hard coded MTU size (64). This enables users
to configure the MTU, enabling longer transfers.
The fix was inspired by how this is solved in
samples/bluetooth/hci_uart/src/main.c

Tested on nrf52840_pca10056.

Signed-off-by: Dennis Wildmark <dennis.wildmark@assaabloy.com>
2019-04-29 13:40:18 +03:00
Marek Pieta
0654c33229 bluetooth: Fix bt_conn->id handling
Fixed bt_conn->id handling in bt_conn_create_slave_le function.

Fixes: #15698

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2019-04-29 11:34:08 +03:00
Alberto Escolar Piedras
d44086db5a nrf52_bsim: Add header to allow reusing native_posix drivers
This board and the native_posix board share the POSIX architecture.
Some of the native_posix drivers/backends only rely on the
underlaying operating system API, and do not require any special
HW model to operate.
Therefore it is quite easy to reuse some of them into this board.

Currently the only limitation for some, is the interface they use
in the board to register their command line arguments.
This header provides a minimal shim to rename the, otherwise
equivalent, call.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-04-28 13:40:13 -04:00
Flavio Ceolin
bf878ced12 sanitycheck: Fix an error in scan_path exception
The function error expects only one parameter. The excpetion handler in
scan_path was calling this function with multiple parameters instead of
formatting the string.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-04-28 13:38:32 -04:00
Krzysztof Chruscinski
291c06e1b4 lib: os: ring_buffer: Fix C++ compilation warning
Fix warning when header file is included by C++ source file.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-04-28 13:37:37 -04:00
Krzysztof Chruscinski
0bfd28361e logging: Allow logger usage in C++ files
Allow usage of LOG_MODULE_REGISTER and LOG_MODULE_DECLARE in
C++.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-04-28 13:37:37 -04:00
Charles E. Youse
18833ac0ef drivers/pcie: verify PCI(e) assigned interrupts
A new function pcie_irq_enable() is added to be used in lieu of
irq_enable() when the target device is PCI(e)-attached. The function
attempts to use MSI, when configured in the kernel and supported by
the endpoint; failing that, it will verify that IRQ requested is in
fact routed to the device by the boot firmware before enabling it.

The NS16550 UART driver is updated to use pcie_irq_enable().

The PCI(e) shell is extended to dump information about wired IRQs.

The up_squared devicetree is fixed (reverted?) to IRQ5 for UART1.

The galileo enables MSI by default.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-04-28 13:36:28 -04:00
Andrew Boie
ff1952cc44 arc: arm: fix support for MPUs on non-XIP systems
The size of the ROM region is now rounded up to the
nearest power of two; we no longer assume that RAM
is in a different part of memory.

Fixes: #15558

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-04-28 13:32:35 -04:00
Krzysztof Chruscinski
ecf2784fe7 shell: Use conditional commands registeration in shell_cmds.c
Modified commands which depends on compile time flags to
use conditional macros.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-04-28 13:31:34 -04:00
Krzysztof Chruscinski
7e26f53470 shell: Add macros for creating conditional commands
Added macros which can be used to create a command which depends
on compilation flag. Macros are a cleaner alternative to #ifdefs
around command registration and command handler.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-04-28 13:31:34 -04:00
Andrew Fernandes
e96673dca7 drivers: spi: nrfx: allow enabling DMA with the nRF52832 despite PAN 58
Add a Kconfig option to enable DMA for SPI with SOC_NRF52832 as long as
it being disabled due to Product Anomaly Notice (PAN) 58 is explicitly
overridden. This allows the SPIM driver to be enabled for the nRF52832
SoC for situations where PAN 58 is not a problem.

Signed-off-by: Andrew Fernandes <andrew@fernandes.org>
2019-04-28 13:29:46 -04:00
Benjamin Valentin
86bd319d1f soc: sam0: Make init code common between all samd2x SoCs
The init routines are the same for SAMD20, SAMD21 and SAMR21, so
move them into common/ to not have three copies of the same code.

Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2019-04-28 13:25:35 -04:00
Benjamin Valentin
9f69878633 soc: sam0: enable RTC for samd21, samr21
The Atmel SAMD21 (and therefore also the SAMR21) comes with the same
RTC peripheral as the Atmel SAMD20.

Enable it in dts_fixup.h and enable it in the dts for samr21_xpro.

Signed-off-by: Benjamin Valentin <benpicco@googlemail.com>
2019-04-28 13:25:35 -04:00
Benjamin Valentin
0ee07269a9 CODEOWNERS: Add code ownership for Atmel samr21 code
Take ownership of external SDK files.

Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2019-04-28 13:25:35 -04:00
Benjamin Valentin
360fe70ee7 boards: atsamr21_xpro: Add SAM R21 Xplained Pro Evaluation Kit
Add the Atmel SAM R21 Xplained Pro Evaluation Kit to zephyr.

So far, UART, SPI, I2C (depends on #14128), debug LED and user button
have been tested.

Signed-off-by: Benjamin Valentin <benpicco@googlemail.com>
2019-04-28 13:25:35 -04:00
Benjamin Valentin
770233dd10 soc: atmel: add SAMR21
Adds Atmel SAMR21 soc which is based on SAMD21, but with a AT86RF233
radio connected internally via SPI.

The AT86RF233 is not yet supprted by Zephyr at this point.

This code is very much copy & paste from atmel_sam0/samd21

Signed-off-by: Benjamin Valentin <benpicco@googlemail.com>
2019-04-28 13:25:35 -04:00
Benjamin Valentin
f1f46e2cd1 ext: Import Atmel SAMR21 header files from ASF library
Atmel Software Framework (ASF) provides a set of low-level header
files that give access to different hardware peripherals of Atmel's
ICs.

Origin: Atmel SAMR21 Series Device Support (1.1.72)
License: Apache-2.0
URL: http://packs.download.atmel.com/Atmel.SAMR21_DFP.1.1.72.atpack
Purpose: Introduction of ASF for the SAM0 series.
Maintained-by: External

Signed-off-by: Benjamin Valentin <benpicco@googlemail.com>
2019-04-28 13:25:35 -04:00
Anas Nashif
9e98a94842 tests: ipm: disable on qemu_x86_64
Test is failing randomly on qemu_x86_64. See #12478

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-28 13:08:34 -04:00
Mark Ruvald Pedersen
1f01325ee5 cmake: Toolchain abstraction: use LINKER, introduce toolchain_ld_base
toolchain_ld_base() represents flags that are fundamental to linking or
otherwise does not belong in any further specified linker flag category.

No functional change expected.

This is motivated by the wish to abstract Zephyr's usage of toolchains,
permitting non-intrusive porting to other (commercial) toolchains.

Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
2019-04-28 12:52:18 -04:00
Mark Ruvald Pedersen
0cad53b5ce cmake: Toolchain abstraction: introduce LINKER variable
The LINKER variable is introduced to follow the same logic and flow as
the existing COMPILER variable: That is, each TOOLCHAIN is responsible
for choosing COMPILER and LINKER.

Currently, Zephyr's build system is hardcoded for GNU ld.
Reflect this in LINKER by letting all existing toolchains use GNU ld.

No functional change expected.

This is motivated by the wish to abstract Zephyr's usage of toolchains,
permitting non-intrusive porting to other (commercial) toolchains.

Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
2019-04-28 12:52:18 -04:00
Mark Ruvald Pedersen
3419efd552 cmake: fix intent description of toolchain_cc_nostdinc macro
toolchain_cc_nostdinc does not only obtain flags (to be placed in a
variable), it obtains and applies them.

No functional change expected.

Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
2019-04-28 12:52:18 -04:00
Mark Ruvald Pedersen
3481dc876e cmake: fix whitespace
No functional change expected.

Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
2019-04-28 12:52:18 -04:00
Andrei Emeltchenko
fbfe75c55e usb: tests: Add second IN endpoint to test
Demonstrate automatic endpoint assignment in tests for similar
endpoint types.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-28 12:22:23 -04:00
Andrei Emeltchenko
446f5e48cb usb: dc: native_posix: Increase number of endpoints supported
Support 8 endpoints in each direction for native_posix.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-28 12:22:23 -04:00
Andrei Emeltchenko
8d6fbde898 usb: Remove usb_dc_ep_set_callback return code
Make usb_dc_ep_set_callback() return void since the code is never
used.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-28 12:22:23 -04:00
Andrei Emeltchenko
0d3082cbfc usb: device: Code cleanup
Add missing braces and simple cleanup.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-28 12:22:23 -04:00
Andrei Emeltchenko
7c35a4e89a tests: usb: Add endpoint allocation verification test
Add verification that interface number and endpoint addresses are
correctly allocated.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-28 12:22:23 -04:00
Andrei Emeltchenko
da701f9d55 samples: hid-cdc: Update USB device names and project conf
Update project configuration and USB HID and CDC ACM device names for
sample hid-cdc.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-28 12:22:23 -04:00
Andrei Emeltchenko
995b568b14 samples: cdc_acm: Update CDC ACM Device name
Update device name for USB CDC ACM.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-28 12:22:23 -04:00
Andrei Emeltchenko
e2d1c02770 usb: cdc_acm: Use UTIL_LISTIFY and device count macro
Use new method for defining USB CDC ACM devices using UTIL_LISTIFY and
device count from menuconfig.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-28 12:22:23 -04:00
Andrei Emeltchenko
1b3227fd99 samples: usb: Correct USB HID device name
Use "HID_0" as a device name since we have only device count now.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-28 12:22:23 -04:00
Andrei Emeltchenko
fbd2713431 usb: hid: Use UTIL_LISTIFY and device count macro
Use UTIL_LISTIFY and Kconfig device count template for specify number
of HID Devices.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-28 12:22:23 -04:00
Andrei Emeltchenko
e79e4d9f1f usb: Add Kconfig template for DEVICE_COUNT
DEVICE_COUNT for some USB classes means how many instances of the
class can be supported by USB stack.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-28 12:22:23 -04:00
Brett Witherspoon
cdc29175cc drivers: ieee802154: Make upipe configuration options depend on driver
The upipe specific configuration options are selectable unconditionally.
This commit makes them depend on the upipe driver being enabled.

Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
2019-04-28 12:21:12 -04:00
Andrzej Puzdrowski
b50fe237f9 usb/class/usb_dfu: support progressive image erase
Disable bulk slot image erase when progressive erase is on.
Erase of image bank is performed by image collection procedure
progressively.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-04-28 12:20:01 -04:00
Andrzej Puzdrowski
dffcfd8c79 dfu: introduce progressive erasing
Patch adds option for progressive erase of firmware image.
When using this, flash is erased as necessary when receiving
new firmware, instead of erasing the whole image slot at once.
This is useful on some hardware (like nRF52840) that has
long erase times, to prevent long wait times at the beginning
of the DFU process.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-04-28 12:20:01 -04:00
Torsten Rasmussen
0dd3b421c4 west: zephyr_module: Improved error messaging during west failures
Fixes: #15664

This commit improve error messaging in case `west` list fails.
Previously any error messages and stack trace reported by `west` will
was thrown away by zephyr_module.py.

Now the error, as well as any stack traces, printed by `west` will be
re-printed to the user.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2019-04-27 12:38:32 -07:00
David B. Kinder
df357c43b1 doc: fix watchdog API documentation
There was a stray close group comment @} that was causing a large chunk
of the watchdoc API documentation to be missing.

Fixes: #15678

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-04-26 19:14:54 -07:00
Kamil Piszczek
3ce677092d tests: drivers: flash_simulator: removing CONFIG_ prefix from defines
Removed the CONFIG_ prefix from definitions, which are declared in the
test source file. They could be easily confused with Kconfig
definitions.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2019-04-26 04:04:19 -07:00
Kamil Piszczek
5fd99f5e6a drivers: flash: simulator Kconfig cleanup
Moved the default selection of Flash simulator for qemu_x86 to the board
Kconfig.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2019-04-26 04:04:19 -07:00
Kamil Piszczek
968d3a9ef4 dts: flash simulator cleanup
Moved the DT node description for Flash simulator to the board dts file.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2019-04-26 04:04:19 -07:00
Loic Poulain
e5609997e0 soc: nxp_imx: mimxrt1064_evk: Add I2C support
I2C1 is routed to J24 Arduino interface (D14/I2C_SDA, D15/I2C_SCL).

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-04-26 03:48:07 -07:00
Manivannan Sadhasivam
a0ba654622 boards: arm: 96b_stm32_sensor_mez: Add DTS node for on-board MIC
Add devicetree node for on-board Microphone (MP34DT01) connected to
STM32F446 via I2S2.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
2019-04-26 03:44:46 -07:00
Manivannan Sadhasivam
e2baac2d78 boards: arm: 96b_stm32_sensor_mez: Enable I2S2 peripheral
Enable I2S2 peripheral for the 96b_stm32_sensor_mez board along
with DMA.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
2019-04-26 03:44:46 -07:00
Manivannan Sadhasivam
5274c38200 pinmux: stm32f4: Add STM32_OSPEEDR_VERY_HIGH_SPEED to pinmux header
Since STM32_OSPEEDR_VERY_HIGH_SPEED flag is required for all I2S_CK
pins, lets add this to the STM32F4 pinmux header and remove the
duplicates in board files. While we are at it, let's add the missing
pinmux definitions for I2S_2 also.

Fixes: #9028

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
2019-04-26 03:44:46 -07:00
Yong Jin
8515b841a1 driver: watchdog: stm32: rename the independent watchdog name
rename the name idwg to iwdg.

Signed-off-by: Yong Jin <jinyong.iot@foxmail.com>
2019-04-26 03:35:09 -07:00
Siddharth Chandrasekaran
b070bbd888 tests: kernel: Exclude platforms stm32_min_dev_*
Exclude the two variants of smt32_min_dev (stm32_min_dev_black and
stm32_min_dev_blue) from kernel tests.

Signed-off-by: Siddharth Chandrasekaran <siddharth@embedjournal.com>
2019-04-26 03:34:45 -07:00
Siddharth Chandrasekaran
35b10fbdcd doc: stm32_min_dev: Update for blue/black variant support
Replace image and reword some sections to indicate the presence of two
board variants: stm32_min_dev_(blue|black)

Signed-off-by: Siddharth Chandrasekaran <siddharth@embedjournal.com>
2019-04-26 03:34:45 -07:00
Siddharth Chandrasekaran
bb72df5bb2 board: stm32_min_dev: Add support for blue/black variant
Add support for blue pill and black pill variants of the STM32
minimum development board by splitting board configuration into
stm32_min_dev_blue and stm32_min_dev_black.

CODEOWNERS: Add myself (@cbsiddharth) as codeowner for stm32_min_dev

Signed-off-by: Siddharth Chandrasekaran <siddharth@embedjournal.com>
2019-04-26 03:34:45 -07:00
Jun Li
33d32fb6e7 soc: stm32f4: add another pinmap for spi1
Add SPI1's pinmap on PB3, PB4 and PB5

Signed-off-by: Jun Li <jun.r.li@intel.com>
2019-04-26 03:32:59 -07:00