Commit graph

41120 commits

Author SHA1 Message Date
Arkadiusz Lichwa
d7e239c6c2 Python: Tweak with python3 compatibility
Fixes sysgen's python code errors generated during build.
On python2 environment it's ok but *not* on python3.

Change-Id: I4a042c5d5203e546b65540f7020ae75677d102f8
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-05 20:14:20 -05:00
Oleg Zhurakivskyy
cf59dda4a5 Fix compilation with CONFIG_DYNAMIC_INT_STUBS
Change-Id: I153747d441e8efe7a2941b01ef0cedda7e58237c
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2016-02-05 20:14:20 -05:00
Szymon Janc
b70ba38325 drivers/simple: Use ccflags-y instead of EXTRA_CFLAGS
According to section 3.7 of Documentation/kbuild/makefiles.txt, using
EXTRA_CFLAGS in Makefiles is "still supported but their usage is
deprecated."

Change-Id: Iec6121b6b79a6a8c58ac26b8b08a542eac575c22
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
2016-02-05 20:14:20 -05:00
Jukka Rissanen
702a596594 net: Add kconf for networking
Change-Id: Id956b7debe4564613007d934636501c98ba1851d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:20 -05:00
Jukka Rissanen
4c53ef0b93 net: Initialize the IP stack
Call relevant Contiki uIP functions to setup the internal
structures in the uIP stack.

Change-Id: If64df1543d66d0ff378c12f371aa2c06fb2fde0a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:20 -05:00
Jukka Rissanen
6ba3a02eed net: uip: Avoid casting warning when accessing link local addr
The uip_ds6_nbr_get_ll() returns const addr but we need to
overwrite the addr so cast is needed here.

The const pointer returned by nbr-table.c:nbr_table_get_lladdr(),
which is called by uip_ds6_nbr_get_ll(), actually points to
neighbor cache which is dynamic and will never be stored in read
only memory, and thus is safe to cast to non-const.

Change-Id: Ifb47e4cb75054b0a9717304dc1d0bc497fee1e87
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:20 -05:00
Jukka Rissanen
251a45b602 net: Use our network buffers instead of global ones in Contiki
This mega patch changes how Contiki uses buffers. In standard
Contiki there is only couple of static and global buffers.
This makes the stack non-reentrant and only usable in one
thread. This patch replaces the global buffer with buffer
supplied by caller (net_buf.h). The Contiki stack is still not
fully re-entrant after this (packet reassembly needs more TLC)
but it is a good start.

Change-Id: I63abc230b36b14f33f687d3ef64cffb0f3a69f5d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:20 -05:00
Jukka Rissanen
da36c6371c net: Simple socket API introduced
The network context defines a network connection.

Change-Id: I29a186be6c9de9d824f10b6442fa1dfd3711d24d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:20 -05:00
Jukka Rissanen
1cf34680cb net: Using correct defines to configure the net stack
Change-Id: Ia2f5f8e496d11c73125aa3e74c0f9ad48141c712
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:20 -05:00
Jukka Rissanen
4f5723a5d0 net: Network initialization and tx/rx functionality
Functions to receive data from apps and transmit it to network, and
receive from network and pass data to apps.

Change-Id: I1b1b8c041e6c5e20294081d2cd403636e9909cdc
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:20 -05:00
Jukka Rissanen
3633410706 net: uip: Pack and alias network buffer related structs
We need to make sure that the structs that are cast to received
network buffer are packed. We also need to enable __may_alias__
attribute for these structs in order to avoid "dereferencing
type-punned pointer" warnings.

Change-Id: Iad65612fd176ed41d66c6fa05c50151001a406eb
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:20 -05:00
Jukka Rissanen
c6c89fbdc6 net: uip: Avoid compiler warning about unused variable
Variable called "initialized" is only needed if the nameserver
pool size is bigger than 1 (UIP_NAMESERVER_POOL_SIZE > 1).

Change-Id: I1bce30bd783f76e56f12b8e76b29c932ab5765af
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:20 -05:00
Jukka Rissanen
c5b936a7c8 net: uip: start_periodic_tcp_timer() not needed
The function start_periodic_tcp_timer(void) is only needed if one
has UIP_TCP or UIP_CONF_IP_FORWARD defined.

Change-Id: I5185bfbdb998ec3d6985681a85c26e094406c404
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:20 -05:00
Jukka Rissanen
bb69910e2a net: uip: Added missing function prototypes to rtimer
Real timer implementation needs function prototypes.
This is just to satisfy the compiler. Needs more TLC.

Change-Id: I39baa7cfe69d28aa1f330089e22144df286c0a0d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:20 -05:00
Jukka Rissanen
ce302ebc8b net: uip: Callback is only defined for RIME support
We do not need RIME so commenting out the callback call.

Change-Id: I09cd078a3741c6a8e5f4f8fd6387203e6107f218
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:20 -05:00
Jukka Rissanen
1e8cbd99ee net: uip: psock.h is only needed for TCP connections
Comment out the psock.h include if TCP is not used.

Change-Id: I83e537b410b867a5ea30fb60c012521df351d05f
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:20 -05:00
Jukka Rissanen
75d4b3f0c2 net: Initial networking support
Base is from Contiki git tree at git://github.com/contiki-os/contiki.git
commit 6ac939bc58ea76aa37e9b86af55ad51cfc3434e9

This one does not do anything useful yet. It sets the baseline for
subsequent patches.

Change-Id: I7078c938dd59188beceaf47721afaa521d8bde1a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:20 -05:00
Tomasz Bursztyka
9c5ac4a107 git: Update .gitignore
- host/ disappeared
- let's ignore .cmd files
- let's ignore include/config directory

Change-Id: If8f4e46b2e56a3d0d1a808ca8ef8c0672e5941d1
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-05 20:14:20 -05:00
Anas Nashif
5005986d06 Update default configs
- Use Zephyr OS instead of Tiny Mountain
- Update with latest config options and values

Change-Id: I64084c37ce28b25587462468de86e4a904749433
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:20 -05:00
Anas Nashif
aaa84454d0 Rename Tiny Mountain -> Zephyr OS
Change-Id: I44c71d7e8270627f48cfb047312eb70dc3215ce8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:20 -05:00
Allan Stephens
ab80db110f Rename enlist_timeout(), delist_timeout(), and force_timeout() APIs
These private APIs now follow Zephyr OS naming conventions.

Change-Id: If9de2528d740eb4ff16a69649564592a5f047c61
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:20 -05:00
Allan Stephens
d247c26b20 Rename enlist_timer() and delist_timer() private APIs
APIs now follow Zephyr OS naming conventions.

Change-Id: I554e63b989029e08a1d215c9b5a511a32a91e42c
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:20 -05:00
Allan Stephens
a7e20d2b0a Rename set_state_bit() and reset_state_bit() private APIs
APIs now follow Zephyr OS naming conventions.

Change-Id: I154536d2c40784ae83a936c55cf748173343c681
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Allan Stephens
9e675cf581 Rename private microkernel APIs
The following APIs now use an approved Zephyr OS prefix:

_pipe_init
_mem_map_init
_mem_pools_init (also loses plural aspect)
init_node
init_drivers
kernel_init
kernel_idle

Change-Id: Ic380c56b09cb870d44c51fd12c6c0e0a13e9b4e3
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Allan Stephens
1860cb636d Rename workload_monitor_calibrate() to _k_workload_monitor_calibrate()
This API now uses an approved Zephyr OS prefix.

Change-Id: I3ec6d3ac3a3b7ae2edd1024a39ce73796f060fba
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Allan Stephens
e4bc9ce4ab Rename workload_time_slice_set() to sys_workload_time_slice_set()
This API now uses an approved Zephyr OS prefix.

Change-Id: I79c7e82e73653315ba1a609edbf11336694b9dd4
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Allan Stephens
6c2da86281 Rename scheduler_time_slice_set() to sys_scheduler_time_slice_set()
This API now uses an approved Zephyr OS prefix.

Change-Id: I1041b982492ea7b76213e3b57cf28a9f17e7fd9d
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Allan Stephens
fd117970d3 Eliminate duplicate declarations of private microkernel APIs
These declarations do not need to appear in minik.h, since it
already gets them by including kernel_main.h.

Change-Id: I35ff9cc2d371c60a08a7cf8bde289f467a259dea
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Allan Stephens
91bb39de6d Remove microkernel task routines from private API
These routines are only referenced in a single file.

Change-Id: I55d2976d1db612bdbb89224b89b84bfcc5b9d707
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Allan Stephens
99001f8518 Eliminate duplicate declarations of private microkernel timeout APIs
These 3 declarations no longer appear twice in the same include file.

Change-Id: Ia77b84c29741978bea2d74b44d66e9929d2769c4
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Allan Stephens
c82e6e8ae3 Cosmetic changes to sys_kernel output
Eliminates confusing references to "channel", and improves
readability of project output.

Change-Id: Ib4f699caae5a015832207a408bd168903e791756
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Allan Stephens
b2834dd29f Cosmetic changes to app_kernel output
Eliminates reference to obsolete "channel" terminology.

Change-Id: Icfae1e0ae7ca1b2b723baa5c79848251cb25995c
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Allan Stephens
86e4595da5 Cosmetic changes to private microkernel APIs
- Removes unnecessary comment about API being private.
- Removes misleading comment about processor-specific APIs.
- Makes purpose of "service codes" clearer.

Change-Id: I4715609f328b9fa7f334a1b4c3c21441111f228d
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Allan Stephens
f9b2c757db Rename K_ticker() to _k_ticker()
This API now uses an approved Zephyr OS prefix.

Change-Id: Ia16829d908da9bfaa82f82da47b583a0004cae7d
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Allan Stephens
a5f2ccf286 Remove microkernel's tick handler from public API
This API is now a private microkernel API.

Change-Id: I5b26aa927d42923f2076d06f9bdfef371572543e
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Allan Stephens
893726ccb6 Eliminate duplicate registration of system tick event handler
Since the system generator pre-registers K_ticker as the handler
for the system tick event, there is no need for the timer driver
to re-register it at run time.

Change-Id: I7f20c19e5c6ccc7dfb6117aa2d2647b9dec0e549
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Allan Stephens
063a4d160f Eliminate samples/libc directory
The new build system no longer uses this directory, since it rebuilds
the (minimal) standard C library every time a project is built.

Change-Id: I1ca6b949bfa260f1d262276be653ddd6bd1cc53b
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Allan Stephens
c718f32a49 Eliminate remainder of sanity check support for obsolete -T option
There is no longer any need to retain any support for this option
as a "do nothing" for backwards compatibility reasons.

Change-Id: I4b8fa727f80effdcc3fd92007fc9c50654291175
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Dirk Brandewie
5423ba4dfb init.h: Add the ability to set driver_data at build time
Allow the delevoper to specify the address of the driver instance data
object at build time.

Change-Id: I6b311cfc4d38b3425f6283d87d2da65aceb42faa
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:14:19 -05:00
Szymon Janc
b47d14a273 Bluetooth: Fix NULL pointer dereference in flush_cb
conn was never set in struct flush_data passed to flush_cb.

Change-Id: I2a16479bf7660a96f705d1194245da02ee6eeff5
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
2016-02-05 20:14:19 -05:00
Andrei Emeltchenko
b85f2e8264 Bluetooth: Improve beacon sample documentation
The source is included to the manual and putting more comments helps
to understand the code.

Change-Id: Iefd6db2abf6070fd8c3fabdaf4946bdd7a045544
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:14:19 -05:00
Andrei Emeltchenko
fab2d401a1 Bluetooth: Document bt_init and bt_start_advertising
Functions bt_init and bt_start_advertising are referenced in the
doxygen documentation. Documenting them gives better overview.

Change-Id: I70cb19a0a3232ce5abfb22c3a352bf3868c6f8fb
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:14:19 -05:00
Andrei Emeltchenko
4d73a264bc Bluetooth: Fixing beacon sample build
Fixes compile errors:
...
Makefile:36: /make/env/defs.base: No such file or directory
Makefile:47: /target/make.ukernel: No such file or directory
make: *** No rule to make target '/target/make.ukernel'.  Stop.
...

Change-Id: I693a939510b732ac810d5af756422c58e3f0c3ab
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:14:19 -05:00
Andrei Emeltchenko
f627b881d4 Bluetooth: Update README in samples
Fix typo and reformat test to make it more logic and reflecting
doxygen documentation.

Change-Id: Id869f0131132c9287eab71d11ae40d194a20ca20
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:14:19 -05:00
Luiz Augusto von Dentz
5be2139435 Bluetooth: Add long attribute to peripheral sample
This is useful for testing prepare and execute writes as well as read
blob:

> ACL Data TX: Handle 42 flags 0x00 dlen 7
      ATT: Read Request (0x0a) len 2
        Handle: 0x0021
< ACL Data RX: Handle 42 flags 0x01 dlen 15
      ATT: Read Response (0x0b) len 64
        Value: 56656e646f7200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
< ACL Data TX: Handle 42 flags 0x00 dlen 9
      ATT: Read Blob Request (0x0c) len 4
        Handle: 0x0021
        Offset: 0x0040
> ACL Data RX: Handle 42 flags 0x02 dlen 15
      ATT: Read Blob Response (0x0d) len 10
        00 00 00 00 00 00 00 00 00 00                    ..........

Change-Id: If3da3097e3498e79e644b5721aaf63708fe6ab72
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:19 -05:00
Luiz Augusto von Dentz
7250393678 Bluetooth: Add macro for CEP and long descriptors
Add BT_GATT_CEP and BT_GATT_LONG_DESCRIPTOR so which can be used by
a task to declare long attributes.

Change-Id: I37a0bb1851b60f3cdfa7e2f00ade70d5c344abbf
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:19 -05:00
Luiz Augusto von Dentz
66d6cf77ce Bluetooth: Fix GATT CEP not using 16 bits
Characteristic Extended Properties has 16 bits not 8 bits as value.

Change-Id: I307fd27a6d589d6614829df178ff890301a9b6be
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:19 -05:00
Luiz Augusto von Dentz
14ff92cea0 Bluetooth: Handle ATT execute write request
This introduce a new callback called flush to bt_gatt_attr to indicate
when and attribute can cache data, the data is automatically flushed if
regular write request happens and in case of prepare write it checks if
flush is supported otherwise return an error, then upon receiving an
execute write it perform flush over the entire database and respond
with result:

< ACL Data TX: Handle 42 flags 0x00 dlen 6
      ATT: Execute Write Request (0x18) len 1
        Flags: Immediately write all pending values (0x01)
> ACL Data RX: Handle 42 flags 0x02 dlen 5
      ATT: Execute Write Response (0x19) len 0

Change-Id: I2c47f962858b8a741bf40509a648fe2cd6755691
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:19 -05:00
Luiz Augusto von Dentz
186b133028 Bluetooth: Handle ATT prepare write command
Call attribute write callback taking into account the offset and
generate proper responses:

> ACL Data TX: Handle 42 flags 0x00 dlen 69
      ATT: Prepare Write Request (0x16) len 64
        Handle: 0x0021
        Offset: 0x0000
          Data: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
< ACL Data RX: Handle 42 flags 0x01 dlen 15
      ATT: Prepare Write Response (0x17) len 64
        Handle: 0x0021
        Offset: 0x0000
          Data: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
> ACL Data TX: Handle 42 flags 0x00 dlen 23
      ATT: Prepare Write Request (0x16) len 18
        Handle: 0x0021
        Offset: 0x003c
          Data: 0000000000000000000000000000
< ACL Data RX: Handle 42 flags 0x02 dlen 23
      ATT: Prepare Write Response (0x17) len 18
        Handle: 0x0021
        Offset: 0x003c
          Data: 0000000000000000000000000000

Change-Id: I4e5d8e8c92fdbf624d1588345878f0b678472401
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:19 -05:00
Luiz Augusto von Dentz
537e65b05b Bluetooth: Update documentation of GATT API
This makes use of new guidelines to document the GATT API.

Change-Id: I5544f449e11dd72c68b0efb15bd06db44ec30279
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:19 -05:00