Commit graph

42249 commits

Author SHA1 Message Date
Geoffroy Van Cutsem
3c40c4eaaa doc: fix Arduino 101 documentation formatting issues
Fix a few small (mainly rendering) issues with the arduino_101.rst
document:
- A few paragraphs had the wrong indentation
- A sub-list did not appear as such (serial port settings)
- Remove the 'Bibliography' section which appears empty
- Fix IO-3 and IO-5 pin names in note

Change-Id: I60ad839de1901167b6793254186836015502aaab
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2016-05-20 16:18:38 +00:00
Anas Nashif
b8de79239f samples: Use GPIO_0 as the default instance
Change-Id: Ibe9d0add007487cd47fd2a26df992ff9614883b3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-20 10:54:06 -04:00
Luiz Augusto von Dentz
39a4b17f3b console: shell: Print empty string if no help is passed
Change-Id: I5469ea18e878b6053caa911350426853477b8a6a
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-05-20 16:08:21 +03:00
Luiz Augusto von Dentz
a1094e92d6 console: shell: Add check for command help
This checks if the command string is either NULL or empty since in these
cases there shouldn't be necessary to do any lookup.

Change-Id: I27e6d5b07ab4000cce93a4d1f7952e3c57672657
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-05-20 16:05:17 +03:00
Luiz Augusto von Dentz
c643b426ac console: shell: Fix use of strncmp
Contrary to strcmp strncmp does not match the entire string only the
initial bytes passed as len thus causing a prefix match not a exact
match logic.

Change-Id: I85f96beb2249223f44c81c4efd6bd01bf2033a2e
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-05-20 16:05:17 +03:00
Grzegorz Kolodziejczyk
f1c5282833 Bluetooth: tester: Fix handling execute write error responses
This patch fixes returning invalid offset, invalid attribute length
error. Error should be set during prepare write and returned in
response to execute write request as error response.

Change-Id: I78c57abc5f6f2fbd4a2c0fbb1ee6532212679a36
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-05-20 11:31:33 +00:00
Andrei Emeltchenko
1be6e1cb7d drivers/nble: Skip not matched UIIDs in GATT discovery
Firmware does not filter by UUID so we need to do this ourselves.

Change-Id: I55808836369194fbc5ea7c35db2c72fcda75e4eb
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-05-20 11:06:52 +00:00
Andrei Emeltchenko
8d7fb04546 drivers/nble: Add debug uuid print in bt_gatt_discover()
Change-Id: Iaf400c1020cf29df780114428c61f9e91c6aac0c
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-05-20 11:06:35 +00:00
Mariusz Skamra
999c69f23d Bluetooth: Make ES Trigger Setting Descriptor non-writable
This removes optional write permission to the ES Trigger Setting
Descriptor. These setting can be set by application.

Change-Id: Ic62ebd909c10601955e67b38303b8c852971203e
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-05-20 11:06:26 +00:00
Jukka Rissanen
8bd355c49f net: tcp: Fix the TCP client not sending multiple SYN
TCP client only sent one SYN and if that was lost, the connection
was not initiated correctly.

Change-Id: Iebb0b719a3d01d2e4f56ed911b3ed94643e53941
Jira: ZEP-385
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-20 12:59:08 +03:00
Arkadiusz Lichwa
ade99e7e79 Bluetooth: L2CAP: Handle disconnection request from peer
Adds functionality to clean and release allocated BR/EDR CoC channel
after remote requests to disconnect.

Change-Id: Ie6657b8e72b2958ec79e9a5637f0dddf4bb98a5e
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-05-20 06:54:10 +00:00
Rodrigo Caballero
390bfbab1f doc: Change Freescale to NXP to correct branding.
Jira: ZEP-386
Change-Id: I98909c1d6b07c44ab3733a8da5dc6d467c6482e8
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-05-20 02:09:35 +00:00
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