Commit graph

99049 commits

Author SHA1 Message Date
Gil Benkö
655251ec4f ext: Integrate Silicon Labs Gecko SDK for EFM32PG12B into Zephyr
This adds the paths of the necessary parts of the SDK to the
build infrastructure files.

Signed-off-by: Gil Benkö <gil.benkoe@pm.me>
2018-11-21 13:42:26 -06:00
Gil Benkö
f0c7695348 ext: gecko: Add Silabs Gecko HAL for EFM32PG12B SoCs
This includes the Gecko HAL files for the EFM32PG12B SoCs

Origin: Silicon Labs Gecko SDK
URL: https://github.com/SiliconLabs/Gecko_SDK
Version: v5.1.2 (SHA: 938464c68e6c3b2237388a692f767bb0767ec010)
Purpose: Add support for Silicon Labs EXX32 SoCs
License: Zlib
Maintained-by: External

Signed-off-by: Gil Benkö <gil.benkoe@pm.me>
2018-11-21 13:42:26 -06:00
Luiz Augusto von Dentz
a618ea2a5a Bluetooth: GATT: Fix not handling duplicated CCC storage
Some backends may actually contain the same key multiple times so the
code needs to check if there is already a ccc_cfg for an address before
attempting to use one that is unallocated.

Fixes #11409

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2018-11-21 19:48:16 +02:00
Luiz Augusto von Dentz
046e1ab94a Bluetooth: GATT: Fix not resetting CCC storage
If there are no CCC to be stored the value should be set to NULL so it
is properly cleared otherwise calling settings_str_from_bytes will leave
str uninitialized which may cause a crash when attempting to load the
value.

Fixes #11564

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2018-11-21 19:32:16 +02:00
Ioannis Glaropoulos
78c0d98967 ext: hal: cmsis: Update ARM CMSIS headers to version 5.4.0
Origin: ARM CMSIS v5.4.0
License: Apache-2.0
URL: https://github.com/ARM-software/CMSIS_5.git
commit: 0b521765067ac87b142cd96b5f578ffb399090cc
Purpose: CMSIS Headers update.
Maintained-by: External

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-11-21 12:31:56 -05:00
Michael Scott
70b9e7bab6 net: lwm2m: handle pending before send in retransmit
When resending data, we need to always check pending status first.
If the pending check returns an "expired" status, avoid sending the
data to L2 network driver entirely.

This change fixes a use after free issue, where the L2 network driver
was still handling a packet that was expired out from under it when
the pending status was checked.

Signed-off-by: Michael Scott <mike@foundries.io>
2018-11-21 12:30:42 -05:00
Michael Scott
144cfce42a net: lwm2m: firmware_pull: don't use pending pkt for token
During firmware transmit timeout, we rely on the pending packet data to
reconstitute the token and token length.  At this point the pending
structure may be cleared out due to multiple retries.  To avoid getting
a zero token, let's use the token data from the original msg structure
instead.

Signed-off-by: Michael Scott <mike@foundries.io>
2018-11-21 12:30:42 -05:00
Michael Scott
64c03819ec net: lwm2m: don't use pending pkt on retransmit error
We are using msg->cpkt.pkt as the net_pkt pointer in the call to
net_app_send_pkt().  Let's keep the code clean and not expose
ourselves to "out of order" issues, by also using msg->cpkt.pkt
in the error handling unref call.

Signed-off-by: Michael Scott <mike@foundries.io>
2018-11-21 12:30:42 -05:00
Michael Scott
547e449f98 net: lwm2m: remove extra ref/unref in retransmit
During the retransmit cycle we take ref on the outgoing packet,
only to immediately unref it.  Originally, this was to make sure
the net_context handling didn't get rid of the packet when
sendto() is called.  But after checking, the ref counter is never
in danger of going to 0 at this point in the code, so the
added ref handling is useless.

Signed-off-by: Michael Scott <mike@foundries.io>
2018-11-21 12:30:42 -05:00
Marti Bolivar
1cd137c393 net: lwm2m: increase IPSO light object color size
Add some extra space to the color resource buffer, to allow more
exotic and application-specific color spaces.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-11-21 12:30:42 -05:00
Kumar Gala
a8d0e5af07 adc: ti_adc108s102: Remove driver as its bit-rotted
Nothing builds this driver and the driver hasn't been updated to the new
ADC api so it does not compile.  Remove it sinces its effectively dead
code.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-21 12:29:24 -05:00
Erwan Gouriou
121d68f379 drivers/spi: stm32: Use device tree for device clock configuration
Use DT generated symbols to configure clock bus/bits of STM32
SPI devices.

Fixes #10447

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-11-21 12:28:58 -05:00
Kumar Gala
d3c5a4964b samples: wifi: Enable sample on disco_l475_iot1
The disco_l475_iot1 has the Inventek eS-WiFi, so lets enable the sample
on the board.  (This also gets us something that will build test the
eS-Wifi driver as part of sanitycheck).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-21 12:28:25 -05:00
Kumar Gala
6d83738e33 dts: spi: cleanup CONFIG_SPI_x_IRQ_PRI
All of the cases of CONFIG_SPI_x_IRQ_PRI should be DT_SPI_x_IRQ_PRI.
So go ahead and fix them up.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-21 12:27:16 -05:00
Mariusz Skamra
b904ad387f Bluetooth: Add Kconfig option to disable HCI ECDH support
This adds Kconfig option to disable HCI ECDH support.
It will compile out ECDH related code, especially HCI event handlers.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-11-21 12:26:27 -05:00
Mariusz Skamra
8f5ba0be88 Bluetooth: Add common Kconfig option to disable LE Data Length Update
This adds common option to disable support for LE Data Length Update
procedure in controller and host.
This will reduce flash usage by compiling out le_data_len_change
event handler that will never be called if controller has been
compiled with BT_CTLR_DATA_LENGTH option disabled.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-11-21 12:26:27 -05:00
Mariusz Skamra
be314d3af5 Bluetooth: Add common Kconfig option to disable PHY Update
This adds common option to disable support for PHY Update
procedure in controller and host.
This will reduce flash usage by compiling out le_phy_update_complete
event handler that will never be called if controller has been
compiled with BT_CTLR_PHY option disabled.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-11-21 12:26:27 -05:00
Mariusz Skamra
141cf0f2cb Bluetooth: Mention that auto connect do not work along with scan
This has to be stated in API.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-11-21 12:26:27 -05:00
Robert Lubos
aa393809a4 doc: sockets: Make TLS option descriptions doxygen
Secure socket options descriptions were not doxygen comments,
therefore did not show up in the documentation.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2018-11-21 12:25:57 -05:00
Robert Lubos
21a2e1eb5e doc: Add secure sockets documentation
Add documentation for secure sockets subsystem.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2018-11-21 12:25:57 -05:00
Savinay Dharmappa
0576f93ff8 usb: class: hid: Fix fault due to unaligned access
patch fix fault due to unaligned access while setting hid
report size on xtensa platform.

Fixes #11266

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2018-11-21 12:25:22 -05:00
Ioannis Glaropoulos
d51f138703 arch: arm: mpu: declare and define nxp_mpu_config as const
Declare and define nxp_mpu_config and nxp_mpu_regions
structs as const, as they are not modified in run-time.

Fixes #10320

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-11-21 09:44:21 -05:00
Ioannis Glaropoulos
8204ecbead arch: arm: mpu: declare and define arm_mpu_config as const
Declare and define arm_mpu_config and arm_mpu_regions
structs as const, as they are not modified in run-time.

Fixes #10320

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-11-21 09:44:21 -05:00
Ioannis Glaropoulos
f0c459a9c2 arch: arm: mpu: improve documentation of nxp_mpu_config
This commit enhances the documentation of the nxp_mpu_config
element in include/arch/arm/cortex_m/mpu/nxp_mpu.h, stressing
that it intends to store information for fixed MPU regions.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-11-21 09:44:21 -05:00
Marti Bolivar
c41703a020 scripts: west: be more explicit in copy warning message
Print the exact path to the copy of west that was run, to further
avoid confusion. Explain exactly what is going away and why.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-11-21 09:43:45 -05:00
Sebastian Bøe
8037c89606 cmake: Align the DT build logs with Kconfig
Align how DT and Kconfig print log output to be more consistent.

For instance, Kconfig does not state which header file it generates,
so we remove this from DT.

Also, Kconfig states which sources it uses, which is useful to know
when there is a build failure, so we align with Kconfig by printing
the DT source and overlay files.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-11-21 09:43:21 -05:00
Alberto Escolar Piedras
2d580a8339 ci: Add missing option to control placement of BT tests results file
Added a missing option in run_ci.sh to control the placement of the
xml results file. (Before it was just propagated thru the enviroment)
+
Changed .shippable to use this option when callign it.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-11-21 09:42:46 -05:00
Alberto Escolar Piedras
d92fd5a5b8 tests: bsim_bt: Add option to re-build incrementally
In the provided compile.sh script (which builds all bsim_bt
testcases used in the CI regression runs) add the option to
do an incremental build (if possible).
This is just a nicety for users who want to use this script
while testing locally.

This is controller with the existance of the variable INCR_BUILD

For ex., the script can be called, as:
 WORK_DIR=${ZEPHYR_BASE}/my_work_folder INCR_BUILD=y \
 tests/bluetooth/bsim_bt/compile.sh

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-11-21 09:42:46 -05:00
Andrei Emeltchenko
971be35528 usb: console: Notify user about incorrect configuration
Since setting USB console port name is moved to DTS users have
problems enabling it. Notify user that the console is not set.

Fixes #10693

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-11-21 09:38:15 -05:00
Anas Nashif
53982b7e27 Revert "ci: do not build btsim if we are not going to run it"
This reverts commit 6d5ac1c089.

Looks like this was not correctly done, building btsim is needed on all
nodes.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-21 09:12:21 -05:00
Anas Nashif
88ece4944b ci: do not build docs in main CI job
Building docs and running various checks is now being done in another CI
job that runs in parallel and reports directly to the PR.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-21 09:12:21 -05:00
Anas Nashif
f114a1383d sanitycheck: outdir should not be relative to ZEPHYR_BASE
We should leave ZEPHYR_BASE alone and create the test output wherever
we are running.
This will support running sanitycheck on test roots other than zephyr's
main git repo.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-21 15:05:07 +01:00
Anas Nashif
f18ad9dd4b sanitycheck: support running tests out of the tree
right now we assume we are running the tests inside the Zephyr tree and
things do not work well when someone tries to use sanitycheck on tests
outside the tree with a different test root. Cleanup the name handling
and support running outside of Zephyr.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-21 15:05:07 +01:00
Anas Nashif
6e07e75538 gitignore: ignore IDE files
Ignore files generated by IDEs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-21 15:05:07 +01:00
Olivier Martin
1d9fb2b2b3 Bluetooth: host: Increase ECC thread stack
Logging subsystem could take few extra bytes when enabled.
ECC thread stack has been unconditionally increased to
support it.

During my test, I noticed a usage of 1052 bytes when logging
subsystem is enabled.

Signed-off-by: Olivier Martin <olivier.martin@proglove.de>
2018-11-21 14:39:36 +02:00
Tom Burdick
4619f8f114 samples: usb: Fixes usb/console sample for nrf52840
Adds the virtualcom device to the nrf52840 SoC dts and adds a board
specific nrf52840_overlay.dts file, copied exactly from the
arduino101_overlay.dts file, to set the console device name
appropriately for the subsys/usb/console sample project.

There were no clear alternatives to add a usb_cdc: virtualcom device to
all known SoC devices with USB support as should probably happen.

There was also no clear alternatives to add a non-board specific overlay
to the example.

This fixes a specific problem with the nrf52840-dk board for this sample
project.

Signed-off-by: Tom Burdick <thomas.burdick@gmail.com>
2018-11-21 06:19:32 -06:00
Luiz Augusto von Dentz
92fba52168 Bluetooth: samples: peripheral: Add write command characteristic
This adds a characteristic that only allows write command.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2018-11-21 12:54:17 +01:00
Krzysztof Chruscinski
f214f8b2b2 shell: fix RTT backend not returning TX amount
RTT backend was returning number of transfered data equal
to requested amount because it was not taking into
account value returned by SEGGER_RTT_Write. As the outcome
data could be lost.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-11-21 12:53:22 +01:00
Andy Ross
02165d76a0 kernel/timeout: Fix race with clock timeout setting
The call to z_clock_set_timeout() was being made outside the timeout
lock, which can race against other contexts setting sooner-expiring
timeouts.

Also add a long comment to one spot (timeslicing) where this call is
made outside the timeout spinlock (inside the scheduler lock) and why
this is OK.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-11-21 12:52:49 +01:00
Maureen Helm
bfd98954b2 boards: mimxrt1050_evk: Enable pyocd runner
Adds support for debugging and flashing the mimxrt1050_evk board via
pyocd. Support for this board has not yet been merged in upstream pyocd,
therefore the default in zephyr is left as jlink.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-11-21 05:10:04 -06:00
Olivier Martin
184753a4e6 drivers: flash: w25q: Add support for page layout
We use the sector size rather than the page size as some
modules that consumes the flash page layout (such as FCB)
assume the page size is the minimal size they can erase.

Signed-off-by: Olivier Martin <olivier.martin@proglove.de>
2018-11-21 05:08:10 -06:00
Andrzej Głąbek
f4675758d7 drivers: serial: Update more DTS-derived labels with DT_ prefix
This is a follow-up to commit b3ca789ef25627bcf7b02ec2aa7fa900fba37227.
Apparently, another driver needed to be updated but this was not caught
up in CI builds at that time.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-11-21 05:02:21 -06:00
Michael Scott
39843617cb drivers: modem: WNCM14A2A select UART_INTERRUPT_DRIVEN
Modem driver for WNCM14A2A was erroneously leaving the
selection of UART_INTERRUPT_DRIVEN up to CONSOLE_HANDLER.
Now, with the move to the new SHELL backend, this is no
longer happening.

Let's select it from the modem driver, instead of depending
on it.

Let's also add a dependency on SERIAL_SUPPORT_INTERRUPT
which the serial drivers enable to let us know
UART_INTERRUPT_DRIVEN is available.

Signed-off-by: Michael Scott <mike@foundries.io>
2018-11-21 04:09:23 -06:00
Diego Sueiro
27a237f66f samples/ipm_imx: Add i.MX7 boards to platform_whitelist
Adds colibri_imx7d_m4 and warp7_m4 to platform_whitelist for the
ipm_imx sample.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-11-21 04:03:59 -06:00
Diego Sueiro
5f7564bffb boards: Enable IPM driver on colibri_imx7d_m4 board
This board enables the IPM driver on on colibri_imx7d_m4 board.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-11-21 04:03:59 -06:00
Diego Sueiro
bde7c75cc0 boards: Enable IPM driver on warp7_m4 board
This board enables the IPM driver on on warp7_m4 board.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-11-21 04:03:59 -06:00
Diego Sueiro
6d070c77b6 drivers/ipm: Add IPM support for i.MX7
This patch ads the support for the IPM drivers on i.MX7 SoC family.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-11-21 04:03:59 -06:00
Anas Nashif
ccb57d766b ci: fix skipped testcase status posting
Skipped tests were not evaluated correctly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-20 18:14:19 -05:00
Anas Nashif
4b366f93ca ci: update to docker image 0.5-rc2
This has some fixes to permission issues with installed
scancode-toolkit.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-20 16:36:10 -05:00
Anas Nashif
4c0e3e8697 ci: overhaul check-compliance.py script
- Support sending status to github
- Support license checking
- Make every test a class
- Use junitparser instead of custom xml for junit output

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-20 16:36:10 -05:00