Commit graph

19237 commits

Author SHA1 Message Date
Jukka Rissanen
5205172dd4 net: contiki: Fix debug prints in ICMPv6 handling
Change-Id: I2a1df0dfb44ee6fbd94535d93a7504fa2c7f7f43
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:25:32 -05:00
Andrei Emeltchenko
bb34c219ce drivers/nble: gatt: Fix loosing errcode and wrong comparision
Fix assigning negative error code to unsigned int and then compare it
against zero.

Change-Id: Idedaf91dda20a38806ee81d5c488ae8b46c8feff
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:25:32 -05:00
Andrei Emeltchenko
03969be306 drivers/nble: gatt: Remove unneeded check
For size_t it is hard to be negative in the following check
...
if (!data || len < 0)
...

Change-Id: Ib995d568e10aa1e3cbaf28f46d267addb876f073
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:25:32 -05:00
Andrei Emeltchenko
8e4ca413fd drivers/nble: Add debug tables with function strings
Since RPC to the NBLE is designed in a such a way that it is nearly
impossible to find out which packet received, create debug tables in
debug configuration. The tables store strings of function names
referenced by function index in a table, created the same way as RPC.

Sample output is:
...
bt: rpc_deserialize (0xa80082c4): on_nble_up
...

Change-Id: Ic91fcf73753aa9b78bdbacd5c8a0279823a4679e
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:25:32 -05:00
Szymon Janc
6645d3f485 Bluetooth: GATT: Remove destroy callback from bt_gatt_discover_params
Instead of destroy callback, call discovery_func with NULL attribute to
indicated that discovery has completed. This makes it clear when
discovery is completed and parameters used for it are no longer used.
Thanks to this application doesn't need to abuse user data destroy
callback for detecting if discovery has completed.

Also note that bt_gatt_discover doesn't take any user data parameter
and that destroy callback was acctually called with discovery
parameters.

If application would require to pass user data along with parameters
it may use CONTAINER_OF macro along with bt_gatt_discover_params.

Change-Id: Iec4eb9795975ef2555502e13a682e13ff37742e0
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:25:32 -05:00
Louis Caron
bcb61c6630 Bluetooth: add the connection parameters to le conn info
Applications that need it can retrieve the connection
parameters at any time, connected callback for example,
and eventually handle the connection update callback or
not, this gives maximum flexibility for handling these
parameters and requesting change.

Change-Id: Iba7d30ade045875ebc721fd332e031d9008e248c
Signed-off-by: Louis Caron <louis.caron@intel.com>
2016-02-05 20:25:32 -05:00
Jukka Rissanen
9f8ed3a6e0 net: Make sure timer fiber does not print stack usage too often
Sometimes the timer fiber was flooding stack usage to console.

Change-Id: I3518cc08f3c8d3ed8ccc19e7bbb6356811e28ab7
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:25:32 -05:00
Jukka Rissanen
0cb73a1b9c net: Stack analyze function fixed
The stack analyzer works now same was as the one found in
Bluetooth sub-system.

Change-Id: I75e393882db6ba83f991d37aa2bf81d960b61231
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:25:32 -05:00
Luiz Augusto von Dentz
629dbb624e drivers/nble: Add initial implementation of bt_gatt_register
Change-Id: I2f72c203da9b99841cd83b26b25fbf435c54baf5
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:25:32 -05:00
Luiz Augusto von Dentz
2d220fdcf7 drivers/nble: Increase buffer size to 384 bytes
This is the MTU supported by the firmware and is necessary in order to
register bigger services such as vendor specific in the peripheral
sample.

Change-Id: I24b2f9e983d8e2da22d41a40f538f0daf7d526d0
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:25:32 -05:00
Jukka Rissanen
9e79aa6f9d net: apps: echo-server refactoring to work in microkernel
The echo-server uses only one code base for both microkernel
and nanokernel.

Change-Id: I7abdf76dc13c31e4f91d0fd9d3b870ffe20ac71b
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:25:32 -05:00
Jukka Rissanen
40bef01a5f net: apps: echo-client refactoring to work in microkernel
The echo-client uses only one code base for both microkernel
and nanokernel.

Change-Id: Ieaf9a969319537286181ba333e3a05bfa0e9363a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:25:32 -05:00
Jukka Rissanen
de767512d7 net: apps: Refactor echo-client compilation
Separate setup for different low level bearer. By default the
Makefile will create version suitable for qemu testing using
slip. If one writes "make NET_IFACE=802154" then IEEE 802.15.4
radio specific settings are activated.

Because echo-client does not contain any processor specific
settings, remove the ARM config files and rename the x86
specific ones.

Change-Id: I0608b6172bdd044dd49dedf86477ef8a31391a23
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:25:32 -05:00
Jukka Rissanen
396766531e net: apps: Refactor echo-server compilation
Separate setup for different low level bearer. By default the
Makefile will create version suitable for qemu testing using
slip. If one writes "make NET_IFACE=802154" then IEEE 802.15.4
radio specific settings are activated.

Because echo-server does not contain any processor specific
settings, remove the ARM config files and rename the x86
specific ones.

Change-Id: I2caf26979f32496c6efb4dd1f625a60e3e5f6744
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:25:32 -05:00
Jukka Rissanen
c12fcb1bbd net: Clarified the neighbor discovery option in Kconfig
Change-Id: I31a725450120c29de33246f8602f97c8b4c852c7
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:25:32 -05:00
Szymon Janc
d3a05596f8 Bluetooth: samples/tester: Fix invalid use of struct bt_uuid
struct bt_uuid is a 'tentative' UUID type and shouldn't be used for
UUID storage. Since tester application doens't know type of UUID
on compile time we need to have a common extra type that would
allow to store both 16 and 128 UUIDs.

Change-Id: Ia2775a457a732cf03ba7e4a59e6d654fcd1ab05d
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:25:32 -05:00
Szymon Janc
87d8bfeaa2 Bluetooth: Add clarifying comment about usage of struct bt_uuid
This type should only be used as a pointer.

Change-Id: Icf656f310344cecbde527e809af6d00dcfc7ef82
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:25:32 -05:00
Ravi kumar Veeramally
a4963cea35 net: apps: Update echo-server and echo-client IPv6 address
Address configurations for different Kconfig options is difficult
to test under different environments. Make it simple at the moment.

Change-Id: I689649b11b4ccb1cf1ff0e90720fa03b6dc3656b
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-02-05 20:25:32 -05:00
Ravi kumar Veeramally
838961af9a net: apps: Modify echo-client to send data only after reception
Modify echo-client to send packet after packet received from
server and wait unlimited ticks. Current behaviour flood messages
to server irrespective of reception at server end. Modified
behavior only for nanokernel at the moment.

Change-Id: I6aa20c5b9fc9d6d1cf8f996e90735f5d2b986e5a
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-02-05 20:25:32 -05:00
Luiz Augusto von Dentz
94210770fd drivers/nble: Only call ready callback once get_version completes
There could be commands that depend on the firmware version the stack
needs to wait until version is complete.

Change-Id: If8ded19c4cd4eb3c33df64b3cde29da11b0de8df
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:25:32 -05:00
Andrei Emeltchenko
6948fc437a uart-pipe: Fix using fifo_fill instead of poll_out
For non-interrupt transfers poll_out should be used, This fixes data
lost issues on a real UART hardware like Arduino 101 and Galileo
boards.

Change-Id: Ic7a5d055941d83f9d62cbea9e911ce25730ed7b6
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:25:32 -05:00
Andrei Emeltchenko
d2c87d1e86 Bluetooth: nble: Update NBLE RPC interfaces
Following change in NBLE firmware update interfaces and structures.

Change-Id: I47df2374961d13fabc54ee8e446a155a65999072
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:25:32 -05:00
Jukka Rissanen
e6bffc88d2 net: Fix the statistics printing in timer fiber
Timer fiber printed statistics too fast.

Change-Id: Icb24e9866543316de3491edf89298350d9bee994
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:25:32 -05:00
Jukka Rissanen
6956fe1670 net: samples: Fix echo-client compile error for microkernel
Change-Id: Id1a40244543744b60971dd6321edf1aadd02108a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:25:32 -05:00
Jukka Rissanen
17856bb9a7 net: samples: Fix microkernel echo-server and echo-client
The echo-server and echo-client samples did not compile correctly
if one wanted them to work correctly using "make server" and
"make client" commands.

Change-Id: I955c6cc23c3192fcb1dfcfbda7df53050a71501f
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:25:32 -05:00
Johan Hedberg
0270fda003 drivers/nble: Fix error return for NRPA advertising address type
Currently the nble implementation doesn't support advertising with an
NRPA.

Change-Id: I80e3e2a72d73d23f37966eb429a8ffb8d8c50bf5
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:31 -05:00
Johan Hedberg
479d25d035 Bluetooth: Rename BT_LE_ADV_ADDR_PUBLIC to BT_LE_ADV_ADDR_IDENTITY
In anticipation of supporting a local static random address in the
future it makes more sense to call BT_LE_ADV_ADDR_PUBLIC
BT_LE_ADV_ADDR_IDENTITY.

Change-Id: I4826f1dfb50b54e13a35cbe7ee74e28641c81ad1
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:31 -05:00
Andrei Emeltchenko
8baedd3a6b Bluetooth: tester: Update configuration for NBLE
Enable CONFIG_CONSOLE_HANDLER and disable CONFIG_UART_CONSOLE since
tester reuses that UART.

Change-Id: Ia440d75f66d01f29d10b5d6a68fc052fd8b57fa7
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:25:31 -05:00
Andrei Emeltchenko
e539c3b99c Bluetooth: nble: Remove enabling debug by default
Enabling BLUETOOTH_DEBUG enables also serial console conflicting with
tester reusing the same UART.

Change-Id: I8058a019e61146ff05cc44ab543cf6ec9ff418ef
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:25:31 -05:00
Andrei Emeltchenko
78b0b6dd62 Bluetooth: nble: Fix warnings when debug is disabled
Use pointers instead of potentially unused var.

Change-Id: I07bcb788b0f9e5e100c913c48d7d38464565157a
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:25:31 -05:00
Johan Hedberg
08c594049d Bluetooth: Update documentation of BT_DATA & BT_DATA_BYTES
Change-Id: Ia523cc2f0602dcd9b7c0877121c678b049d64956
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:31 -05:00
Johan Hedberg
bd0065b3bd Bluetooth: samples: Use sizeof() to evaluate fixed name length
This way we avoid bugs coming from wrongly (human) counted length.

Change-Id: I95eb87a78fc12d4c5e083ce1c65d8b690ad8db78
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:31 -05:00
Johan Hedberg
7d8303bbbf Bluetooth: Introduce BT_DATA_BYTES convenience macro
This way we don't need a special BT_BYTES macro and avoid bugs coming
from wrongly counted number of bytes (which is now evaluated at
build-time).

Change-Id: Ic6319234a816fe2fab6229b3bb980d0e3503e241
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:25:31 -05:00
Dan Kalowsky
08dd836791 board : arduino_101 : fixing flash scripts
Fixing the flash script so that we only have one for the process of writing
out the ROM and the OS images.

Change-Id: I6fc8bd8eee553a17c0036da3ce5b89510f3b57d8
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:25:31 -05:00
Dan Kalowsky
eb38faa75b doc : arduino_101 : adding image for JTAG connection
Adding in an image for locating the JTAG connector on the Arduino 101 board,
and a visual pointer towards the JTAG silkscreen dot.

Added figures for the JTAG connector.

Change-Id: I57ed5608bf2f3ded325965ec77142e3376f386ed
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-05 20:25:31 -05:00
Dan Kalowsky
0e053a5f4d doc : arduino_101 : adding serial debug information
Adding in a section for attaching a serial cable, and links for two that we
have found that work for us.  Adding in links to both serial cables.

Added figures of the pins with appropriate callouts.

Change-Id: Ibae64811f1c32f6a8e82be17abbc91df6c53219a
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-05 20:25:31 -05:00
Dan Kalowsky
f60bfa00f6 doc : arduino_101 : style fixes
Fixing a few notes that are not being properly displayed.

Change-Id: I60f8a8615ee93ba391a99a819aa1761e6713e51b
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:25:31 -05:00
Anas Nashif
fe9eae95e8 link in external application library
When building an application and external build process of an
application specific library can be started by the application which
generates a .a file that will be linked at the final stage with the
Zephyr kernel.

Change-Id: I06fa1a10605ab032801ead8f5ee8d0c85c0bea5c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:31 -05:00
Szymon Janc
b5c7b1baca net: buf: Fix compilation with newlib libc
newlib is declaring __unused in cdef.h which was conflicting with
__unused member in struct net_buf. Use _unused name instead.

In file included from /work/Zephyr/project/zephyr-project/net/buf.c:27:0:
include/net/buf.h:38:14: error: declaration does not declare anything
    [-Werror]
           int __unused;
               ^
cc1: all warnings being treated as errors

Change-Id: I2df189a4d4aee0f982c2d28d24847052f6168d45
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:25:31 -05:00
Jean-Paul Etienne
4f303a9967 eth_dw: fix compilation issue in eth_dw.c driver
got the following compilation error when trying
to compile the Synopsys DesignWare Ethernet driver:
In file included from drivers/ethernet/eth_dw.c:25:0:
drivers/ethernet/eth_dw_priv.h:27:28:
fatal error: contiki/ip/uip.h: No such file or directory

Fixed by adding correct include path in ethernet
Makefile

Change-Id: I8ea50e3ffb89e54349140de124f68d196a412f8e
Signed-off-by: Jean-Paul Etienne <jean-paul.etienne@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:31 -05:00
Andrew Boie
933315e719 arduino_101: add small script for flashing boot rom
Change-Id: I10ea983b285dfaf5449e61951a2e724b7f5a6890
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:31 -05:00
Andrew Boie
e9ba72a552 arduino_101: include custom boot rom built from QMSI
Change-Id: Icd10631e8cd4bed67cbe2fa3db48c7a619b11c9b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:31 -05:00
Anas Nashif
20fe678782 link binary with extra options provided by app
A custom linker script might have references to files and defines
provided directly by the application, the EXTRA_LINKER_CMD_OPT
variable can be exported by the application with the needed
includes to satisfy the linking process.

Change-Id: Ic0b3dffa9a6c31fe8ef28f4f45c30266e7327e06
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:31 -05:00
Anas Nashif
df3bd11e3c toolchain: check if both __aligned and __packed are defined
Avoid build conflict when those are defined by someone else.

Change-Id: I1bdf4064ec2180fff311c2b7a34363c53f438602
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:31 -05:00
Louise Mendoza
9f39a8aee9 build: fix fixdep warning.
The data type returned by sizeof in windows is different to Linux.
This commit cast the value to the largest type to avoid a warning
when compiling on MinGW and Linux.

Change-Id: I4ce50f0b62dd614b1d180adea5aa2679032643e0
Signed-off-by: Louise Mendoza <yonattan.a.louise.mendoza@intel.com>
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:25:31 -05:00
Anas Nashif
105d8c68a2 Zephyr 0.9.0-rc2
Change-Id: Ie9a039141841ee62a596117aa857c63c1a00e323
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:30 -05:00
Anas Nashif
4f5b4cb92c benchmarks: reorg configuration and split float tests
Change-Id: Ic988b5028eaffb0a1c2ed52d28f1eddb98c15130
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:30 -05:00
Anas Nashif
872676c735 build: fix parallel builds of applications
When building with more than 1 job, we were getting:

make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.

Trying to fix this in the Makefile resulted in dependency issues and unsatisfied
dependencies in the compilation and build chain.

Change-Id: Ic73d089cf6a0a0d7b6fd83908b8144c34af25582
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:30 -05:00
Anas Nashif
8429a29a36 doc: fix references to old board names
Change-Id: I9fd64925095ceb7fe66f276b3633ae7446d68019
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:30 -05:00
Anas Nashif
78e1b0efe1 print message when flashing/debugging not supported
Change-Id: I5ba5e08d534a4e94999fa192a3e5addc039df1ed
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:30 -05:00