Commit graph

42249 commits

Author SHA1 Message Date
Kumar Gala
52c987e941 toolchain.gccarmemb: Add include path for newlib headers
We need to expose the path to the newlib headers that are part of the
ARM embedded gcc at ${GCCARMEMB_TOOLCHAIN_PATH}/arm-none-eabi/include
otherwise we get build errors like when trying to use newlib:

lib/libc/newlib/libc-hooks.c:17:19: fatal error: errno.h: No such file or directory

Change-Id: Iedce526d23e54e54b9cefdfa6ca176fe12ed8090
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-06-09 16:22:28 +00:00
Kumar Gala
7fdd4f758d newlib: Support both namespace protected & nonprotected stubs
Some variants of newlib build and expect namespace protected stubs
(typically having an underscore prefix).  To support such newlib variants
change all the stubs to the namespace protect version and use function
aliases to support the nonprotected namespace version.

Change-Id: I6a4162eca949afec96b152ffe6f60b87c4496c4d
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-06-09 16:22:28 +00:00
Kumar Gala
ab5614ed9e newlib: Drop _fstat implementation
We only need to implement fstat(), so drop the _fstat implementation and
have fstat() match the newlib docs for minimal implementation and only
set st_mode = S_IFCHR.

Change-Id: Iba9042707d1ee5975ab98293cfe20e2996b17c05
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-06-09 16:22:27 +00:00
Bogdan Davidoaia
44ef3c182b i2c: qmsi: remove duplicate I2C_QMSI_SS Kconfig option
Remove duplicate I2C_QMSI_SS option from Kconfig file, as there is no
reason to have it twice.

Change-Id: I602677676419c3f9581a606e8e3ebb889b439eb7
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
2016-06-09 12:26:38 +03:00
Ravi kumar Veeramally
5d98ba37f6 net: apps: Fix ip buf application data length
ip_buf_appdatalen is not set while sending buffer.

Fixes: RTOS-1562

Change-Id: Id423ba5898b9b405d0ca027a74a06a19708841fe
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-06-09 08:53:16 +00:00
Johan Hedberg
c78a5a9aae net: tests: Clean up logging of net_buf tests
Change-Id: I8f82c586c730691c72f8996a25843ba786c73fe6
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-09 10:26:38 +03:00
Johan Hedberg
bab34ea49c net: tests: Add task-fiber test for net_buf_get/put
Change-Id: I48c050254fca913c59bfbfd9a160c7d6ca79d53b
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-09 10:26:38 +03:00
Chuck Jordan
f43d8ef444 doc: unicode trademark and regsiter trademark
Improve this doc to use register trademark and trademark unicode
symbols.

Further, the make rules can benefit from also being passed the argument
ARCH=arc. I see that some zephyr tests use ARCH to select a prj.conf file.

Change-Id: I0650e5d5aba10aa984ebd0be21d0b381dd96dd56
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-06-09 02:52:53 +00:00
Johan Hedberg
1c440f4008 MAINTAINERS: Add web pages for Networking and Bluetooth
Change-Id: I5177609303b658a74ce7b5cff3fd46f644b298f8
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-09 00:51:31 +00:00
Johan Hedberg
a302340593 MAINTAINERS: Add NETWORKING and NETWORK BUFFERS sections
Change-Id: I1a31671fc8e9384504b64ad712064e38a646edcc
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-09 00:51:13 +00:00
Chuck Jordan
db6adc6d2e int: Set default ARC interrupts to lowest priority to start
The code was setting the interrupt priority to 1 for each
vector to start. But I think it might be more appropriate
to set it to the LOWEST priority. Some ARCs will have
upwards to 15 priorities.

Change-Id: I9330ec8df323fe04ba0751faaafa39694f012364
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-06-09 00:34:03 +00:00
Roger Lendenmann
a96e8bb615 Bluetooth: GATT: Fix ccc cfg clear logic on disconnect
The ccc config clear logic should only clear its own cfg value if it is not
bonded and not the other ones.

Change-Id: I1b053b714744bdfb61fdbb445c08dffd3c9e1a1f
Signed-off-by: Roger Lendenmann <roger.lendenmann@intel.com>
2016-06-08 15:19:37 +02:00
Szymon Janc
d75acb44c3 Bluetooth: Remove LE Rand workaround for mynewt firmware
Latest firmware seems to have this fixed and delay is no longer needed.

Change-Id: I3caa8d38fc856964b57049d6704c80ca732ccde5
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-06-08 10:23:22 +02:00
Szymon Janc
6d3ddef1d0 Bluetooth: Fix using uninitialized PRNG
PRNG needs to be initialized right at the begining so that it is safe
to use it from initialization sequence. This fix a race when ECC
emulation code was using uninitiliazed PRNG for public key generation.

Change-Id: Ia396f964b915368cee39ea6be998ef5774062591
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-06-08 10:23:22 +02:00
Szymon Janc
c6fdf09340 Bluetooth: Fix notifying about cancelled connection attempt
If LE Create Connection was cancelled LE Connection Complete event
status is set to Unknown Connection Identifier and doesn't contain
valid remote address. In such case we need to look for connection
object in CONNECT state without using address. There can be only one
object in that state anyway so this is OK also for other error codes.

Change-Id: Ie61d47b8bb7ade6b2ab4db14ee394a65bb4e642b
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-06-08 10:23:21 +02:00
Szymon Janc
609843a527 Bluetooth: Fix comment for bt_conn_lookup_state_le
NULL peer means that first connection with specific state should be
returned.

Change-Id: Ia635584437f948d9dcd82a3619fcf1516d23e0d1
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-06-08 10:23:21 +02:00
Szymon Janc
c443888f3d Bluetooth: Simplify bt_hci_connect_le_cancel
There is no need for local variabel as error code can be returned
directly.

Change-Id: I0ad1bccb75bf1897d210c12d3ad0108f1f909dbe
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-06-08 10:23:21 +02:00
Roger Lendenmann
ee2dfbdcf0 Bluetooth: GATT: Handle ccc cfg values correctly on disconnect
* clear non-bonded ccc cfg values as per BT spec
 * address compare logic
 * check if cfg_changed is defined

Change-Id: Id002f22a6aac1b918d743ef1e73b7e5c4768a229
Signed-off-by: Roger Lendenmann <roger.lendenmann@intel.com>
2016-06-08 06:08:19 +00:00
Johan Hedberg
b76426de6f Bluetooth: Fix never yielding if rx_queue always contains data
It's common for the rx_queue to be written to in ISR context (by the
HCI driver). This means that if there's lots of data coming in from
the driver the rx_queue might get empty very rarely. With the current
code this means that the rx fiber might end up not yielding to other
higher priority runnable fibers for long durations (as long as there's
data in the rx_queue).

To solve the issue, call fiber_yield() explicitly after each processed
buffer from the rx_queue. This way we give other fibers a chance to
run even if there's a heavy flow of data from the Bluetooth
controller.

Change-Id: Ib3dbe6536a62360ad5153ed12eee8489645e4109
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-07 21:38:20 +03:00
Johan Hedberg
9edc472c3e doc: boards/arduino_101: Update BLE firmare for latest MyNewt version
The dependencies for the HCI firmware are now part of the latest
stable MyNewt release, so special editing of project.yml is no longer
needed.

Change-Id: Ia3658ab1da03e208cd5230e0cda4c96a4628e8f0
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-07 05:39:16 +00:00
Szymon Janc
6248407c00 Bluetooth: shell: Fix data_pool declaration
Buffers pass to BT stack need to have minimum BT_BUF_USER_DATA_MIN
of reserved user space data.

Change-Id: Iaeb85faa20b1c5281bfd0331336295ad7cfdd68e
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-06-06 19:09:59 +02:00
Szymon Janc
0bae6e8354 Bluetooth: L2CAP: Include <bluetooth/buf.h>
This header defines BT_BUF_USER_DATA_MIN which is needed for declaring
buffers passed to BT stack and already includes <net/buf.h>.

Change-Id: I6b556be9fb3939a55af0b73d49fc59152d6d6a53
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-06-06 19:03:14 +02:00
Luiz Augusto von Dentz
f54c5b744d Bluetooth: GATT: Remove obsolete flush callback
It is no longer necessary to implement flush callback for long
descriptors since the stack can queue prepare writes this callback
will never be called which makes BT_GATT_LONG_DESCRIPTOR obsolete
as well.

Change-Id: Idca31ba8e4404d2acba760c420394d5adee0a508
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-06-06 12:29:02 +00:00
Luiz Augusto von Dentz
56419a135b drivers/nble: Add buffer pool for prepare writes
This is similar to previous patch which makes the API much more simple
when handling long writes.

Change-Id: Ibd3856863a43927195e23936872a160d5ff94648
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-06-06 12:28:35 +00:00
Luiz Augusto von Dentz
d7e0294227 Bluetooth: ATT: Add incoming buffer pool
This adds a buffer for incoming prepare writes which can be
tunned using BLUETOOTH_ATT_PREPARE_COUNT, these buffers are then used in
execute write to commit the data thus making flush callback obsolete:

[bt] [DBG] bt_att_recv: (0x001159c0)Received ATT code 0x16 len 50
[bt] [DBG] att_prepare_write_req: (0x001159c0)handle 0x0022 offset 0
[bt] [DBG] prep_write_cb: (0x001159c0)handle 0x0022 offset 0
[bt] [DBG] bt_att_recv: (0x001159c0)Received ATT code 0x16 len 34
[bt] [DBG] att_prepare_write_req: (0x001159c0)handle 0x0022 offset 45
[bt] [DBG] prep_write_cb: (0x001159c0)handle 0x0022 offset 45
[bt] [DBG] bt_att_recv: (0x001159c0)Received ATT code 0x18 len 2
[bt] [DBG] att_exec_write_req: (0x001159c0)flags 0x01
[bt] [DBG] write_cb: (0x001159c0)handle 0x0022 offset 0
[bt] [DBG] write_cb: (0x001159c0)handle 0x0022 offset 45

Change-Id: Iae071d7b4b5b042285952da57e3f7a853cf58afb
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-06-06 12:28:11 +00:00
Johan Hedberg
3f4631aeb9 Bluetooth: Kconfig: Reorder Bluetooth options behind single switch
This way we split all Bluetooth options behind a single switch.

Change-Id: Ia7a4b22842be4c0bf94bb73a6b39fd9f606db406
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-06 13:20:37 +03:00
Johan Hedberg
6d93cbb627 net: tests: Refactor net_buf tests for easier extensibility
Change-Id: I23380b1c78b5a9c8814c037a2d48b3505c99f6ea
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-06 11:22:23 +03:00
Johan Hedberg
7029d6ed62 net: tests: Remove unnecessary microkernel ifdef for mainloop
Change-Id: Ifbf41aeece7f889eb8f4e836c59df5e830882942
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-06 11:22:23 +03:00
Szymon Janc
8fc854029a Bluetooth: L2CAP: Fix reject command
Command reject may contain optional data depending on reject reason.

Change-Id: I0665f44e2adfbf03daa1625519530cabe247631e
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-06-06 08:21:06 +00:00
Johan Hedberg
8919bdc573 net: tests: Update net_buf test
Add testing for fragmented buffers to the net_buf test.

Change-Id: Id6c541b86c30ac94931a7086ebb6f1312fbc34f7
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-06 08:17:24 +03:00
Johan Hedberg
d10d1b21f5 net: buf: Don't use recursion for freeing fragment list
Freeing the fragment list by recursively calling net_buf_unref() is
elegant but dangerous. Since we have fairly small stack sizes it'd be
possible to overflow the stack if the user creates a very long list of
fragments (empirical tests showed that some 21 fragments is enough to
kill a 2k stack). Instead, use a while-loop for freeing up the
fragments, thereby guaranteeing a fixed upper bound for net_buf_unref()
stack usage.

Change-Id: Ibfe794fa717d1cddc84365c7b7b9cff4024edbf6
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-06 08:17:24 +03:00
Johan Hedberg
7720f6ed1c net: buf: Introduce support for fragmentation
Introduce support buffer fragment chains that are linked together.
This is done with the help of a flag while the buffer is inside a FIFO
(indicating that the next fragment follows it in the same FIFO) and
with the help of a "next" pointer while the buffer is outside of a
FIFO.

In order to do proper "marshaling" a new net_buf_put() API needs to be
always used when inserting a buffer into a FIFO. Respectively, the
net_buf_get() and net_buf_get_timeout() functions are extended to
support getting buffers from arbitrary FIFOs and reassemble the
fragment chain based on the flags that the received buffers contain.

The insertion of a fragment chain using net_buf_put() into a FIFO is
done atomically with the help of irq_lock/unlock since FIFOs support
multiple writers, however since there's ever only a single reader per
FIFO similar locking is not necessary there.

Change-Id: I0ec579f63ea8d063f50e3f1f4c2e80ec399622d7
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-06 08:17:24 +03:00
Szymon Janc
ab9f70d867 Bluetooth: Add debug with currently set random address
This makes debugging easier when HCI monitor is not used.

Change-Id: I0f4480266fd745163f2fd789bedc3bf8f2a3ceb4
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-06-06 04:46:04 +00:00
Szymon Janc
61c2353fc0 Bluetooth: shell: Fix missing new lines
This makes shell logs cleaner.

Change-Id: I5ecc751e3062b9cb581471c5399dd01decc9fa57
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-06-06 04:45:30 +00:00
Johan Hedberg
118a36fc26 net: tests: Fix returning net_buf to free pool
When using a custom destroy callback it's the responsibility of the
callback of placing the buffer back in the free pool.

Change-Id: I5ff99c32bcb31ccc5eb0fad544d86b0c830e7051
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-05 19:28:54 +03:00
Geoff Gustafson
dbbe089aa1 doc: Fix remote debugging instructions on Arduino 101
If you pass arduino_101_factory, it expects a directory with that name,
but really the directory arduino_101 contains the factory config.

Change-Id: I12ce11c0e32a9d50998b52c2e2c16780b6ce00da
Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
2016-06-03 23:10:38 +00:00
Geoff Gustafson
3875463b36 doc: Fix typos and styling for clarity on coding conventions page
Change-Id: Ifb8a75869ee3d9fa8cab33c146a1fe9bd1fa8f27
Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
2016-06-03 14:49:03 -07:00
Anas Nashif
b67baefefd tests: fix build test configuration
Change-Id: I14f2c0a1c80f0c128db6a5d24830cc31c46308d1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-06-03 18:42:33 +00:00
Baohong Liu
44f0481979 drivers: gpio: Fix a gpio port read bug
address was passed to QMSi port read function, even though
value is needed.

Change-Id: I6b923fdc56114936fb4a0c55c923d6b37884e07c
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-06-03 16:36:25 +00:00
Anas Nashif
6f6504c447 Zephyr v1.4.0
Change-Id: Iedb103de08349c3a046247cbdcf6498126765d72
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-06-03 12:17:40 -04:00
Anas Nashif
659ff5002f sanitycheck: update the footprint data
Change-Id: I6686e46a5f3c5649fc1781119f388feb8179b853
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-06-03 12:09:26 -04:00
Carles Cufi
a155617858 nrf52: Use nrf.h instead of *nrf*.h
Include nrf.h instead of directly using the specific header
required. This will be useful in the future when additional
Nordic ICs are supported.

JIRA: ZEP-377
Change-Id: I7a7257b0aaa5fa0a0d202322c366efbdd1d84458
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-06-03 04:41:26 -07:00
Carles Cufi
7da47626fb nrf52: Provide Nordic MDK compatible macro based on SoC series
Translate CONFIG_SOC_SERIES_NRF52X to NRF52, which is the macro
expected by the Nordic MDK headers.

JIRA: ZEP-377
Change-Id: Ic846e4cddf8146ae9d96bc98d4b12311552dc4f6
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-06-03 04:41:26 -07:00
Carles Cufi
a6119ac9b6 ext: Update and extend Nordic MDK header files
Update to version 8.6.0 and include nrf.h and the additional
files it requires for nRF52. This is so drivers targetting the
nRF Family can include nrf.h directly instead of *nrf5*.h

Origin: Nordic MDK 8.6.0
URL: http://www.nordicsemi.com/eng/Products/Bluetooth-Smart-Bluetooth-low-energy/nRF52832
Maintained-by: External

JIRA: ZEP-377
Change-Id: I71ad9828e1cf95e4d6ef09182a24f00e7d9f01ad
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-06-03 04:41:26 -07:00
Johan Hedberg
6011ad8af5 mailmap: Add more entries for incomplete author information
More commits have ended up in the tree with incomplete author
information. Add entries for these to .mailmap so at least
git shortlog shows them correctly.

Before:

     3  Aceves
     3  ktseng
     1  bitpathe
     1  cacu

After:

    19  Gerardo Aceves
     3  Kuo-Lang Tseng
     1  Bit Pathe
     9  Carles Cufi

Change-Id: I793f1fb0f5aee25ee189d2102ef88ee24ac348d6
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-03 10:52:22 +00:00
Bogdan Davidoaia
86589c60d4 samples: environmental sensing: fix BMP280 kconfig options
Update the prj.conf file, as the driver and Kconfig options for the BMP280
sensor were renamed to BME280 the following commit:
	310ed1e sensor: add support for BME280

Change-Id: If3d81d90c269883aa51ff04a12f8fd1aa444a592
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
2016-06-03 12:00:20 +03:00
Bogdan Davidoaia
73e6eaf040 environmental sensing: add support for MyNewt Bluetooth firmware
Add support for using the MyNewt Bluetooth firmware with the
environmental sensing sample.

Change-Id: I7e5050bc9d1f0edb0df007dd3db4f7e6abd60136
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
2016-06-03 12:00:20 +03:00
Rodrigo Caballero
c00cbb7bbf doc: Edit power management technical content.
Edited content for clarity, correctness, completness, markup usage and style.

Change-Id: I526ecf9ce9a2f516cbb01cc38763ef4f71ee52d9
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-06-03 00:44:10 +00:00
Anas Nashif
8b29fb720c Zephyr v1.4.0-rc3
Change-Id: I74707d577deb7f2001c85730a1bbdf9fe1fc39ac
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-06-02 19:54:05 -04:00
Andrew Boie
9d3bc9a398 MAINTAINERS: add Andrew for sanitycheck
I wrote it, might as well..

Change-Id: Ie85b81754175dd7db7c2b431d6341aa838801f0f
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-02 19:21:44 -04:00