Commit graph

19237 commits

Author SHA1 Message Date
Peter Mitsis
1434d49539 test_fp_sharing: Add testcase.ini files
Adds testcase.ini files for the floating point sharing tests to
ensure that there are run on a daily basis.

Change-Id: I206b1734700f6e998c19d7ad1b36a84400284899
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-05-20 00:09:24 +00:00
Peter Mitsis
1b3f8d1a95 x86 exceptions: Fix _ExcEntSetupDone
Fixes a bug in _ExcEntSetupDone wherein the return address to the
exception stub was accidentally changed to point to the TCS of the
interrupted thread.

Jira: ZEP-378
Change-Id: I0e502649c49c35ba8b2457016ede4a6b586da3fb
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-05-20 00:09:16 +00:00
Andrei Emeltchenko
46d825fdab drivers/nble: Check that attribute is withing range
Fix iterating all attributes

Change-Id: If9555a02e76368dbfb952ef0710100a7aef288bd
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-05-19 18:44:12 +00:00
Ravi kumar Veeramally
5e99b14ad4 net: 6lowpan: Fix 6lowpan fragmentation
IP packet passing through 6lowpan compression and 802.15.4
fragmentation has an issue. (RFC 6282 and 4944) RFC4944, 5.3
says "fragment header's datagram_size and datagram_offset
values as the size and offset of the IPv6 datagram before
compression".

At the moment datagram size and offset values are after
compression. Due to multiple bearer (15.4 and bluetooth) support
and multiple incoming buffers support functionality is divided
to compression and fragmentation parts. And datagram size and
offset values for BT are after compression. Small packet (which
doesn't need fragmentation) doesn't go through this. So cacheing
compressed and uncompressed header lengths and with hdr difference
preparing fragments as per original buffer (total buf size and offset).

Change-Id: I9d3b0433e64964c68519d7c007cc06ec6035b573
Jira: ZEP-208
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-05-19 14:18:38 +00:00
Luiz Augusto von Dentz
592acc09fd Bluetooth: shell: Add help to commands
This adds help strings to commands describing what parameters they take:

btshell> help init
init [none]
btshell> help connect
connect <address: XX:XX:XX:XX:XX:XX> <address type: (public)>

Change-Id: I0b79cb4f2d424f74b0ddb1de7a6d7120e81e2ae3
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-05-19 08:46:01 +00:00
Luiz Augusto von Dentz
a4b26fadfe console: shell: Add help string to command table
This adds a optional help string to the command table which is printed
when user enters > help <command>.

Change-Id: Id3a8995bb6c4ff6b009418e31968c0677e6e4921
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-05-19 08:43:18 +00:00
Johan Hedberg
a2b0d3abdb doc: boards/arduino_101: Minor updates to BLE firmware documentation
Change-Id: Idf1ddb822a96387269c547b7102445bee9e7cc20
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-05-19 11:07:57 +03:00
Chuck Jordan
7b42324e77 arc: CONFIG_XIP can work with ICCM
I've tested that CONFIG_XIP does work with Harvard.
User's can build CONFIG_XIP=y, and then have their bootable image
be placed in SPI-FLASH. A bootloader will load up ICCM contents.
Zephyr will then copy remaining data from ICCM to DCCM.
This takes a bit of ICCM memory to do it, but it will work.

Change-Id: Ic1cd201d19aab9083d63334527d9d68f4edc6075
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-19 01:25:53 +00:00
Chuck Jordan
7f637af2bd spi: For spi_dw, added SPI_DW_FIFO_DEPTH as configurable paramter
When using the Synopsys DesignWare Synchronous Serial Interface (SSI),
the FIFO depth can vary from 2-256, depending upon how this module is built.
For quark_se_ss, it was using a depth of 8. For EM Starterkit, it will be
32. Adding this now as a configurable option. A larger FIFO really helps
reduce SPI interrupts.

Change-Id: Id2bc8470bfc08ab447d38b89c7904cff010c63bd
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-19 01:24:57 +00:00
Chuck Jordan
f2fd12cc32 spi: add macro so that txftlr register can be read
Just as rxftlr can be read, a macro is needed so that txftlr can be read.
Symmetry.

Change-Id: Id987f700d89268feca60850f4fdf512f990f3ab6
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-18 23:18:19 +00:00
Chuck Jordan
0a5bc3b0d9 spi: DW IP can have 16 slaves + SINGLE_LINE IRQ configured in soc.h
A recent submission caused a build error for DW
CONFIG_SPI_DW_INTERRUPT_SINGLE_LINE because the symbols
CONFIG_SPI_<0,1>_IRQ went missing from Kconfig.
I think these should probably NOT be configurable, because
on an SOC, interrupt lines are hard. So I'm changing
the names back to SPI_DW_PORT_<0,1>_IRQ, with there
definitions originatig in the soc.h file.

Also, on DesignWare ARC EM Starterkit, the SPI interface
has 6 slave selects, but IP itself can handle up to 16.
Why does this start from 1 and not 0? Argh!

DBG_COUNTER_RESULT() should expand to 0 when not used.

Also, don't check version from DesignWare IP because
it can be different for each target.

spi_dw_isr() requires a cast when converting arg to dev.

Change-Id: I83d55e0405583e7cafab80b09cbef44e0f96fcb8
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-18 22:32:30 +00:00
Benjamin Walsh
0107c80c29 misc: clean up __ASSERT warnings during build
By default, instead of spamming the build output with one warning per
file where __assert.h is included when CONFIG_ASSERT=y, only display a
warning at the end of the build.

Also limit the range of CONFIG_ASSERT_LEVEL between 0 and 2.

Change-Id: I95ffd1bcec9535de1afabc047814e5c6f5b9c2c1
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-05-18 22:06:54 +00:00
Benjamin Walsh
9977951f93 kernel: catch overflowing kserver stack with asserts
Overflowing the k_server command stack will now trigger an __ASSERT()
when CONFIG_ASSERT=y.

Change-Id: Icf6f4242ab8a9897918769415a0f7485602d7630
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-05-18 22:06:39 +00:00
Andrei Emeltchenko
39557c4706 drivers/nble: Update Nordic RPC to 0518 release
Fixes limited discov mode bug and GATT write long request.
1 mandatory and 9 optional PTS test cases.
Fixes: RTOS-1524
Fixes: RTOS-1551

Change-Id: Iac3618af8d840073b72503cfbdf34b80e4334074
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-05-18 18:36:26 +03:00
Laurentiu Palcu
cbdbe6fd3e sensor: Add altitude channel
This is needed for altimeter sensors.

Change-Id: I8de010f2bcfd877cfb44489beeb237e64a82a458
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2016-05-18 12:02:39 +00:00
Mariusz Skamra
dc62813b83 Bluetooth: tester: Return Insufficient Authorization error from app
This is related to recent changes in GATT permissions.
Authorization permissions were deleted, so that application
may return BT_ATT_ERR_AUTHORIZATION if configured.

Fixes following Test Cases:
1/9   GATT   TC_GAR_SR_BI_03_C   PASS
2/9   GATT   TC_GAR_SR_BI_09_C   PASS
3/9   GATT   TC_GAR_SR_BI_15_C   PASS
4/9   GATT   TC_GAR_SR_BI_25_C   PASS
5/9   GATT   TC_GAW_SR_BI_04_C   PASS
6/9   GATT   TC_GAW_SR_BI_11_C   PASS
7/9   GATT   TC_GAW_SR_BI_17_C   PASS
8/9   GATT   TC_GAW_SR_BI_22_C   PASS
9/9   GATT   TC_GAW_SR_BI_29_C   PASS

Change-Id: I4c37f6d597192acf34ba50910f92d5f06078201f
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-05-18 10:23:03 +00:00
Fabrice Olivero
d24bd64302 samples: adds task_profiler application, code and scripts
This patches includes
- a profiler file/Makefile that can be added to an application to enable
  kernel event logger flush over UART
- a nanokernel and a microkernel sample application permitting to
  exercise the profiler
- scripts permitting to get kernel event profiler data over UART
  console and post-process this data

Origin: Original
Change-Id: Icacf4354c526c7f780b11371e9c28c87e6461eb8
Signed-off-by: Fabrice Olivero <fabrice.olivero@intel.com>
2016-05-17 20:13:40 +00:00
Sebastien Griffoul
818875f364 net:apps: Add ipv6 support for zperf
Update the zperf app in order to support ipv6.

Change-Id: I137af07bbd739cf4bfe60bd13bdb06cf939c6c55
Signed-off-by: Sebastien Griffoul <sebastien.griffoul@intel.com>
2016-05-17 20:13:13 +00:00
Sakari Poussa
d3f625b60e toolchain/xtools: enhance include search path to sysroot
For xtools, add sysroot also to include search path.

Change-Id: I72d37c54eb7f3693d3a207a35802b29b150c84f1
Signed-off-by: Sakari Poussa <sakari.poussa@intel.com>
2016-05-17 20:09:50 +00:00
jgarcia
1ebed467bf net:apps: zperf - add TCP server
This patch adds the TCP server capability
to zPerf tool.

Change-Id: I8e4d92b10079a7c4b4bddab8d78655031ca6125c
Signed-off-by: jgarcia <jeremie.garcia@intel.com>
2016-05-17 20:09:06 +00:00
Murtaza Alexandru
310ed1e2e9 sensor: add support for BME280
* Rename BMP280 to BME280 which is a superset for the former.
* Autodetect device based on chip ID.
* Implement humidity fetching and reading for BME280
* Rename sample BMP280 to BME280

Change-Id: I565c769a7011e7496c9f1cad861d5ee311839b4f
Signed-off-by: Murtaza Alexandru <alexandru.murtaza@intel.com>
2016-05-17 20:07:34 +00:00
Murtaza Alexandru
261a448f33 sensor: remove unnecessary return variables
Remove unnecessary return variables (ret/rc) to reduce memory footprint.

Change-Id: Ifc22fd993b4f8f2d0cf992f620f53cc510add1fa
Signed-off-by: Murtaza Alexandru <alexandru.murtaza@intel.com>
2016-05-17 20:07:29 +00:00
Murtaza Alexandru
2d7ae8b249 sensor: migrate all drivers to new error code standard
Check if return value is negative when checking for errors, instead of
checking if it's 0.

Change-Id: I0b0af28c02b3760f3128e8cbe48908dabc89af88
Signed-off-by: Murtaza Alexandru <alexandru.murtaza@intel.com>
2016-05-17 20:07:24 +00:00
Murtaza Alexandru
df20e3e4a7 sensor: add support for *_ANY get channel
Update all drivers that have vectorial data to return all 3 channels (X,
Y and Z) if the chan parameter is _ANY.
Also fix a compile bug in LSM9DS0 MFD driver.

Change-Id: I5bf261846bcd68c288b96997ff164726f75c151c
Signed-off-by: Murtaza Alexandru <alexandru.murtaza@intel.com>
2016-05-17 20:07:05 +00:00
uLipe
adaeba2fa6 gpio_k64.c: configure pins as gpio alternate function in gpio_k64_configure()
Change-Id: I653602abeb99d4baf379e6175558c19c05678567
Signed-off-by: uLipe <ryukokki.felipe@gmail.com>
2016-05-17 15:44:35 +00:00
Johan Hedberg
798e2cf0a8 doc: Arduino 101: Add instructions for building HCI BLE firmware
Document the process of creating and flashing a MyNewt-based HCI
firmware for the Arduino 101.

Change-Id: Ieb3cf116363777b8cca20dbcc746e4757f47d2ed
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-05-17 14:15:44 +00:00
Vlad Dogaru
434e7b2626 sensor: Remove dead code from header
This accidentally snuck by between iterations of the workqueue patches.
In v1 there was a sensor-specific workqueue, which we then turned into a
global one.

Change-Id: I10b193bb535602a16f6742d057281ba01906228d
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
2016-05-17 13:20:02 +00:00
Johan Hedberg
b78b8a946a Bluetooth: samples: Add Nimble config for peripheral_hr
Change-Id: Ie311b85710fc24dbde8c7dbb7c9afb966b57cc15
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-05-17 15:07:03 +03:00
Johan Hedberg
485d023428 Bluetooth: Remove unnecessary #ifdef for micro/nano main function
By calling the microkernel entry point 'main' there's no need to have
extra hacks to share the same c-file with both nano and micro
configurations.

Change-Id: I6623855a87ef8624b2bddb75b95079521e0eab8b
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-05-17 12:30:41 +03:00
Jukka Rissanen
0506cc1fd7 net: Verify that MAC address is not NULL
Add additional check which verifies that MAC address is given
and return -EINVAL if it is not set.

Change-Id: I90d415670c4b35d092ba057329f998df3a72018e
Jira: ZEP-213
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-17 09:57:29 +03:00
Jukka Rissanen
1f10410076 net: apps: Add IPv4 client support to echo-client
Change-Id: Ic879b64f22e0a2a1edbeaa1a6315a605993a09a4
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-17 09:57:29 +03:00
Jukka Rissanen
133aa5c026 net: tcp: Supporting TCP client functionality when using IPv4
The application can initiate TCP connection when using IPv4.

Change-Id: I264270d013f567dd0c429783c47506d9c38f0509
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-17 09:57:29 +03:00
Jukka Rissanen
7bb3f2e01a net: apps: Add TCP client support to echo-client
The echo-client can now initiate a TCP connection.

Change-Id: I8223ef377127319dd1791497675a4abe8b382365
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-17 09:57:28 +03:00
Jukka Rissanen
61edc68c9e net: tcp: Supporting TCP client functionality when using IPv6
The application can initiate TCP connection when using IPv6.

Change-Id: I632fa2559d5deb40d71288762bd13fbc2aac9cc7
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-17 09:57:28 +03:00
Jukka Rissanen
d57c2d35df net: apps: Quit echo-client if TCP connection fails
If the active connection to another TCP host fails, then
quit as it is no point continuing.

Change-Id: I21317d7062d4ac93c342834a2503139fe27076e7
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-17 09:57:28 +03:00
Jukka Rissanen
d01bee8783 net: Print more detail if TCP packet is not sent properly
Change-Id: I8b43e6ddfe5da3019893bf028acb6fb29e51bd5a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-17 09:57:28 +03:00
Jukka Rissanen
2881cb122b net: Add support for re-sending initial TCP SYN
If we are initiating a TCP connection, then make sure that
we try to re-send initial SYN packet (max 8 times) if it is lost.

Change-Id: I9fbc39bdaef3a535c480eb5433eb7ef3ad60d604
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-17 09:57:28 +03:00
Jukka Rissanen
276d066cd5 net: Add utility func to re-send TCP SYN packet
This will be used in following commit.

Change-Id: Ie4fccd72471c285b68a6df6970babe562e5e6258
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-17 09:57:28 +03:00
Jukka Rissanen
3b7208db84 net: Do not wait forever when sending TCP data
If application calls net_send(), set the retry count to some
low number (currently 5) so that we do not wait forever but
eventually we try to send the data properly.

Change-Id: I8103246ac9227a0cf70b56aecab6ed8307877e19
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-17 09:57:28 +03:00
Jukka Rissanen
0a12b4768c net: apps: Add TCP support to echo-client application
If TCP is activated, then the echo-client application opens
a TCP socket and starts to send data to server. For TCP
connections, the application data is not reversed because
it would make it difficult to verify the data in the sender
side.

Change-Id: I35306b8ecd6794365086a23bf6a17f5103d7ac80
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-17 09:57:28 +03:00
Jukka Rissanen
a1716c4760 net: Enable Zephyr to initiate a TCP connection
These changes are needed so that Zephyr host can initiate
a TCP connection to another host.

Change-Id: I46b92bf978e2dd04993951f2215d179a5cf1bd55
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-17 09:57:28 +03:00
Jukka Rissanen
662ce340be net: Add functions to return connection status needed in TCP
These are internal functions needed when initiating a TCP
connection.

Change-Id: Ide5d59ac9854ec8bdea3baa97b3cde3ffa6a5e0f
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-17 09:57:28 +03:00
Jukka Rissanen
f499624f7c net: tcp: Enable active connection support by default
Application can by default do a connection request. If this is
not needed (app is only working in server role i.e., only
listening connection attempts), then some memory can be saved
by disabling client role support.

Change-Id: I33ed95ad0cf099a70563465beff555ec4adab958
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-17 09:57:28 +03:00
bitpathe
ae327c60c9 build: Do not depend on python while creating the relative path
Change-Id: I45892371b3d72a681fc0d5c3fdc49af2f0094296
Signed-off-by: Bit Pathe <bitpathe@gmail.com>
2016-05-16 22:21:01 +00:00
Johan Hedberg
37c0944d05 Bluetooth: doc: Use proper grouping for APIs
Change-Id: Ifb3483d300409d280ca12aef5f49a983eff92496
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-05-16 20:14:28 +00:00
Anas Nashif
083a7ad0df build: move library related code to lib/
Cleanup main Makefile and remove all library related code to
lib/ to better support the increasing number of libraries and
to keep the main Makefile clean from library dependencies.

Jira: ZEP-308
Change-Id: Id83cf309020604b8eab8d80cad0021905d5b5f7a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-16 19:43:50 +00:00
Anas Nashif
0b2c44a771 tinycrypt: move from lib to regular objects
tinycrypt was built using the lib- scripts without any real benefit. We
also had a wrong placement of the Kconfig files under misc/ and a Kconfig
file for Crypto that was never used before.

Change-Id: I82d5902d92e7c06e10a95f418d9ead3cbcabcce4
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-16 19:43:50 +00:00
Anas Nashif
a0cf03b1c7 build: add extra dependency for zephyr.lnk and rebuild with new boards
When building an application for a different BOARD, the .link file
was never updated causing issues with linking.
Also, make sure we restart the build process when the board has changed.
This guarantees that the file is recreated when the dependencies have
changed.

Jira: ZEP-239
Change-Id: Ided3a71c03fd8b2c6ab9c2bf8370104cd5071c08
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-16 19:43:50 +00:00
Arkadiusz Lichwa
a5d96e3f84 Bluetooth: L2CAP: Refactor l2cap_chan_get() in l2cap.c
Simplify l2cap_chan_get() in l2cap.c file by removing
CONFIG_BLUETOOTH_BREDR preproprocessor check. Now function serves
only getting channel on LE transport.

Change-Id: I20b72f352ad9d5998cc812b28cb3d6951f91f212
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-05-16 17:00:11 +02:00
Arkadiusz Lichwa
2145907d84 Bluetooth: L2CAP: Handle information response command on BR/EDR
Adds support getting L2CAP information about remote features. To get
the response local stack gets call information request about 'extended
features supported mask' after ACL link is established. Then in
response if 'fixed channels' bits are enabled, next information
request is sent to get details about 'fixed channels'.

Change-Id: I4980c61b12e83fef914e97dea296b0a848d59034
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-05-16 17:00:11 +02:00