Commit graph

41120 commits

Author SHA1 Message Date
Anas Nashif
e7db7daa0a segger: move to an external module
Move segger to an external repository managed by west

https://github.com/zephyrproject-rtos/segger

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-05-28 08:28:57 -04:00
Anas Nashif
3cc74cf07b nffs: move to an external module
Move nffs to an external repository managed by west.

https://github.com/zephyrproject-rtos/nffs

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-05-28 08:28:57 -04:00
Anas Nashif
02ed9b19b5 mcumgr: move to an external module
Move MCUMGR to an external repository managed by west.

https://github.com/zephyrproject-rtos/mcumgr

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-05-28 08:28:57 -04:00
Anas Nashif
45868a2dfd fatfs: move fatfs filesystem to a module
Move the fatfs component into a module hosted at
https://github.com/zephyrproject-rtos/fatfs

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-05-28 08:28:57 -04:00
Anas Nashif
89d393649b esp: move HAL to external repo
This HAL is now in its own repository on
https://github.com/zephyrproject-rtos

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-05-28 08:28:57 -04:00
Radoslaw Koppel
617c6fdb24 drivers/flash/flash_simulator: Allow unaligned read
This commit adds the default configuration to the flash_simualtor
to allow unaligned reads.
Disable this option when testing to increase test coverage.

Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
2019-05-28 11:24:48 +02:00
Erwan Gouriou
e58df2c34e ext/hal/st: stm32cube Kconfig fix
Fix inconsistencies (spelling, duplicates, ordering) in stm32cube
Kconfig file.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-05-27 17:40:47 -04:00
Henrik Brix Andersen
ccbfd553d5 ext: segger: update to SystemView v2.52h
Update the external Segger RTT and SystemView libraries to version
2.52h.

This fixes #14082.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2019-05-27 16:27:00 -04:00
Alberto Escolar Piedras
bcb9141b6e native_posix: Run in real time by default with host BT
For native_posix, set NATIVE_POSIX_SLOWDOWN_TO_REAL_TIME
by default when a host BT adapter is selected even if TEST
was also set. As using host peripherals one normally needs
also to run with the host time.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-05-27 22:25:20 +02:00
Aaron Tsui
6ae2457491 samples: servo_motor: add HW PWM choice for NRF52 family
Hardware PWM make sense for servo control even in a sample,  add HW PWM
choice for NRF52 family, which support it.

Signed-off-by: Aaron Tsui <aaron.tsui@outlook.com>
2019-05-27 15:22:04 -04:00
Luiz Augusto von Dentz
ad769e9c04 Log: Fix build error on Fedora 30
Fedora 30 uses GCC 9.1 which fails to build when loggin is enabled:

zephyr/subsys/logging/log_core.c: In function ‘log_is_strdup’:
zephyr/subsys/logging/log_core.c:665:22:
warning: array subscript -1 is outside array bounds of
‘u8_t[]’ [-Warray-bounds]
  665 |         ((char *)buf <= pool_last->buf);
      |                      ^~
zephyr/subsys/logging/log_core.c:52:3:
note: while referencing ‘log_strdup_pool_buf’
   52 |   log_strdup_pool_buf[LOG_STRDUP_POOL_BUFFER_SIZE];

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-05-27 11:42:07 -04:00
Henrik Brix Andersen
fad34eb034 drivers: counter: mcux_rtc: allow setting a new alarm from the callback
Allow setting a new alarm from the callback context of the just
expired alarm.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-05-27 09:25:38 -04:00
Johann Fischer
28f2dc6c69 usb: usb_device: fix handlers call for secondary descriptor
Fix handlers call for secondary descriptor.
USB class like DFU has two sets of descriptors. In the handler
look up function, wind the pointer forward to the range
of the current descriptor.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-05-27 09:25:06 -04:00
Andrei Emeltchenko
4d2b7f613f doc: usb: Remove old API documentation
Fix documentation build removing old API tags.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-27 09:25:06 -04:00
Andrei Emeltchenko
3f13079a7c samples: usb: hid: Fix harness configuration
Fix configuration indicating changes in USB device.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-27 09:25:06 -04:00
Andrei Emeltchenko
a68d404833 usb: dfu: Remove old composite configuration
Use new method for USB config and enable.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-27 09:25:06 -04:00
Andrei Emeltchenko
953728b241 samples: usb: wpanusb: Refactor sample using new API
Refactor wpanusb sample using new descriptor API, use endpoint index
instead of hardcoded endpoint address.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-27 09:25:06 -04:00
Andrei Emeltchenko
1b64e53aeb samples: usb: webusb: Use Automatic endpoint assignments
Use endpoint index since addresses are automatically assigned.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-27 09:25:06 -04:00
Andrei Emeltchenko
3d58abf68b samples: usb: webusb: Use new descriptor placement API
Simplify code using new descriptor API and remove old composite
initialization.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-27 09:25:06 -04:00
Andrei Emeltchenko
5970b66311 tests: usb: device: Refactor device api test
Refactor device api test using standard placement for descriptor table
and configuration data.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-27 09:25:06 -04:00
Andrei Emeltchenko
3880a42375 usb: Align legacy and composite interface
Remove duplicated execution path for composite configuration, USB
device stack initialization is done inside stack for both cases.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-27 09:25:06 -04:00
Andrei Emeltchenko
b3355c7924 usb: device: Remove unused variable
Remove unused variable.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-27 09:25:06 -04:00
Aurelien Jarno
e059d5aa61 usb: simplify request handlers code
Now that Standard, Class and Vendor request handlers are using the same
buffer, we do not need to keep and array installed request data pointer.
This simplifies the code.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-27 09:25:06 -04:00
Andrei Emeltchenko
de26f76ef2 samples: net: echo_server: Fix usbnet configuration
This patch enables USB tests.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-27 09:25:06 -04:00
Andrei Emeltchenko
24142d0749 usb: Set correct default buffer size for RNDIS
Set correct USB_REQUEST_BUFFER_SIZE for USB_DEVICE_NETWORK_RNDIS.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-27 09:25:06 -04:00
Aurelien Jarno
327f61076a usb: merge all request handler buffers
Now that we have merged the class and vendor request buffers into the
USB device code, we can also merge the standard request buffer. We just
need to ensure it is at least 8 bytes, by using the range option in
Kconfig. The 64KiB limit is arbitrary.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2019-05-27 09:25:06 -04:00
Aurelien Jarno
819e749ccd usb: move the request handler buffer to the USB device code
In order to unify the legacy and composite code, move the class and
vendor request handler buffer into the USB device code, just like in
composite mode. The option is renamed from USB_COMPOSITE_BUFFER_SIZE
into USB_REQUEST_BUFFER_SIZE and also replaces the USB_DFU_MAX_XFER_SIZE
and USB_HID_MAX_PAYLOAD_SIZE options.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-27 09:25:06 -04:00
Alexander Svensen
67de7ec86d Bluetooth: controller: split: Refactor if defines in lll_scan.c
This commit refactors if defines to use IS_ENABLED macro
for readability.

Signed-off-by: Alexander Svensen <alsv@nordicsemi.no>
2019-05-27 09:24:44 -04:00
Francisco Munoz
bce16753af boards: mec15xxevb_assy6853: Use the pinmux api
Use the generic pinmux APIs provided by zephyr to select
alternate functions.

This also contains a fix for a formatting issue in the
documentation for this board. Additionally, the serial
console is now on UART2.

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
2019-05-27 09:24:08 -04:00
Francisco Munoz
950679470d soc: microchip_mec: mec1501 Add pinmux definitions
Define pinmux base addresses from gpio bases. Pinmux
and gpio functionality are located in the same PCR register
for each pin.

Introduce pinmux Kconfig switches for the SOC.

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
2019-05-27 09:24:08 -04:00
Francisco Munoz
3d180991bc drivers: pinmux: Pinmux driver for Microchip SOCs
This driver introduces pinmux configuration capabilities
using zephyr apis for XEC SOCs.

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
2019-05-27 09:24:08 -04:00
Derek Hageman
699217637c include/uart.h: Clarify async receive event length
Clarify that the async receive event length is relative to the
offset, rather than representing an absolute length of data
received.

Signed-off-by: Derek Hageman <hageman@inthat.cloud>
2019-05-27 09:23:39 -04:00
Derek Hageman
5d65ee1383 tests: drivers: uart: Explicitly test incremental receive length
Add an explict test for the length of the receive event when
doing incremental receives.  This was not tested anywhere in the
normal code path (only implicitly in the abort, which wasn't
exercised on the only current implementation, nrfx).  So add an
explicit check for it during the chained reads, so that the
test can catch the case where multiple receive events do not set
the length correctly on events past the first.

Tested on nrf52840_pca10056.

Signed-off-by: Derek Hageman <hageman@inthat.cloud>
2019-05-27 09:23:39 -04:00
Derek Hageman
02d6ea0feb Revert "tests: drivers: uart: Fix async write abort test"
This reverts commit d09b91f5.  I was incorrect in my interpretation
of the async API: the number of bytes received is relative
to the previous event, so it does "reset" between calls.

Signed-off-by: Derek Hageman <hageman@inthat.cloud>
2019-05-27 09:23:39 -04:00
Antony Pavlov
2099658d09 boards/arm/*stm32*: fix USB pinmux
USB_DC_STM32 comes from Kconfig. We have to add the CONFIG_ prefix
to use USB_DC_STM32 in C code.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
2019-05-27 09:22:55 -04:00
Wentong Wu
7b3dc920dd linker: add no-flash system support
Non-XIP system with FLASH_SIZE = 0 is no-flash system. And no-flash
system makes text, rodata, and data all in SRAM, so define the marco
ROM_ADDR to RAM_ADDR.

Fixes: #16027.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2019-05-27 09:21:42 -04:00
Brett Witherspoon
d82febd2a3 boards: cc1352r1_launchxl: enable support for SPI
Enable support for the SPI peripheral on the CC1352R LaunchPad.

Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
2019-05-27 09:21:19 -04:00
Brett Witherspoon
b9cf58d90f boards: cc26x2r1_launchxl: enable support for SPI
Enable support for the SPI peripheral on the CC26x2R LaunchPad.

Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
2019-05-27 09:21:19 -04:00
Brett Witherspoon
7713c85519 dts: add CC13xx / CC26xx SPI bindings and nodes
Add bindings and device tree nodes for TI CC13xx / CC26xx SPI support.

Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
2019-05-27 09:21:19 -04:00
Brett Witherspoon
f2eea2ef85 drivers: add CC13xx / CC26xx SPI driver
Add driver for the SPI peripheral on the TI CC13xx / CC26xx series SoCs.

Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
2019-05-27 09:21:19 -04:00
Ioannis Glaropoulos
8d6346ef65 soc: arm: nordic_nrf: force platform-specific initialization
This commit enforces platform-specific initialization
for nRF SoC family. The specific platform initialization
hook is invoked directly after reset and calls the nRFx
SystemInit() function.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-05-27 09:20:50 -04:00
Ioannis Glaropoulos
1ba8c3402c arch: arm: add z_ prefix to _PlatformInit
Rename function _PlatformInit() to z_platform_init() to
comply with naming conventions.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-05-27 09:20:50 -04:00
Alexander Svensen
1c33d90fdb Bluetooth: controller: split: Refactor if defines in lll_adv.c
This commit refactors if defines to use IS_ENABLED macro
for readability.

Signed-off-by: Alexander Svensen <alsv@nordicsemi.no>
2019-05-27 09:19:06 -04:00
Krzysztof Chruscinski
89923134e7 drivers: counter: Add flags to counter_config_info structure
Allow further extention of counter API by replacing count_up bool in
the structure with u8_t flags where one bit is used for count up
feature.

Change is not breaking API as count up property is read using
counter_is_counting_up() that didn't change.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-05-27 09:18:34 -04:00
Georgij Cernysiov
bc4825d6bf drivers: rtc: stm32: correct tm_mon conversion
tm_mon valid interval [0,11]
LL_RTC_DateTypeDef.Month valid interval [1,12]

Signed-off-by: Georgij Cernysiov <g.cernysiov@elco-automation.de>
2019-05-27 09:16:30 -04:00
Michael Scott
b925e4c09b boards: rv32m1_vega: add Arduino header information
OpenISA Vega board has Arduino headers which can be configured for
use with Arduino-compatible shields.  To enable this in Zephyr,
let's define the gpio-map for Vega and set the appropriate
arduino_serial linkage.

Signed-off-by: Michael Scott <mike@foundries.io>
2019-05-27 09:15:05 -04:00
Tomasz Bursztyka
274db4f33d net/udp: Accept UDP packet with missing checksum
Having a checksum of zeros in UDP means "missing checksum" and is a
valid case as per RFC 768:

"An all zero transmitted checksum value means that the transmitter
generated no checksum (for debugging or for higher level protocols
that don't care)."

Such support is made possible by adding a new Kconfig option named
CONFIG_NET_UDP_MISSING_CHECKSUM.

However, that is valid only for IPv4. For IPv6, see the RFC 2460
section 8.1:

"Unlike IPv4, when UDP packets are originated by an IPv6 node, the UDP
checksum is not optional."

So the UDP checksum will always be verified in IPv6.

Fixes #16375

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-05-27 20:58:53 +08:00
Tomasz Bursztyka
770625826c net/udp: Computed checksum field should not be 0
From RFC 768, in "Fields":
"If the computed  checksum  is zero,  it is transmitted  as all ones"

Fixes #16379

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-05-27 20:58:53 +08:00
Paul Sokolovsky
1091b5b40d ext: mbedtls: Enable easy integration with POSIX API
If CONFIG_POSIX_API is defined, automatically use time() function.
The alternative to that is to explicitly configure mbedTLS' timing
source via API, as required for "raw code", but if user enables
POSIX API, we as well might use existing mbedTLS integration.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-05-27 20:28:53 +08:00
Kamil Piszczek
e4409d5d7d Bluetooth: smp: adding LE SC OOB support for peripheral side
Added support for the LE SC pairing with the OOB data. The peripheral
side is only supported for now.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2019-05-27 13:50:46 +02:00