Commit graph

9345 commits

Author SHA1 Message Date
Benjamin Walsh 6469e578cb irq: do not use _inline versions of irq_lock/unlock
Standardize on using the irq_lock/irq_unlock (non-inline) symbols
everywhere.

The non-inline versions provide absolutely no benefits, so they will be
removed in a subsequent commit, and the inline versions will have their
_inline suffix removed.

Change-Id: Ib0b55f450447366468723e065a60adbadf7067a9
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:21 -05:00
Benjamin Walsh a73af53186 timers: prevent duration of 0 in timer_start/restart
Basically, this does not work anymore:

  task_timer_start(<timer>, 0, X, <sem>);

since it does not make much sense to have a timer with an expiry of 0
ticks. The code internally was setting the duration to be equal to the
period anyway. So, to achieve the same behaviour, do this:

  task_timer_start(<timer>, X, X, <sem>);

This has the positive side-effect of removing a small block of logic
that was handling the cases where duration was 0.

Change-Id: Ic4af4a17a129f14af4fea445bcaddabe89c27131
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:21 -05:00
Benjamin Walsh a5a6ba8e4e microkernel: rename _k_server parameters
Reflect the fact that they are not used.

Change-Id: I6ea83cb2c7532e10988cbf4350edccb78f444328
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:21 -05:00
Benjamin Walsh aa78793e40 microkernel: rename K_swapper to _k_server
Align with the newer terminology used for microkernel internal symbols.

Change-Id: I623b383f90d9e37a49429a79774c7f7a4953bd5f
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:21 -05:00
Benjamin Walsh c1f9fd888d irq: make utility functions private
irq_handler_set, irq_priority_set and irq_disconnect have been made
private by prepending an underscore to their names:

	irq_handler_set -> irq_handler_set
	irq_priority_set -> irq_priority_set
	irq_disconnect -> irq_disconnect

The prototypes have been removed from header files when possible, and
extern statements used in C code where they were called.

_irq_priority_set() for ARM is still in the header file because
IRQ_CONFIG() relies on it.

Change-Id: I2ad585f8156ff80250f6d9eeca4a249a4477fd9d
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:21 -05:00
Benjamin Walsh a34afe9b61 events: remove checks for valid events in service handlers
Doing those checks went against the Zephyr philosophy of no error
checking unless absolutely necessary. Users should ensure themselves the
validity of their inputs to kernel APIs.

Change-Id: I21e5cd07ff9424ad61e81fd9d52ceef0c9584a8c
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:21 -05:00
Benjamin Walsh 751c765079 events: rename task_event_set_handler()
task_event_set_handler -> task_event_handler_set

Align with the "verb at the end" convention.

Change-Id: I8b72d41a20a7fdd4756f90765682e317289a241b
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:21 -05:00
Benjamin Walsh 87564a4602 pipes/mailboxes: rename functions using mem blocks
task_pipe_put_async -> task_pipe_block_put

  task_mbox_put_async -> task_mbox_block_put

  task_mbox_data_get_async_block -> task_mbox_data_block_get
  task_mbox_data_get_async_block_wait -> task_mbox_data_block_get_wait
  task_mbox_data_get_async_block_wait_timeout ->
       task_mbox_data_block_get_wait_timeout

Previous names, focusing on 'async', were misleading, because:

- some of those APIs can be used synchronously as well
- other APIs can also do asynchronous transfer, and don't have 'async'
  in their names
- the key concept of these APIs is that they use memory pool blocks
  rather than raw data buffers.

Change-Id: I0c08a6cf950ab23bb4172ce25eb6f9886b037649
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:21 -05:00
Yonattan Louise ea06b8ba39 Add profile collector sample.
Add a project that shows how to collect the
data from the profiler.

Change-Id: Ie9cc88290de594720739b30d4e872fe51d353f6e
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:20 -05:00
Anas Nashif 6971d547cd Rename nano_node_tick_get_32 in documentation
leftovers from the renaming activities:

 nano_node_tick_get_32 -> nano_tick_get_32

Change-Id: Ic9f0870ddda159311005c2ed16e0a378ab9a6a62
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:20 -05:00
Peter Mitsis dba5ac622c Remove PIT code
The PIT is an unsupported device.  On x86 based platforms, the LOAPIC_TIMER and
HPET_TIMER are the only supported timers.

Change-Id: Ic890838c811b7eb62008aef0c8a92786f1579217
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:15:20 -05:00
Peter Mitsis 658bb54ed1 Use LOAPIC timer Kconfig options
Removes the LOAPIC timer macros from board.h as they are no longer required
since appropriate Kconfig options exist to use in their stead.

Change-Id: Id0b509eba7cce1839b400f95b989bf886322e1a8
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:15:20 -05:00
Peter Mitsis 76db3ae424 Clean up microkernel sys_kernel configuration files
As no default platform configuration uses the PIC/PIT, the project
configuration file 'prj_console_pc8253.conf' is no longer required.

Change-Id: Ic91922e9431a2853bb5fdcdd3e31e39f3dce90c4
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:15:19 -05:00
Peter Mitsis 21832e3bf1 Clean up microkernel latency_measure configuration files
As no default platform configuration uses the PIC/PIT, the project
configuration file 'prj_pc8253.conf' is no longer required.

Change-Id: I89fac2685d9fca0452e5ce9d9b035e102bd62d70
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:15:19 -05:00
Peter Mitsis db608ec123 Clean up microkernel app_kernel configuration files
Removes the following project configuration files:
 - prj_console_float_pc8253.conf : PIT is no longer used
 - prj_console_nofloat_*.conf    : unsupported by Makefile

Change-Id: I72689fa56413947f3a552645c7b2ed5ad599ed71
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:15:19 -05:00
Peter Mitsis 578d417e87 Use HPET timer Kconfig options
Removes the HPET timer macros from board.h and uses the HPET timer Kconfig
options in their stead.

Change-Id: Ia0b3cd87716277ac25f12deb31d5c5934f355050
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:15:19 -05:00
Daniel Leung 971eb0ef44 samples/microkernel: add test for private memory maps
This adds unit test for microkernel private memory maps.
The code piggybacks to the public memory map test (by
including the same source file), so any updates to
the test will be applied to both.

Note that the prj.mdef are different for both tests, since
the private memory maps test move the memory maps inside
source code. So, both mdef files will need to be updated at
the same time.

Change-Id: Ia7f65f55b61d9fb0d42ba58d63662e914d69194e
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung 8eec65c742 samples/microkernel: add test for private pipes
This adds unit test for microkernel private pipes.
The code piggybacks to the public pipe test (by
including the same source file), so any updates to
the test will be applied to both.

Note that the prj.mdef are different for both tests, since
the private pipes test move the pipes inside source
code. So, both mdef files will need to be updated at
the same time.

Change-Id: I6fdb5eab7c3a1d6f4b72c26a3620cee0188b07a5
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung 62077917b6 samples/microkernel: add test for private tasks
This adds unit test for microkernel private tasks.
The code piggybacks to the public task test (by
including the same source file), so any updates to
the test will be applied to both.

Note that the prj.mdef are different for both tests, since
the private tasks test move the tasks inside source
code. So, both mdef files will need to be updated at
the same time.

Change-Id: I2890f70be460c0e45208ce03d6e7897d2662f6f0
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung f6369abf4d samples/microkernel: add test for private mailboxes
This adds unit test for microkernel private mailboxes.
The code piggybacks to the public mailbox test (by
including the same source files), so any updates to
the test will be applied to both.

Note that the prj.mdef are different for both tests, since
the private mailboxes test move the mailboxes inside source
code. So, both mdef files will need to be updated at
the same time.

Change-Id: I52ccc5931b1abfd3ae3d654f888d4a019268bba0
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung 5d934a3786 samples/microkernel: add test for private FIFOs
This adds unit test for microkernel private FIFOs.
The code piggybacks to the public FIFOs tests (by
including the same source file), so any updates to
the test will be applied to both.

Note that the prj.mdef are different for both tests, since
the private FIFOs test move some of the FIFOs
inside source code.

Change-Id: I4130ac540b10a31cd30f37890e9cc389af73e89b
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung 8232067646 samples/microkernel: add test for private semaphores
This adds unit test for microkernel private semaphores.
The code piggybacks to the public semaphores tests (by
including the same source files), so any updates to
the test will be applied to both.

Note that the prj.mdef are different for both tests, since
the private semaphores test move some of the semaphores
inside source code.

Change-Id: Ic318bf6808514c5d335a46cb3e88ebf6000f4c3e
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Allan Stephens 457caf92a3 samples/microkernel: recursive mutex testing using in-file mutex
Enhances the existing microkernel mutex test project to verify
that recursive mutex locking works properly. The implementation
utilizes the new in-file defined mutexes to demonstrate that
this capability also works.

[DL: Update the original patch from Allan Stephens
     @ https://oic-review.01.org/gerrit/3256 to utilize
     the new interface. Also updated the commit message. ]

Change-Id: Iaf8b4a5cd97d1dce53d6134a978cc565279d038c
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:51 -05:00
Andrew Boie fbb9df3815 test_bluetooth: only build on ARM and x86
Change-Id: I55afd910b6275df1301d4910f4e769227a9989a3
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:14:45 -05:00
Andrew Boie 74c8f65eb6 test_bluetooth: only build if we have CONFIG_BLUETOOTH
Change-Id: I57017219cecd6d41ebebf9b210de49e2734e1686
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:14:45 -05:00
Szymon Janc dabedeb449 Bluetooth: Register simple GAP service in btshell app
Some devices (eg. Android KitKat) are confused if remote database
is empty.

Change-Id: Ie27920b6f64b12903917068101d5abb171ab42c0
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
2016-02-05 20:14:44 -05:00
Luiz Augusto von Dentz 66367b5ef3 Bluetooth: Check if bt_gatt_subscribe return -EALREADY
If bt_gatt_subscribe -EALREADY that means it is already subscribed and
shall not be reused.

Change-Id: I83c620454c40863c71b1289d37c2b42571a907fd
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:44 -05:00
Johan Hedberg e899c811e6 Bluetooth: Use async callback for enabling Bluetooth
In the peripheral sample app use the async feature of bt_enable() to
verify that it works as expected.

Change-Id: I15f7758944a8c34d1aaef84f0ba77a6b5bbb4695
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:44 -05:00
Johan Hedberg 79696d3b34 Bluetooth: Redesign Bluetooth init API
We need to be able to perform the init procedure asynchronously
through a callback. The RX fiber is a good candidate to use for the
callback since it's not active in its normal operation before
drv->open has been called. In order to prepare for a future
bt_disable() API the init API is renamed from bt_init() to
bt_enable(). If a NULL pointer is given as the callback the API
behaves synchronously like the old bt_init().

Change-Id: I4e78fa8f32dcf5477ea05a8db75aca5cdce591fd
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:44 -05:00
Luiz Augusto von Dentz 8697d207a0 Bluetooth: GATT: Fix using uint8_t for attribute length
Attribute length can be up to 512 bytes long so it needs to be at least
uint16_t, ATT already takes care that the MTU does not exceed 512 bytes.

Change-Id: I6c8dc80a4b63f212420c26c0a24d93939fa510fe
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:44 -05:00
Jukka Rissanen e0b6702d71 net: apps: Add multicast support to echo-server
echo-server can now receive both unicast and multicast UDP
messages.

Change-Id: I3837b8e7126584fa7c87958e68a8439824abd5ab
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:44 -05:00
Luiz Augusto von Dentz 369ff3bb90 Bluetooth: Make central sample discover HRS over GATT
This makes the central sample discover the attributes and subscribe
to receive notifications of HeartRate Measurement Characteristic.

Change-Id: Icedbdd759638be0b8fa8515112208aa61ad5eb90
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:43 -05:00
Luiz Augusto von Dentz f581894abf Bluetooth: Make central sample connect to devices supporting HRS
This makes central sample to parse the Advertising Data and in case the
device supports HeartRate Service stop scanning and connect to it, if the
device disconnects then start scanning again.

Change-Id: I49962eadb5c82c7a910185212063cd576cadf62e
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:43 -05:00
Luiz Augusto von Dentz 7942266868 Bluetooth: Add connection callbacks to central sample
This will be needed to monitor connections with peripherals.

Change-Id: Iccea2696af72b0b8b3f40aac180738dc6b80abc8
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:43 -05:00
Mariusz Skamra 6b4f7025f2 Bluetooth: Start using atomic flags to indicate bt_dev state
With this patch advertising state and scanning state are stored as flags.

Change-Id: I5d2dc37972620ee89aaf55d45e294e8be82863d3
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:14:43 -05:00
Luiz Augusto von Dentz 368cfb775e Bluetooth: Add gatt-unsubscribe command to btshell
This adds gatt-unsubscribe which works as follow:

btshell> gatt-unsubscribe <CCC handle>
bt: gatt_write_ccc (0x0010edc8): handle 0x0015 value 0x0000
Unsubscribe success

Change-Id: I812fd237f71c4cad8e188015f1cd4cd2f2902aa6
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:43 -05:00
Luiz Augusto von Dentz d39eb230ee Bluetooth: Add gatt-subscribe command to btshell
This adds gatt-subscribe which works as follow:

btshell> gatt-subscribe <CCC handle> <value handle>
bt: gatt_write_ccc (0x0010e594): handle 0x0015 value 0x0001
bt: bt_att_recv (0x0011082c): Received ATT code 0x13 len 1
bt: att_handle_write_rsp (0x0011082c):
bt: att_write_ccc_rsp (0x0011082c): err 0x00
Subscribe complete: err 0
Subscribe destroy
bt: bt_att_recv (0x0011082c): Received ATT code 0x1b len 4
bt: att_notify (0x0011082c): handle 0x0014
bt: bt_gatt_notification (0x0011082c): handle 0x0014 length 1
Notification: data 0010cea9 length 1

Change-Id: Ide1f737358857a87db6dac1ecd9097f8da99ed72
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:43 -05:00
Luiz Augusto von Dentz a6b826e918 Bluetooth: Use connection context in btshell
Once connected store the bt_conn as context, this save the trouble of
entering the same parameter over and over and remove the lookups from
commands that requires a connection.

Change-Id: I9671b8fa07a1a61db45516f63eb007f19f0e59a1
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:43 -05:00
Johan Hedberg 9698411362 Bluetooth: Minor coding style (white space) fix
Change-Id: I50f0f4548fdf5c79c783f4055974e427ba9cbfe8
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:43 -05:00
Peter Mitsis 99037499b6 Remove references to BSPs from sample projects
Removes references to obsolete BSP terminology from the sample projects and
replaces it with references to platforms where appropriate.

Change-Id: I6c8071a84f77c2cfe1458e3891d2b5e5afdaf8f9
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:43 -05:00
Peter Mitsis ad03f13db5 samples: Update sanity_chk usage notes
Removes reference to the unsupported "-T <toolchain>" option and the replaces
the deprecated "-B <BSP>" option with "-P <platform>".

Change-Id: I21ab863dded9cbfd4fc0ab2fcade59137add08cf
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:43 -05:00
Peter Mitsis b2267b28f1 Correct kernel type in XIP README.txt
Fixes README.txt for nanokernel's test_xip to refer to the nanokernel instead
of the microkernel.

Change-Id: I03866e88ec67515b827b901d49b1e7b10d3866d0
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:42 -05:00
Peter Mitsis 5dd4296a0a Fix obsolete references to resources
Fixes a couple of references to obsolete resource terminology; they now refer
to mutexes.

Change-Id: Ie7f837b6657891bdde9b09bb0ff2311fe4c19928
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:42 -05:00
Andrew Boie 6acbe63aea initial commit for next-gen sanity checks
The online help ./scripts/sanitycheck --help describes usage.
Most users will simply want to run with no arguments.

Change-Id: Icedbbfc22599a64a6e3dbbb808ff3276db06f2e0
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:14:42 -05:00
Allan Stephens f4c7281073 Remove trailing semicolon in definition of CMD_PKT_SET_INSTANCE()
It appears more conventional to require callers of function-type
macros to supply the trailing semicolon.

Change-Id: I40c67cf2ec8f7e85bdc9d8a2a29698b56d9715c6
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:42 -05:00
Luiz Augusto von Dentz 4c2a459305 Bluetooth: Add gatt-write command to btshell
This adds gatt-read which works as follow:

gatt-write <bdaddr> <bdaddr_type> <handle> <data>
bt: bt_gatt_write (0x0010e0f0): handle 0x0011 length 1
Write pending
btshell> bt: bt_att_recv (0x001102ec): Received ATT code 0x13 len 1
bt: att_handle_write_rsp (0x001102ec):
bt: att_write_rsp (0x001102ec): err 0x00
Write complete: err 0

Change-Id: Ibe9f510184ad98635b18cc7d92dc3573afd9cb03
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:41 -05:00
Arkadiusz Lichwa 08230f691c Bluetooth: GATT: Update btshell app
Adds to btshell app a command to enable mimic GATT client to
perform multiple read attributes request using set of input handles.
The syntax is: gatt-read-multiple <address> <addres-type> <h1> <h2> ...
Handles should be entered as hex values and are 2-octets wide each.

Change-Id: Ic37a4486a11c645685cbfc782d36457af0fe9453
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-05 20:14:40 -05:00
Arkadiusz Lichwa e4208e065d Bluetooth: Increase max ARGC in btshell
Allows shell commands read more number of input parameters.
It is updated to 10 input parameters.

Change-Id: Ia943e8c6f0caaaf74cebcdb9dbe3542d90b2e4b9
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-05 20:14:40 -05:00
Johan Hedberg fe41cec885 Bluetooth: Move bt_security to conn.h and rename it appropriately
Change-Id: Ibea6e4ef08c68e9debf0c53036dd2e4f75ea9a72
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:40 -05:00
Johan Hedberg a33047f7a5 Bluetooth: Move bt_connect_le to conn.c and rename it appropriately
This function operates on bt_conn so it should be in conn.c and
exported through conn.h. Rename it with the appropriate bt_conn_*
prefix.

Change-Id: Id17c67f0e95cc1afb10aa7742b2d2ce0110ea616
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:40 -05:00
Johan Hedberg 824135122f Bluetooth: Move bt_disconnect to conn.[ch] and rename it appropriately
The bt_disconnect deals with the bt_conn object and should therefore
reside in conn.c and be exported through conn.h. It should also have
the appropriate bt_conn_* prefix.

Change-Id: I75eb648fd9aa8ced9a991d472c319d25f4b772af
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:40 -05:00
Luiz Augusto von Dentz 7ea33a436b Bluetooth: Add gatt-read command to btshell
This adds gatt-read which works as follow:

gatt-read <bdaddr> <bdaddr_type> <handle> [offset]
bt: bt_gatt_read (0x0010dca0): handle 0x0010
Read pending
btshell> bt: bt_att_recv (0x0010fe9c): Received ATT code 0x0b len 6
bt: att_handle_read_rsp (0x0010fe9c):
bt: att_read_rsp (0x0010fe9c): err 0x00
Read complete: err 0 length 5

Change-Id: I38686f0e592b38bf22a7bf76fab93676b375104d
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:40 -05:00
Ravi kumar Veeramally 6bb94745e0 net: apps: Update 802.15.4 test app makefile
Update test_15_4 makefile and prj files to support
CONFIG_NETWORKING_WITH_15_4_LOOPBACK_UART build.

Change-Id: I8247b67b1beac18f7c62349d049694cf5aa437ca
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-02-05 20:14:40 -05:00
Ravi kumar Veeramally 873271b7ec net: apps: Add README file for 802.15.4 test application
Add config and build instructions for test_15_4 sample application.

Change-Id: I9920c5da27d643c0faee506f1497d0d68ed7ca52
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-02-05 20:14:40 -05:00
Luiz Augusto von Dentz ebbe49b32e Bluetooth: Add gatt-discover-descriptor command to btshell
This adds gatt-discover-descriptor which works as follow:

btshell> gatt-discover-descriptor <bdaddr> <bdaddr_type> [UUID] [start_handle] [end_handle]
bt: bt_gatt_discover_descriptor (0x0010d6b0): start_handle 0x0011 end_handle 0x0011
Discover pending
btshell>bt: bt_att_recv (0x0010f8ac): Received ATT code 0x05 len 6
bt: att_handle_find_info_rsp (0x0010f8ac):
bt: att_find_info_rsp (0x0010f8ac): err 0x00
bt: att_find_info_rsp (0x0010f8ac): handle 0x0011
Discover found handle 17
Discover destroy

Change-Id: I6b95a3b9bfbbf57fb195f79db24216a1f8296079
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:40 -05:00
Mariusz Skamra 81895bd738 Bluetooth: shell: Extend shell app functionality to turn off adverising
Change-Id: I5beb5abac3ecc982a154fd062eb34b1d5ee170e9
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:14:39 -05:00
Peter Mitsis da299ecd47 Update nanokernel boot_time project
Removes references to old platform names.

Change-Id: I65baa148006fbda916904914844b1b347f8ec654
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:39 -05:00
Peter Mitsis 310c63e386 Update microkernel boot_time project
Removes references to old platform names.

Change-Id: I53e9994c794c6b4c292e776355a67b7923c2fdb8
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:39 -05:00
Peter Mitsis 213db12fbf Move platforms to new arch/<arch>/platforms directory
Change-Id: I9ad5d51329d381c091aa47b482a8e38e7c194118
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:39 -05:00
Peter Mitsis 9d63adf3ea Renames supported platform configurations
Renames supported platform configurations to conform to new platform
configuration naming scheme.

Example usage with PLATFORM_CONFIG:
    make PLATFORM_CONFIG=basic_cortex_m3
    make PLATFORM_CONFIG=basic_atom
    make PLATFORM_CONFIG=basic_minuteia
    make PLATFORM_CONFIG=galileo

  xxx_ti_lm3s6965_defconfig           -> xxx_basic_cortex_m3_defconfig
  xxx_generic_pc_atom_n28xx_defconfig -> xxx_basic_atom_defconfig
  xxx_generic_pc_minuteia_defconfig   -> xxx_basic_minuteia_defconfig
  xxx_quark_defconfig                 -> xxx_galileo_defconfig

Change-Id: I696eb8b9ad9a72d7a72efbe1341ce23500335764
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:39 -05:00
Peter Mitsis 519351ee92 Use PLATFORM_CONFIG to specify configuration
Uses PLATFORM_CONFIG to specify the configuration file instead of
KBUILD_DEFCONFIG.  This name is more intuitive to Zephyr users and
it is not tied to kbuild.

Example usage:
    make PLATFORM_CONFIG=generic_pc_atom_n28xx
    make PLATFORM_CONFIG=generic_pc_minuteia
    make PLATFORM_CONFIG=quark
    make PLATFORM_CONFIG=ti_lm3s6965
    make PLATFORM_CONFIG=fsl_frdm_k64f

Change-Id: I177608942c3e77c2f152743c862aad1d460c0e33
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:38 -05:00
Peter Mitsis 9690835e32 sample projects: Remove generic_pc and pentium4 support
The generic_pc and generic_pc_pentium4 platform configurations are not
essential configurations to Zephyr.

Change-Id: Idd384bc7f180c035b1467e8b56fbfe206604658f
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:38 -05:00
Peter Mitsis 3b33a3b437 sample projects: change default KBUILD_DEFCONFIG
Changes default KBUILD_DEFCONFIG to xxx_generic_pc_atom_n28xx_defconfig as
the xxx_generic_pc_defconfig configuration will not be supported in the future.
Note that like generic_pc, atom_n28xx runs on QEMU.

Change-Id: I49c5708e4b24dbf723eefc1efddfea4174d9cb1c
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:38 -05:00
Peter Mitsis 47808955ac Network sample projects no longer use BSP
Network sample projects no use KBUILD_DEFCONFIG instead of BSP.  This
is a necessary step in transitioning from BSPs to platforms.

Change-Id: Ia1ebb697d9e68974f71faa467f1f946f0d1afbd1
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:38 -05:00
Peter Mitsis 98862b3c83 Nanokernel sample projects no longer use BSP
Nanokernel smaple projects now use KBUILD_DEFCONFIG instead of BSP.  This
is a necessary step in transitioning from BSPs to platforms.

Change-Id: I47f75742b663edd7c4b1858425d4583f0bc74ae7
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:38 -05:00
Peter Mitsis 85d9f0c827 Microkernel sample projects no longer use BSP
Microkernel sample projects now use KBUILD_DEFCONFIG instead of BSP.  This
is a necessary step in transitioning from BSPs to platforms.

Change-Id: I916819262cabf70296e15d9b1321fc383b88a805
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:38 -05:00
Peter Mitsis bb2e5daacd Bluetooth sample projects no longer use BSP
Bluetooth sample projects now use KBUILD_DEFCONFIG instead of BSP.  This is
a necessary step in transitioning from BSPs to platforms.

Change-Id: I42c89d0b5c3d7de7ea62297950bb00f56ca97ed2
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:38 -05:00
Peter Mitsis a7644b86a5 Rename CONFIG_BSP_xxx to CONFIG_PLATFORM_xxx
Updates Kconfig option names as part of transforming BSPs to platforms.

Change-Id: If397bcac8b058e5700e82c3cabbfe64588316d1d
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:37 -05:00
Allan Stephens 04adb5fb79 samples: Revise example memory pool block sizes
Revises the memory pool test project so that the maximum block size
is a power of 4 multiple of the minimum block size, as a reminder
of the required relationship between minimum and maximum block sizes.

Change-Id: Iff5480b7870c261d43c5a857c71a44beffc6c7f0
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:37 -05:00
Allan Stephens 8486aae9d6 Revise misleading 'channel' references in sample projects
There is no need to refer to a data passing microkernel object
as a 'channel'.

Change-Id: I730f88d6e77ab075832e7ed48b20eb2ec46b5ed4
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:37 -05:00
Dirk Brandewie fce979ef3e init: Change _InitHardware() to be called from init system
Change the function signature of _InitHarware() function and rename
the function to a platform specific name now that it will be called
via a function pointer and not by name.

Call the platform *_init() function at PURE_INIT time.

Change-Id: I5168dfea81f406da135d491a2b4a24e8255f418a
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:14:37 -05:00
Peter Mitsis 2874311ca5 Remove reference to nano_time_init() in sample projects
The nanokernel routine nano_time_init() is automatically invoked by the
constructor initialization code, and should be invisible to the application.

Change-Id: Ic75f84856c333187a4f9fef8569698e056f6d936
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:37 -05:00
Luiz Augusto von Dentz 710aa2ecc7 Bluetooth: Add gatt-discover-characteristic command to btshell
This adds gatt-discover-characteristic which works as follow:

btshell>gatt-discover-characteristic <bdaddr> <bdaddr_type> [UUID] [start_handle] [end_handle]
bt: bt_gatt_discover_characteristic (0x0010d098): start_handle 0x000b end_handle 0x0011
Discover pending
btshell>bt: bt_att_recv (0x0010f294): Received ATT code 0x09 len 23
bt: att_handle_read_type_rsp (0x0010f294):
bt: att_read_type_rsp (0x0010f294): err 0x00
bt: att_read_type_rsp (0x0010f294): handle 0x000b properties 0x02 value_handle 0x000c
Discover found handle 11
bt: att_read_type_rsp (0x0010f294): handle 0x000d properties 0x10 value_handle 0x000e
Discover found handle 13
bt: att_read_type_rsp (0x0010f294): handle 0x0010 properties 0x08 value_handle 0x0011
Discover found handle 16
Discover destroy

Change-Id: I04aad56cc4f978e3a884adffc487ae4dcc1c4ee9
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:36 -05:00
Jukka Rissanen bbe73173bb net: Use 2001:db8::/32 address space for sample apps
Instead of aaaa::/64 address space which is part of global
IPv6 address space, use the 2001:db8::/32 which is meant
for documentation purposes and is not routable.

Change-Id: I56db34da852f8c313379c764bdf75a19151c45bd
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:36 -05:00
Szymon Janc d0aa85096c Bluetooth: Add simple advertise command to shell app
This allows to enable advertising with some fixed Advertising Data
and Scan Reponse.

Change-Id: Ie3a33a49fe8517c9e931b7805694bd9c7b05fcdb
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
2016-02-05 20:14:35 -05:00
Jukka Rissanen 4d42645012 net: 15.4: Fix the loopback test
The listening socket was creted after we started to send data
so data was discarded. Now we first create listener and then
start to send data to it.

Change-Id: Iee706c7c862d16a582ee973b10598dde5e5f0bd0
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:35 -05:00
Jukka Rissanen 0605e89ec1 net: apps: Enable IPv4 support for echo-server test application
Change-Id: Ibcedaeeae06767461ee53492fc055d05c635137f
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:35 -05:00
Jukka Rissanen 7ef1a726d4 net: apps: Add IPv4 support for listener application
Change-Id: Ifa5378463dde1bcfc4c701dc4b881175395cd9fd
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:35 -05:00
Johan Hedberg d7ccefd0bd Bluetooth: Fix doxygen comment style
Change-Id: I37b85e83b54f7efb8aded70ec95fd87cafaf7e2b
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:35 -05:00
Ravi kumar Veeramally cb73239de2 net: tests: Fix improper rebase
set_mac was removed in net_set_mac is in init_test(). Rebase was
not done successfully.

Change-Id: I0d1a2f37cdb441064ae97a0e34ae41e9c7e77984
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-02-05 20:14:35 -05:00
Luiz Augusto von Dentz a52d54cc3e Bluetooth: Add gatt-discover command to btshell
This adds gatt-discover which works as follow:

btshell> gatt-discover <bdaddr> <bdaddr_type> <uuid> [start_handle] [end_handle]
bt: bt_gatt_discover (0x0010cb10): uuid 0x180d start_handle 0x0001 end_handle 0xffff
Discover pending
btshell> bt: bt_att_recv (0x0010ed0c): Received ATT code 0x07 len 5
bt: att_handle_find_type_rsp (0x0010ed0c):
bt: att_find_type_rsp (0x0010ed0c): err 0x00
bt: att_find_type_rsp (0x0010ed0c): start_handle 0x000a end_handle 0x0011
Discover found handle 10
bt: bt_gatt_discover (0x0010ed0c): uuid 0x180d start_handle 0x0011 end_handle 0xffff
bt: bt_att_recv (0x0010ed0c): Received ATT code 0x01 len 5
bt: att_error_rsp (0x0010ed0c): request 0x06 handle 0x0011 error 0x0a
bt: att_find_type_rsp (0x0010ed0c): err 0x0a
Discover destroy

Change-Id: Ic0b28f19e4932e26b2eae2d19f62f6be6e1efa9c
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:35 -05:00
Ravi kumar Veeramally 5e571ec7fb net: tests: Update 15.4 test with proper link local addresses
6lowpan HC1 compression technique expecting proper link local
addresses for compression, otherwise compression fails.

Change-Id: I083b749a7b50d93d65ea56b80b9ed6245b571200
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-02-05 20:14:35 -05:00
Jukka Rissanen 6ffb93553e net: apps: Do proper initialization for 802.15.4 tester
Set the MAC address so that the stack can generate a link
local address and mark internal variables as static to avoid
namespace pollution.

Change-Id: Ic8447054629fcdd5f7e1f8b8c5e2bb477bd63809
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:34 -05:00
Jukka Rissanen c16d29ec0f net: apps: Simple echo server that sends back the data
The echo server is listening on port 4242 and when it receives
UDP packet, it will reverse the data and send it back to the
caller. This can be used to verify that the IP stack is doing
something useful.

Change-Id: Ibbc48c21f2513d59480c5a3bb34c775eb3df8170
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:34 -05:00
Luiz Augusto von Dentz 81546cfc0a Bluetooth: Add gatt-exchange-mtu command to btshell
This adds gatt-exchange-mtu which works as follow:

btshell> gatt-exchange-mtu <bdaddr> <bdaddr_type>
bt: bt_gatt_exchange_mtu (0x0010c138): Client MTU 65
Exchange pending
btshell> bt: bt_att_recv (0x0010e310): Received ATT code 0x03 len 3
bt: att_mtu_rsp (0x0010e310): Server MTU 517
Exchange successful

Change-Id: I7280fb9d9fafc0f4bd1ef0f2226c255a5acf2592
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:34 -05:00
Szymon Janc e8eec7c3d4 Bluetooth: Allow to pass address type in braces in shell app
This makes it easier to use shell since one can copy full address
from console output. Both variants with and without braces are
accepted.

btshell> connect 7C:2F:80:94:97:39 (public)
Connection pending
btshell> Connected: 7C:2F:80:94:97:39 (public)
btshell> disconnect 7C:2F:80:94:97:39 public
btshell> Disconnected: 7C:2F:80:94:97:39 (public)

Change-Id: Ic10386ee054ade1900e5f010857c0f85e5cb364a
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
2016-02-05 20:14:34 -05:00
Oleg Zhurakivskyy 72fc864282 Fix SOURCE_DIR after moving to samples/microkernel
Change-Id: Ibf38229ce1eb6728f9024fbeb9d7931948ecd8e7
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2016-02-05 20:14:33 -05:00
Anas Nashif f367f071b6 doxygen: add @brief and capitalize
Remove function name from comment and add @brief instead.
Also capitilize first letter.

Change-Id: Ib708b49bf02e5bc89b0066637a55874e659637e0
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:33 -05:00
Anas Nashif 1362e3c162 doxygen: RETURNS: -> @return
Previous comment style used RETRURNS:, use @return to comply
with javadoc style.

Change-Id: Ib1dffd92da1d97d60063ec5309b08049828f6661
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:32 -05:00
Anas Nashif 44f8b3a54b doxygen: \param -> @param
Some comments have \param, convert them to javadoc style.

Change-Id: I6abcdab91f4f616632392292600f4b0081b2a842
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:32 -05:00
Anas Nashif ea0d0b220c doxygen: change comment style to match javadoc
The change replaces multiple asterisks to ** at
the beginning of comments and adds a space before
the asterisks at the beginning of lines.

Change-Id: I7656bde3bf4d9a31e38941e43b580520432dabc1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:32 -05:00
Arkadiusz Lichwa b62f778664 Bluetooth: Start outgoing connection with tracking
Enables make outgoing connection with error handling.
Free connection objects maintained in polls are assigned to active
connection by result of lookup on the polls based on input
peer LE address.
Updates shell application to reflect above changes in stack.

Change-Id: Ibc71343c0d122cc78c48bac2ff1e50533369b7d2
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-05 20:14:31 -05:00
Mariusz Skamra 949106ceea Bluetooth: Notify about connection events in tester app
Notifications will be sent on connected/disconnected events.

Change-Id: Iaac6851a987a630ce41c5836de49dccc6ee5d385
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:14:31 -05:00
Mariusz Skamra ee20dd0a10 Bluetooth: Handle advertising in tester app
This patch adds support for enabling advertising on DUT. For now
setting custom advertising data or scan response is not supported.

Change-Id: I506d944565e524eb2103949df6cf003347d4c117
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:14:31 -05:00
Szymon Janc a14314e913 Bluetooth: Move security related code to bluetooth.h
Also rename bt_conn_security function to bt_security and
bt_conn_security_t to bt__security_t.

Change-Id: I543c7b97241c4389ef0eb491b6869f93105ae533
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
2016-02-05 20:14:31 -05:00
Szymon Janc 10a2f86bef Bluetooth: Add security command to shell application
This allows to elevate security of a connection.

Change-Id: I492a92026c8db6feccffb96334be4557a5c73b48
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
2016-02-05 20:14:31 -05:00
Jukka Rissanen ca2c662fc0 net: apps: Set the mac address in the stack
This way the stack will generate a proper IPv6 link local
address.

Change-Id: I149d82cf5623f3073b9edc64fe4e426460eb793b
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:31 -05:00
Jukka Rissanen ba40f4ff31 net: apps: Set the mac address in listener app
The mac address length needs to be 6 bytes because this
test app has no 802.15.4 support. The uIP stack checks
this and expects only 6 bytes mac address in this case.

Change-Id: I1edd340491b4690b5a2cf285c63f90950bbc3ff3
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:31 -05:00
Jukka Rissanen 19983ee89f net: apps: Send always the max data size to test the stack
Stress test the IP stack by always sending max number of bytes.

Change-Id: I830a92cca4efbc2aa00dd1bec75972884359621c
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:30 -05:00
Jukka Rissanen 914bb3f3f5 net: apps: Add support for microkernel in 802.15.4 test app
The test_15_4 test application now works with microkernel also.

Change-Id: I041a917be599936089af9ffaba9c27b9aeb5a481
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:30 -05:00
Ravi kumar Veeramally 56ccfb3785 net: 15.4: Add 802.15.4 driver and 802.15.4 loopback radio driver
Enable 802.15.4 driver that receives the IPv6 packet, does header
compression on it and writes it to the 15.4 stack Tx FIFO.
The 15.4 Tx fiber will pick up the header compressed IPv6
6LoWPAN packet and fragment it into suitable chunks ready
to be sent to the 15.4 hw driver. The 15.4 stack Rx fiber picks
15.4 frames from 15.4 Rx FIFO (which are fed by 15.4 driver)
and reassembles the all fragmented packets and uncompress the
header and writes to the IP Rx FIFO.

The 15.4 loopback radio driver receives the 15.4 frames and
put it back to 15.4 Rx Fifo.

Change-Id: I68d1c7ff6de0e8770616e574206c2091c69a28e6
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:30 -05:00
Patrik Flykt 231572a1c6 net: Set loopback address in the loopback driver
Set the loopback IPv6 address and an all-zero MAC address as the
loopback device really does not have a defined MAC address.

Clean up the code so that the loopback driver's IPv6 addresses are
not reused in other parts by mistake.

Change-Id: I07cc8bc5ad3a2ec5997bb313dd0ecaca4d9742f7
Signed-off-by: Patrik Flykt <patrik.flykt@linux.intel.com>
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:30 -05:00
Jukka Rissanen 0b54f984b8 net: apps: Simple listener application that just receives packets
Change-Id: I91457d364742928743be9040c0db64a1f052c093
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:30 -05:00
Luiz Augusto von Dentz 016f6e7d6a Bluetooth: Replace peer address with conn in GATT API
Now that bt_conn is public using it directly is much more convenient
and in some cases save a lookup by address.

Change-Id: Ia489948634984fe4f1a430da553f8a2a740fb531
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:30 -05:00
Patrik Flykt 5d443c6136 net: apps: Add a sample app using the loopback driver
Change-Id: Iced27c5a151286a38f41484cfcc987a7a3a432ea
Signed-off-by: Patrik Flykt <patrik.flykt@linux.intel.com>
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:29 -05:00
Szymon Janc fedfb7fa29 Bluetooth: Make cmd_scan_* parameters explicit void
Change-Id: I3b6fb2ecfb0a4572f3583991f2a94667442fd065
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
2016-02-05 20:14:28 -05:00
Anas Nashif 212414f090 nfc: move nfc sample under microkernel/apps
The sample should be under microkernel and not in the
top level samples directory.

Change-Id: Ide98fa64a5a6831f83bec25b778f9d5b39bdb4e7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:28 -05:00
Oleg Zhurakivskyy 0582d704f9 nfc: Dummy app for signal-through on UART1 for x86
Change-Id: I88227932302c747f837cf391b937ef9f6da14f4e
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2016-02-05 20:14:28 -05:00
Peter Mitsis 1ffabeaf3d Rename BSP_DIR to PLATFORM
Updates references to CONFIG_BSP_DIR to CONFIG_PLATFORM as part of the
BSP -> platform clean up.

Note that despite the renaming, the usage of the config option remains
unchanged.

Change-Id: I2846c3f761cf09871019c0855bf1824ae03e6b3c
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:27 -05:00
Allan Stephens c29d41cab7 Rename nanokernel's nanok.h to nano_private.h
The new name better reflects that this file contains all private
nanokernel APIs that are used by various kernel subsystems.

Change-Id: I4c258d582e93753eec9e575fdb5f9f2109417a0f
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:26 -05:00
Dmitriy Korovkin 660878e4e2 irq_connect for x86 uses static stub array
In order to provide the same irq_connect() on all platforms
on x86, irq_connect() now uses a static array of interrupt
stubs. Device driver does not need to provide interrupt stub
to irq_connect() function.

Add NUM_DYNAMIC_STUBS configuration parameter, the number
of interrupt stubs used for dynamic interrupt registration.

Modify tests for unified interrupt register API

Tests that deal with interrupts are modified to work
with the new interrupt registration API.

Add CONFIG_NUM_DYNAMIC_STUBS option to dynamic interrupt projects

Projects that use dynamic interrupt handler registration on x86
have to include CONFIG_NUM_DYNAMIC_STUBS parameter in the
configuration.

Change-Id: Ic90c726485521a57cf695fd3edc8cac85d0b827d
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-02-05 20:14:25 -05:00
Peter Mitsis 25fd37d9d5 Rename option CPU_CORTEXM to CPU_CORTEX_M
Makes name more consistent with other CPU_CORTEX_M* options.

Change-Id: I65968cb300207ba0de6231d9a67f2720be77b6ba
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:25 -05:00
Peter Mitsis 9bf659afa5 Introduce CPU_CORTEX_M3_M4 option
CPU_CORTEX_M3_M4 replaces CPU_CORTEXM3 as the umbrella option for Cortex M3/M4
processors.

NOTE: Selecting CPU_CORTEXM4 still currently forces the selection of
CPU_CORTEXM3.  Breaking that forced select will be done in a later commit.

Change-Id: I0f36b3a2adc5c6c66db4e9b6353b921199544deb
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:25 -05:00
Szymon Janc a9e4291d4b Bluetooth: Use address instead of connection ID in shell
This converts connection handling to use addresses instead of
connection ID.

btshell> connect 7C:2F:80:94:96:EC public
btshell> Connected: 7C:2F:80:94:96:EC (public)
btshell> disconnect 7C:2F:80:94:96:EC public
btshell> Disconnected: 7C:2F:80:94:96:EC (public)

Change-Id: I545fcf71954ceda1fb89deb9bf8647149fb54e94
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
2016-02-05 20:14:24 -05:00
Arkadiusz Lichwa b40b3363e4 Bluetooth: Enable basic interaction with LE scan
Adds new commands to shell app allowing turn on/off active LE scan.
App uses scan results callback to get feedback when found any
advertisers around.
The dummy app's callback prints out info about findings.

Change-Id: Ifffe77b804230c19bbbcbc4f38e47210c835106d
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-05 20:14:24 -05:00
Arkadiusz Lichwa d81689e915 Bluetooth: Introduce LE scan callback
Enables sending LE discovery results to user app.
Updates central apps to use new scan API.

Change-Id: Id319c96e15554f2eed4cf507cddd114ca74aa8e5
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-05 20:14:24 -05:00
Szymon Janc e41d9512ce Bluetooth: Update shell doxygen comments
Change-Id: I4888144700e692c9080e6695c6966ad99e59f911
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
2016-02-05 20:14:24 -05:00
Szymon Janc e35a5294fc Bluetooth: Fix typo in shell application
Change-Id: Ib5a41d5a9cf02508c591d39f8a96e323701005bf
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
2016-02-05 20:14:24 -05:00
Szymon Janc 0c421b038c Bluetooth: Make command handler in shell app return void
Return code from command handler is not needed and was already ignored.

Change-Id: Ief073ccfe2ccd316b6d4eec5168fb564e96786ee
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
2016-02-05 20:14:24 -05:00
Szymon Janc c14b14953d Bluetooth: Use argc/argv for commands in shell application
This makes code looks similar to POSIX style parameter handling.
Also code is easier to read and doesn't require tricks like
'p += strlen(p) + 1' for next parameter.

Change-Id: I013e714ba81681da38e320fb69851c7b5a75bb52
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
2016-02-05 20:14:24 -05:00
Mariusz Skamra 4ccef33723 Bluetooth: Add interactive connection and disconnection commands
Adds above commands to the shell app.
Connection is made based on given address and type eg:
btshell> connect 00:00:00:00:00:00 public

In callback we get local connection id which is in fact,
the number of array entry in which the pointer to the corresponding
bt_conn has been written.

To disconnect, just provide the id eg:
btshell> disconnect 0

Change-Id: I24f7ec2de7f84c53ab847ded28a1821753c2a60d
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:14:23 -05:00
Johan Hedberg 8c26ce63d1 Bluetooth: Remove bt_hci_reset() API
There's no clear need for this API (at least for now) and supporting
it means we really need to get all state cleanup procedures correct.
Remove it for now.

Change-Id: Ia2c7d51d410117bef12bc08f4f97a4e38ccfb77a
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:23 -05:00
Johan Hedberg f56636e90b Bluetooth: Fix typo in shell sample app
Change-Id: I2b7453022046a4c5725c2c958f0f4e7b9b2c56b2
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:23 -05:00
Johan Hedberg 9bea2c3cfc Bluetooth: Move HCI driver API to dedicated header file
This makes it clearer that this is a specialized API not intended for
general app usage (unlike most other things in bluetooth.h).

Change-Id: I0ce1d5903610a9b3a99cf0be9f0e1462b04bf45a
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:23 -05:00
Luiz Augusto von Dentz 32eb9150f7 Bluetooth: Make Bluetooth UUID defines consistent
Always prefix UUIDS for characteristics with service name.

Change-Id: Ic435fa725e6bc8918af631632156b071121cd0e0
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:23 -05:00
Szymon Janc 26be0d55f2 Bluetooth: 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: I585a9f84e8239a59b0f5b29eed0dc70efa253522
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
2016-02-05 20:14:23 -05:00
Johan Hedberg 224abaab0e Bluetooth: Update bt_conn_cb to pass bt_conn instead of bt_addr_le_t
Now that we have a publicly exposed connection object it makes sense
to pass that to the connection callbacks rather than an address.

Change-Id: I8e9b17733d1789539a83c3dbc7a778336d2b71ff
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:23 -05:00
Johan Hedberg 27a9a48f64 Bluetooth: Fix public Bluetooth includes
For consistency, when including public header files, use <> rather
than "".

Change-Id: Id780388759c33d865f49c9e0faf9cde2251ca869
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:23 -05:00
Johan Hedberg 2b61b44cbc Bluetooth: Add conn.h public header file
This one should be used for all public connection related APIs. Right
now it includes the reference counting and connection callback APIs.

Change-Id: Ib9b67e6115bb2e51322644757da1170851c3ca17
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:23 -05:00
Szymon Janc 089fb94d91 Bluetooth: Fix tester application build
This fix a build issue after last rename of TIMO -> ZEPHYR in build
system variables.

Change-Id: Iba9fb2ae13df0c66c7c1031b3a27795a9ead0e97
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
2016-02-05 20:14:23 -05:00
Andrei Emeltchenko b6384dfb40 Bluetooth: Fix beacon app build for ARM targets
Change-Id: I28cb6691cac8612bd93256018830074b29689802
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:14:23 -05:00
Benjamin Walsh ebe62ab63d test_timer: test timeouts/timers in microkernel
Simple tests to verify whether the microkernel timer system works
alongside the nanokernel timeouts and timers system.

Once the timer test is started, the nanokernel fifo timeout test is
started in parallel: each other's timeout times should not be affected
by the other. Also, a fiber is started, pending on a nanokernel timer,
and awakens in the middle of the microkernel timers expiring.

Change-Id: I05b307e58ac942961a4163cbe845a9bb732ecfb7
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh 2b429de7f3 test_fifo: test timeout APIs
Test the nano_xxx_fifo_wait_timeout() APIs.

First, the task waits with a timeout and times out. Then it wait with a
timeout, but gets the data in time.

Then, multiple timeout tests are done for the fibers, to test the ordering
of queueing/dequeueing when timeout occurs, first on one fifo, then on
multiple fifos.

Finally, multiple fibers pend on one fifo, and they all get the
data in time, except the last one: this tests that the timeout is
recomputed correctly when timeouts are aborted.

NOTE: The timeout APIs test is contained within its own file so that it
is easily reusable by a microkernel test that verifies that nano
timeouts and microkernel timers can coexist.

Change-Id: I5aae2d89651914fb6c39d8d09a56c7fa54533453
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh 5b6017e059 test_lifo: test timeout APIs
Test the nano_xxx_lifo_wait_timeout() APIs.

First, the task waits with a timeout and times out. Then it wait with a
timeout, but gets the data in time.

Then, multiple timeout tests are done for the fibers, to test the ordering
of queueing/dequeueing when timeout occurs, first on one lifo, then on
multiple lifos.

Finally, multiple fibers pend on one lifo, and they all get the
data in time, except the last one: this tests that the timeout is
recomputed correctly when timeouts are aborted.

Change-Id: Ida951fda746539253b9a165f48be6931d6bee05c
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh 76103ecc2b test_sema: test timeout APIs
Test the nano_xxx_sem_wait_timeout() APIs.

First, the task waits with a timeout and times out. Then it wait with a
timeout, but gets the semaphore in time.

Then, multiple timeout tests are done for the fibers, to test the
ordering of queueing/dequeueing when timeout occurs, first on one
semaphore, then on multiple semaphores.

Finally, multiple fibers pend on one semaphore, and they all get the
semaphore in time, except the last one: this tests that the timeout is
recomputed correctly when timeouts are aborted.

Change-Id: I73c174e6f15f38377a14573cb7f531e5e6ca4c07
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh 797352b3a0 test_context: add test for fiber delayed start and sleep
The test verifies that delayed fibers are started in the right order,
and that cancelling delayed fibers recomputes correctly the timeouts in
the queue. Also test the fiber_sleep() API.

Change-Id: Ic3169a90b434a81c96e7c5d3c74c39431c988f39
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Peter Mitsis 820a62dc7d sanity: Move Bluetooth regression script
Moves the Bluetooth regression script 'bt_regression.sh' so that it resides
in the same directory as the other sanity scripts.  It also renames it to
'bt_regression_chk' so that its name is consistent with the other sanity
scripts.

Change-Id: Ia5a683e2c370c91a90edc648634ce56e484dcc20
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:21 -05:00
Peter Mitsis 99c55ba2fe sanity: Remove common-klibs_chk
KLIB_DIR builds are a relic from the previous build system.

Change-Id: I382db45f0a21786e1b7c50c9a881c82feb2c7481
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:21 -05:00
Juan Manuel Cruz 308f1586d6 Kbuild: Assembly code extension.
This commit set back .S as the assembly code extension for Kbuild.

Change-Id: Ib0119876bd0bed6617bbfbad2ca6a44e172ab042
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:20 -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 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 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
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 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
Szymon Janc 985b411455 Bluetooth: Add tester application
This application is intended for automated testing. It used binary
protocol for communication over UART and can be used for driving
Bluetooth stack by external tester.

Currently only single command registering (init) GAP service is
implemented.

Change-Id: I62e151baa2badc0f1297e65591b5f494ff7b841e
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
2016-02-05 20:14:19 -05:00
Andrei Emeltchenko 49390c988d Bluetooth: Update samples README
Change-Id: I90330676e9724526bc30a34e62635f912277602d
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:14:19 -05:00
Johan Hedberg 08ff927e1a Bluetooth: Fix vxmicro.h include
vxmicro.h has been renamed to zephyr.h

Change-Id: Id9dddeb1803b5148d052758b684111260fe6b9df
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:18 -05:00
Szymon Janc 5c6baa942c Bluetooth: Fix peripheral sample build for ARM
LD      microkernel.elf
samples/bluetooth/peripheral/src/built-in.o: In function
    `mainloop':
samples/bluetooth/peripheral/src/main.c:514: undefined reference
     to `sys_rand32_get'
collect2: error: ld returned 1 exit status

Change-Id: Idec91d59fd98ec06f5e5728238cf9d9f6c37eb87
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
2016-02-05 20:14:18 -05:00
Andrei Emeltchenko 279f870bff Bluetooth: Add battery level simulation
Add battery level simulation decrementing from 100% by one every
second.

Change-Id: Ic6b819c32b42d65a044223f22e301835510823a4
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:14:18 -05:00
Andrei Emeltchenko 3dca06e700 Bluetooth: trivial: Make struct static
Change-Id: Ife8cc60bca8f5c00c5f47d3996c873a9c031feba
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:14:18 -05:00
Andrei Emeltchenko 960147d829 Bluetooth: Add Manufacturer Name String to DIS
Manufacturer Name String in DIS is a mandatory feature for Heart Rate
profile as specified by HEART RATE PROFILE Spec.

Change-Id: I552b51b68012edfc4389604e91dd43b8b54fe65f
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:14:18 -05:00
Andrei Emeltchenko 2be30696a9 Bluetooth: Simulate Heart Rate Measurements
Add Heart Rate simulation using 1 second sleeping loop and this is how
it is recommended in the Heart Rate Service Spec.

Change-Id: I1023a4089bc661a399acf865f4fc7afaf72b8f0f
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:14:18 -05:00
Mariusz Skamra a44e4544bd Bluetooth: Use connection callbacks in peripheral sample app
This registers two simple callbacks for connection and
disconnection events.

Change-Id: I9e1f87d9e1a3c8ef457e15a1c30396fba7f7df4a
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:14:18 -05:00
Andrei Emeltchenko aeb448ebba Bluetooth: Add Current Time Notification
Implement Current Time Notification triggered by write().

...
> ACL Data RX: Handle 74 flags 0x02 dlen 17                [hci0]
161704.397398
      ATT: Write Request (0x12) len 12
        Handle: 0x0014
          Data: df07071e0c2e01010000
< HCI Command: Host Number of Comp.. (0x03|0x0035) plen 5  [hci0]
161704.398861
        Num handles: 1
        Handle: 74
        Count: 1
< ACL Data TX: Handle 74 flags 0x00 dlen 5                 [hci0]
161704.398900
      ATT: Write Response (0x13) len 0
> HCI Event: Number of Completed Packets (0x13) plen 5     [hci0]
161704.533356
        Num handles: 1
        Handle: 74
        Count: 1
< ACL Data TX: Handle 74 flags 0x00 dlen 17                [hci0]
161705.189198
      ATT: Handle Value Notification (0x1b) len 12
        Handle: 0x0014
          Data: df07071e0c2e01010000
> HCI Event: Number of Completed Packets (0x13) plen 5     [hci0]
161705.275353
        Num handles: 1
        Handle: 74
        Count: 1
...

Change-Id: I504c4197a0a1d434f7704b76c8abd120eba51b7a
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:14:18 -05:00
Andrei Emeltchenko 4c2a6a6b14 Bluetooth: Remove quark target from regression test
After quark UART configuration was refactored it is not working
anymore. Since quark was never an officially supported target just
remove it from the regression tests.

Change-Id: If4bae99f5e0dfecfd3729ac0c42d7fd3d8affa0c
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:14:18 -05:00
Andrei Emeltchenko a79c26d9aa Bluetooth: Implement Current Time write
Implement Current Time write callback.

Change-Id: I2a6cb0b411c47e4d20ff34eadf8725bf23b0b7b9
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:14:18 -05:00
Arkadiusz Lichwa 0225b6b299 Bluetooth: Update simple LE scan app
Adjust app to build system.

Change-Id: I5366ea9b38b261762724006fef0ec61ed3c6e251
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-05 20:14:18 -05:00
Luiz Augusto von Dentz 693c40b34d Bluetooth: Add Vendor Service to peripheral sample
This add a vendor service which uses 128 bits UUID adding it to
advertising data:

< HCI Command: LE Set Advertising Data (0x08|0x0008) plen 32
        Length: 29
        Flags: 0x06
          LE General Discoverable Mode
          BR/EDR Not Supported
        16-bit Service UUIDs (complete): 3 entries
          Heart Rate (0x180d)
          Battery Service (0x180f)
          Current Time Service (0x1805)
        128-bit Service UUIDs (complete): 1 entry
          12345678-1234-5678-1234-56789abcdef0

In addition to that it also adds 2 characteristics that test read/write
encryption and authentication permissions:

< ACL Data TX: Handle 3585 flags 0x00 dlen 9
      ATT: Error Response (0x01) len 4
        Read Request (0x0a)
        Handle: 0x001b
        Error: Insufficient Encryption (0x0f)

< ACL Data TX: Handle 3585 flags 0x00 dlen 9
      ATT: Error Response (0x01) len 4
        Write Request (0x12)
        Handle: 0x001b
        Error: Insufficient Encryption (0x0f)

< ACL Data TX: Handle 3585 flags 0x00 dlen 9
      ATT: Error Response (0x01) len 4
        Read Request (0x0a)
        Handle: 0x001d
        Error: Insufficient Authentication (0x05)

< ACL Data TX: Handle 3585 flags 0x00 dlen 9
      ATT: Error Response (0x01) len 4
        Write Request (0x12)
        Handle: 0x001d
        Error: Insufficient Authentication (0x05)

Change-Id: Id5d42c9f6afdc8625fc8019d606114632d57ae76
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:18 -05:00
Luiz Augusto von Dentz 8c66427b05 Bluetooth: Add permission field to GATT attributes
This field can be used to set the required permissions for an attribute
which can be checked by Bluetooth core before calling the callback.

Change-Id: Idcab8cdc5744358fab0b3c67b9c0503f1d1d9736
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:18 -05:00
Luiz Augusto von Dentz 0b6eea8345 Bluetooth: Add Device Information Service to peripheral sample
Add Device Information Service along with model characteristics and
descriptor to the database table.

Change-Id: I28775cf48abe76d0a841ebc92e1579e2d4cdfa09
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:18 -05:00
Luiz Augusto von Dentz 8508bfb2b1 Bluetooth: Make use of BT_GATT_CCC
This uses BT_GATT_CCC to declare CCC descriptors which makes the core
to managed the CCC configuration so the task don't have to do it.

Change-Id: Ied4fc7eaa1f9f3e6c23d4d5b20d5c26d606f93f4
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:17 -05:00
Luiz Augusto von Dentz c6ce7792a7 Bluetooth: Add Bluetooth remote address to attribute callbacks
To implement CCC properly it is required to know the remote address since
it is per client, futhermore bt_gatt_notify requires an address where to
send the notification.

Change-Id: I9d9fdf72d668831bed76e2aef06816af3620f4b8
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:17 -05:00
Luiz Augusto von Dentz d80a8fc845 Bluetooth: Add write support to CCC in peripheral sample
This adds write callback to CCC descriptors storing the value in a stack
variable.

Change-Id: I8cd2567c6fee730500b446192b73fc82d86ba1ff
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:17 -05:00
Andrei Emeltchenko 96f7d7bc42 Bluetooth: Add Current Time notify and CCC
Add Notify property and Current Characteristic Configuration to Current
Time Service in peripheral app.

Change-Id: I44f36eea4f129c7b407b045da892f2ba88338592
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:14:17 -05:00
Andrei Emeltchenko fae27b9587 Bluetooth: Add Current Time Service to peripheral app
Add Current Time Service currently providing hardcoded time since
there is no way of getting current time in the OS.

Change-Id: I9954d51f77905230a6dd180f37d3a48f379c69ec
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:14:16 -05:00
Anas Nashif b8823770d2 Rename TIMO -> ZEPHYR
Change-Id: Id44a129e275fb0cfe1fce6ec2a03c2d86ffe3995
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:16 -05:00
Anas Nashif 274622ea69 Rename VXMICRO_ARCH_arm -> CONFIG_ARM
Change-Id: I32b2e39781825504e7936b3df0c864988650c35c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:16 -05:00
Anas Nashif 191fc279ce Rename VXMICRO_ARCH_x86 -> CONFIG_X86_32
Change-Id: Ie1bcfebce1db838ea994cb3626396ea032225830
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:16 -05:00
Anas Nashif 952a200072 Fixed make target for running in qemu (nanokernel)
Change-Id: I583ad5ad4985c835c0c6a0d31300f08b49e0f222
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:16 -05:00
Anas Nashif ebedf4805c Fixed make target for running in qemu (microkernel)
To run qemu, we only call 'make qemu' now

Change-Id: Iedf70434c8d757d9b9a252652110eb1d91489d86
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:16 -05:00
Allan Stephens 63c7d00584 Rename VXMICRO_BASE to TIMO_BASE
Updates references to this environment variable, which were missed
during previous renamings.

Change-Id: I1126271ce8b84d3eaedeab11198d3a3b645393af
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:16 -05:00
Allan Stephens 06f10df990 Eliminate references to VXMICRO_TOOL
Since the build system now supports only one toolchain, the
VXMICRO_TOOL environment variable is obsolete. The sanity
check scripts that reference this symbol are revised accordingly.

(Note: As a temporary measure, the main sanity check script
continues to accept the -T option; however, the option has no
effect.)

Change-Id: I383b128b9f5b07164abb7ddeb5a699d819a20316
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens 815c6406bc Rename VPF files to use MDEF file extension
The file extension indicates a "Microkernel DEFinitions" file,
and no longer reflects the obsolete VxMicro/Viper branding.

Change-Id: Ib95b271404a4a4737e851d603c371244fa609e4d
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens 57de8be493 Eliminate VxMicro branding in sample projects
Eliminates references to the obsolete OS name. In most cases the name
is simply removed, as it isn't necessary.

Change-Id: I3796f2aebe802f8c6045b7424a3e7aab4d5fb8e8
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens 5b291d3567 Eliminate VxMicro branding in main application include file
File is renamed to zephyr.h.

Change-Id: Ice7ab9318c525630572023614b5bed67ae0400c1
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens a2a14a30b4 Eliminate VxMicro branding in sample project output
Gets rid of obsolete OS name, which isn't really necessary anyway.

Change-Id: Ic25b3addd43c84a75dacd6c61fdcc7a53217d320
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens b1190a00ba Get rid of VxMicro-specific warning from VPF files
This warning isn't relevant to Zephyr OS.

Change-Id: I8a115dec61c0c325e5b09337cd3a785fb0f5c75b
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens fb7a75cb46 Eliminate unnecessary microkernel symbols
The ENDGROUP symbol isn't needed as it is identical in nature to
ENDLIST. The EMPTYID symbol isn't referenced anywhere (or described).

Change-Id: Ic2ba115ee6cde65fa5e57f8607ffa95979ba5f5a
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens d6db256249 Add missing #includes required to reference non-kernel APIs
Several files were not explicitly including APIs that they reference,
which could eventually lead to trouble.

Change-Id: Ib33cadfa658280df3fcb4c670463d41b63097b31
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:14 -05:00
Allan Stephens a27910091a Avoid use of "ukernel" terminology in some sample projects
Gets rid of this non-standard terminology, and spells out
"microkernel" in full (when needed at all).

Change-Id: Ibfae84225fdceb526d8732bc23a0885f2d3be462
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:14 -05:00
Allan Stephens e3108813cc Revise misleading instructions in sample project README.txt files
Removes the instruction directing users to issue "make pristine"
before building a sample project, as this should be unnecessary
under normal circumstances and can cause the user to unexpectedly
lose their current configuration information. In its place, a section
on troubleshooting is added that describes how to rebuild a project
using the desired configuration.

Change-Id: I4eaace2888000c3ec5d101c27a38c74c2987312e
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:14 -05:00
Allan Stephens a1bd59de35 Eliminate obsolete coding convention comments
Gets rid of single-line comments required by a previous set of
coding conventions. These comments provide no value to readers
and just clutter things up.

Change-Id: I2a08b12cf5026253de56979efdfc510e7e68defe
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:14 -05:00
Allan Stephens 5a4be58707 Eliminate non-standard boolean type support
Revises kernel so that it uses the standard boolean type library
defined for C99, rather than having its own custom boolean type.

Also revises sample projects that used the non-standard type.

Change-Id: Ib41b7f836da25352aa5ae9dfbbfdd29739017b6f
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:14 -05:00
Allan Stephens 4e74e65744 Delete obsolete file for testing secure string APIs
As a result of the conversion to the new build system, this file
was missed when the test project was eliminated.

Change-Id: Ie61d2549910cfeee2c0627451d05a5b1faff3deb
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:14 -05:00
Anas Nashif aae59d0b62 Use a simpler form for including BSP headers
Change-Id: I44427225658e90b64dbc0881e4effc1debafeda6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:14 -05:00
Anas Nashif bbe84f8ae5 Use ccflags-y and asflags-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." However, using make EXTRA_CFLAGS="-DSOMETHING" results in
EXTRA_CFLAGS from Makefiles being overwritten, obviously breaking the
build.  This patch converts to them to the newer ccflags-y which also
fixes the problem.

Change-Id: I6309439599d4c9cc184f9ecd941bde841982ef07
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:14 -05:00
Peter Mitsis 63d6a95738 Apply __stack tag to sample project fiber stacks
Updates sample projects to ensure that fiber stacks are properly aligned by
using the __stack tag.

Change-Id: I4f92033571d65aa87b6d46da5d7cb6d92eadc27a
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:13 -05:00
Peter Mitsis e948817ee5 Reduce floating point test duration
The length of time it took for the microkernel's test_fp_sharing test to run
was occasionally causing issues with sanity_chk.  The test would take close
to five minutes to finish and sanity_chk has a five minute timeout for the
tests.  To resolve this, the number of iterations for which the test executes
has been cut in half (from 1000 to 500).

Change-Id: I171b96f6af81a8b08d0367beecab536f16d1ca7e
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:13 -05:00
Peter Mitsis d209b880ab Rework testing of task_timer_alloc()
Future commits will prevent task_timer_alloc() from returning
INVALID_OBJECT.

Change-Id: Ib7ec2e0fafb625223d762d73f15c128f134169b3
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:13 -05:00
Peter Mitsis ded4609cfa Use CONFIG_NUM_TIMER_PACKETS in microkernel test_timer project
The number of timers in the system is no longer configured via the VPF, but
rather through the kconfig option NUM_TIMER_PACKETS.

Change-Id: I58a4b3009e183a9d04e3618418baa73ed296d0af
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:13 -05:00
Allan Stephens 40a719d584 Add "sys_" prefix to public kernel versioning APIs
Eliminates the need to reserve the "kernel_" prefix in the
kernel namespace. Also, aligns versioning with other APIs
that are neither nanokernel_ or microkernel-specific, such
as the system clock APIs.

Change-Id: I81e43cd03849b45a4b432b0875dc8b1d5862dba9
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:13 -05:00
Allan Stephens 140d314336 Eliminate references to k_memset() and k_memcpy()
Since the kernel now provides a minimal string library, there is
no longer any reason not to use the standard memset() and memcpy()
APIs.

Change-Id: Iad587ace6f41fd94c9c961d13d9322495a7da1be
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:12 -05:00
Allan Stephens cb2d18cc83 Eliminate secure string library routines
These routines are either unused, or are always used in manner
that does not require their added security checking.

Change-Id: I6f484924ebc3d395a20879445a2fcabebf6c5014
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:12 -05:00
Allan Stephens 4b105f459d Eliminate testing of secure string library code
Test project is no longer needed, since the associated library
is now scheduled for removal.

Change-Id: I843018e647c4bdc82c785ae21dbfa9de608c0d50
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:12 -05:00
Dan Kalowsky c02dd34277 Renaming include/nanokernel to include/arch
Renaming the directory include/nanokernel to be include/arch, which
better reflects the real nature of the directory and the contents
inside.

Change-Id: I2bc33ebc6715e2f0403227a558279fdf52398ade
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:14:12 -05:00
Dmitriy Korovkin b08727ed2d Add random number API test
Change-Id: I810705c84609ca3497cc1d2dd7a2f7706f140815
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-02-05 20:14:12 -05:00
Anas Nashif 8e9d8ebfd2 Remove nodes naming when using sysgen
Change-Id: I8914c25ad18d3c294f398f98efca04c3ac371f44
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:12 -05:00
Juan Manuel Cruz 988236f2b9 Kbuild: Output files at outdir directory.
This commit enables the outdir directory.
Kbuild output files will be generated at the outdir directory
inside the project directory.

Change-Id: Icec04aca1753326c9d50dea20c71850c1d8c3dd0
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:10 -05:00
Juan Manuel Cruz 0e16c49454 Kbuild: Fix to minuteia boot_time check.
This commit fixes an issue with the boot_time sanity check
when tested for minute ia processor.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Ia5be3ceaf71114412819bac131b71686d775c6ca
2016-02-05 20:14:09 -05:00
Juan Manuel Cruz dc5a457847 Kbuild: Changing build parameter CONF_OVERLAY to CONF_FILE
This commit changes the build parameter CONF_OVERLAY with the
name CONF_FILE.

Change-Id: I404a4aa87b167a9ca4e7b395d53c2f7794b232bc
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:09 -05:00
Juan Manuel Cruz 69e086d5a7 Kbuild: Fix for nanokernel boot_time sanity test.
This commit fixes a kconfig dependency in the nanokernel boot_time
sanity expert test.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Ieb5c3c2033045a7db0382298ade8427cf31d713a
2016-02-05 20:14:09 -05:00
Anas Nashif 58cb972619 Kbuild: fix bluetooth samples
Change-Id: I2f720e71886d302a4ff9887b705c753b923ca8c1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:09 -05:00
Anas Nashif ebde8bf780 Kbuild: make new bluetooth sample build
Change-Id: I0664e7f96274e8dad8d66082ca7336a1f094ec47

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:09 -05:00
Anas Nashif abd4ed0b60 VXMICRO_BASE -> TIMO_BASE
Change-Id: I0861d831546ea4b27fb700c341b5c1055c57e24e

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:09 -05:00
Anas Nashif c4d7bcac5a Kbuild: remove obsolete *.mk files
Change-Id: I2d2f4bbe88ccb97a11cae08dd5f4b0618a60e3b8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:09 -05:00
Juan Manuel Cruz be64ff26a4 Kbuild: Removing TIMO_BASE setting from samples Makefiles.
This commit removes the TIMO_BASE setting from the sample
Makefiles.

Change-Id: Iff487ecb1e412e379528cca520470f87123cf4b4
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:09 -05:00
Anas Nashif d2ca03270e Kbuild: Fix sanity checks for quark
Change-Id: Id142f337f715590fa63d9f7b957f51c203743566
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:08 -05:00
Juan Manuel Cruz 5fbb5f6420 Kbuild: Adding bluetooth sanity checks.
This commit adds the Makefiles to add sanity checks for
the bluetooth driver.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Iadfe6eb2662347a981393ffeb3e343f32c5f67f0
2016-02-05 20:14:08 -05:00
Anas Nashif 432b30ce93 Kbuild: metrics config dependency resolved
It seems CONFIG_PERFORMANCE_METRICS is needed for this
test to build, so enabling it.

Change-Id: Iafc0be794f0931b33bcef2ba3ace56ee88f75258
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:08 -05:00
Anas Nashif 1aa5ee8188 Kbuild: include inc file at the end
Change-Id: Ib8023ea695c49b6cc3d7076a130da57dc5f81c52

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:08 -05:00
Anas Nashif 933806d72a Kbuild: fixed SOURCE_DIR path
Change-Id: I9c1824001987d5a7b4f083bb5809bf8bbb41364d

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:08 -05:00
Anas Nashif b8fd8e932f Kbuild: make test case build
Change-Id: I1bb91e584b978f686a668c9698f8cad7bb835bd2

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:08 -05:00
Juan Manuel Cruz 8fc9de7acb Kbuild: Update for the source Makefile of test_fp_sharing.
This commit updates the source Makefile for test_fp_sharing.

Change-Id: Iab70d6fb3b17b8e078549130b10c6c9c8a956b73
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:07 -05:00
Juan Manuel Cruz 890c2e5f32 Kbuild: Updates to the nanokernel config overlays.
This commit updates the dependency symbols needed in the
nanokernel config overlay files.

Change-Id: I838b76aefa79e6079b4c8420125c7e711b6441d7
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:07 -05:00
Juan Manuel Cruz e808b2125b Kbuild: Updates to the microkernel config overlays.
This commit updates the dependency symbols needed in the
microkernel config overlay files.

Change-Id: I0a846956a7d0d6aaa93cd4bf11ba3853f6301220
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:07 -05:00
Juan Manuel Cruz 5565712635 Kbuild: Root Makefiles for microkernel sanity tests.
This commit adds all the root Makefiles needed by the
microkernel sanity tests.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I7a267a180ba617ce95a499dcf2782630273e8566
2016-02-05 20:14:07 -05:00
Juan Manuel Cruz ca8ac2d9bc Kbuild: Root Makefiles for nanokernel sanity tests.
This commit adds all the root Makefiles needed by the sanity tests.

Change-Id: I7ef21d0bcd2c383218d600d291111861fe307abd
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:07 -05:00
Juan Manuel Cruz 20d0bad007 Kbuild: Update on benchmark-latency measure test
This commit updates the list of files that compose the
benchmark-latency measure test.

The raise_int.c files is copied from the test: test_task_irq
because there is no clean way to reference this source outside
of the project in Kbuild.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I20d5cdd042ba35945d213e49e80004e886bfdc6e
2016-02-05 20:14:07 -05:00
Juan Manuel Cruz 23a0e053a6 Kbuild: Fix for nanokernel benchmark syskernel test.
This commit fixes the include path for the nanokernek
benchmark test.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I639126b7fcfe82357f166c602049bc09f195c103
2016-02-05 20:14:07 -05:00
Juan Manuel Cruz 5a5f16dcab Kbuild: Nanokernel benchmark test main Makefiles.
The following commits adds the main Makefiles for the nanokernel
benchmark test, using parameters to be used by the sanity check.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Ia7789ce83a1b6a62805a15fead57a1737a856c2c
2016-02-05 20:14:07 -05:00
Juan Manuel Cruz 0e1d6a037c Kbuild: Microkernel benchmark test main Makefiles.
The following commits adds the main Makefiles for the microkernel
benchmark test, using parameters to be used by the sanity check.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I7601df92006ca81b3680f6c2b4e25de076512e41
2016-02-05 20:14:07 -05:00
Juan Manuel Cruz dd26bf9446 Kbuild: EXPERIMENTAL ksymbol additions for benchmark conf snippets.
This commit adds the EXPERIMENTAL ksymbol to the configuration
snippets used by the benchmark tests.
Some configurations options in the snippets have dependencies
agains this ksymbol.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Ia714e913777a697cc8b1eafa0fc097496b5972c5
2016-02-05 20:14:07 -05:00
Juan Manuel Cruz 4f076467fd Kbuild: Micro and nano kernel apps samples.
This commit adds the parameters to the Makefile.kbuild for
micro and nano kernel apps samples.
This prepares the sample apps to be used by the sanity check.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I7636f0375493e12b4604f6fb6c4b6100d2c6604c
2016-02-05 20:14:07 -05:00
Juan Manuel Cruz f44f5e7b98 Kbuild: Makefiles for the benchmark tests.
This commit adds all the Makefiles needed to integrate the benchmark
testing in the Kbuild system.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I7b29cf7839e95b94acc27a45677a067ca5a0c00d
2016-02-05 20:14:07 -05:00
Anas Nashif 16a85c958d hello_world: Use kbuild Makefile
Change-Id: I7a9cf5cc133ab6ccbcd8b3ef32cf01e6b2f05c60

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:06 -05:00
Anas Nashif ae2228c954 philosophers: Use kbuild Makefile
Change-Id: I9db2755d515cc36dab2704a9b5dcf95358d2527a

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:06 -05:00
Anas Nashif 6eb4dbd3a4 philosophers: Use kbuild Makefile
Change-Id: I0bc2158e0b936a3e33674ffe0f4a45018a7be3ed

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:06 -05:00
Anas Nashif 7e04b5b6d3 hello_world: Use kbuild Makefile
Change-Id: I0365e9efcefa8698e4301f81036cb247c6e279c9

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:06 -05:00
Juan Manuel Cruz 732f1327d3 Kbuild: Philosophers makefile fix.
This commit fixes an issue with the Makefile describing the
philosophers demo.

Change-Id: I5502e207aa5d87c04e58daa2d391e2d89ba91a67
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:06 -05:00
Juan Manuel Cruz 9846fb257a Kbuild: Test Makefiles
This commit adds Makefiles for each sample test in the project.
The Makefiles integrate the test samples into the Kbuild system.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I8d84756836c1f7d00dc823d7ff76334c75304d66
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz 4ee8a8e042 Kbuild Makefile mechanism for samples and projects.
This commit adds the capability to the Kbuild system of adding
samples and projects to the build process.
This commits adds the hello_world and philosophers sample code
as an example of how to configure a project into the build
system.
The project can be hosted inside the kernel source tree or
outside the kernel source tree.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Id980e959ac6e0061f8227d5d81191a169bfc8fc3
2016-02-05 20:14:05 -05:00
Luiz Augusto von Dentz 3ea2c48899 Bluetooth: Fix advertising data of peripheral sample
An extended inquiry response or advertising data packet shall not contain
more than one instance for each Service UUID data size.

Change-Id: I41d1a25fdcb2987e8d0cadfb2110fd62b3685f17
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:04 -05:00
Luiz Augusto von Dentz a8f34a1c1e Bluetooth: Add Battery Service to peripheral sample
Add Battery Service along with its characteristics and descriptors
to the database table.

Change-Id: Ifb83ebcb4d6cdafa5df84d643b2e2a69e5a6c1e3
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:04 -05:00
Luiz Augusto von Dentz 1b793139db Bluetooth: Add Heart Rate Service to peripheral sample
Add Heart Rate Service along with its characteristics and descriptors
to the database table.

Change-Id: Ibff52da7352883edccb7c5b903538a81aad2ba55
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:04 -05:00
Luiz Augusto von Dentz 0d505e2045 Bluetooth: Add GAP primary service to peripheral sample
This adds attributes for Generic Access Profile.

Change-Id: I1fe08429f80341e7ba9fc06ef35a6df9b5abbf84
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:04 -05:00
Luiz Augusto von Dentz 06383eae4f Bluetooth: Fix beacon scan data
Length of "Test beacon" is 11 + 1 of type that should be 12 not 16.
In addition to that make the data variable static since they are only
used locally.

Change-Id: I2d7fb16cf7d383dafc9b083da6cd63a4d9be21c0
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:03 -05:00
Johan Hedberg 06098aa73e Bluetooth: Remove CONFIG_BLUETOOTH_DEBUG_HCI_CORE from samples
There's no point in enabling BLUETOOTH_DEBUG_HCI_CORE for the samples
as the user/developer is unlikely to be interested in this specific
sub-module of the Bluetooth stack. The samples already have the
BLUETOOTH_DEBUG enabled, so leave it up to the user/developer to
decide if they want to add specific sub-module debug options.

Change-Id: I327086464561667a2462db0aab00d0ffcdd40d4c
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:03 -05:00
Andrei Emeltchenko 3933278948 Bluetooth: Add ARM configuration for shell app
Change-Id: Ifa5bd8c82e4accd3778b45d7bb1af71b058c77e7
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:14:02 -05:00
Andrei Emeltchenko 87139e5e87 Bluetooth: Add peripheral app quick test to bt_regression
Build peripheral app for targets: pentium4 and ti_lm3s6965

Change-Id: Id98c94217ad39e1716b8f8bc6031b8814bae06f3
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:14:02 -05:00
Andrei Emeltchenko b428ef6d65 Bluetooth: Add ARM configuration to peripheral app
Change-Id: I23428811de2d825c75a3938354b1079550ba3911
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:14:02 -05:00
Luiz Augusto von Dentz 18af2d839b Bluetooth: Make local variable static in peripheral sample
Change-Id: I6ce9a8ccab3461c8e7bbd15b2b129c01c5bdaa9e
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:02 -05:00
Johan Hedberg a60a4aba2e Bluetooth: Fix includes for sample apps
Update the includes in the sample apps to match what their actual
dependencies are.

Change-Id: I6fdfa4ba0cda563433d51f0ec35fef8f2ee0fa40
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:02 -05:00
Allan Stephens 267753d967 Streamline public pipe APIs
1) Now invokes pipe routines directly, without the use of function
   pointers.
2) Eliminates unreferenced _DEVICE_CHANNEL symbol.

Change-Id: I6e26476265ed8f33febb5a06c9d03daf7147ee5e
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:00 -05:00
Peter Mitsis 1c313b6f89 Remove references to ICC
Keys off variations of "ICC" to remove references to the Intel C Compiler as
it is not supported.

Change-Id: I09f67880b39839982ed1c450e564c274440628a5
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:00 -05:00
Allan Stephens 7a4be5abf1 Allow AppKernel benchmark to utilize non-public microkernel APIs
This project requires access to non-public kernel structures
for testing purposes.

Change-Id: Ibfa119b99bda170498503cdbbee6b98f5cf41f54
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:00 -05:00
Johan Hedberg 99dce8cf7b test_libs: Add memcmp test case
The initial memcmp implementation was buggy, so to have at least some
sort of sanity testing of the implementation add a test case for it to
test_libs.

Change-Id: I9e1a48e4b646e80258c1689dde2461a6134dddf8
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:00 -05:00
Yonattan Louise 8f08126af8 Change task_irq_object from global to local variable.
The variable task_irq_object is global because the test_task_irq project
needed to access it. That data should only be accessed through the API.
To make the variable local, break that dependency to the test project
and restrict the access to the variable.

Change-Id: I1ccb21625d456714a038e0374d124b42aa72e577
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:14:00 -05:00
Yonattan Louise 5f9042e6c1 Fix whitespace issues
Fixing the folling whitespace issues:

- SPACE_BEFORE_TAB : We should not use white spaces before tabs to alignment.
- TRAILING_WHITESPACE : Lines should not end with a white space.
- QUOTED_WHITESPACE_BEFORE_NEWLINE : Removing unnecessary whitespace before a quoted newline.

Change-Id: I024e8d39164c5e5e9d8370f3499d21b49147feee
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:59 -05:00
Yonattan Louise 63e3a4e772 Fix checkpatch issue - ERROR:ELSE_AFTER_BRACE
The 'else' statement should be in the same line that the
close brace of the 'if' statement. E.g.:

	if (condition) {
		do_this();
		do_that();
	} else {
		otherwise();
	}

This commit fixed this kind of error using the following script:

	#!/bin/bash

	for file in $(find ./ -name "*.[ch]" ! -path "./scripts/*" ! -path "./host/src/wrsconfig/*");
	do
		if [ ! -h $file ];
		then
			sed -i '/^[ \t]*}$/ {
	:review_next_one_too
	N
	s/^\(.*\)\n[ \t]*else/\1 else/
	/}$/ b review_next_one_too
	}' $file;

		fi;
	done

Change-Id: I7e811a572d735fa08e84850055ebbde29eb10e8d
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:59 -05:00
Yonattan Louise 918cf45f33 Fix coding style of control statements
There should be a whitespace between the 'if', 'for' and 'while' statements
and the open brace. this commit fix this kind of error.

Change-Id: I4bae17d98f8ec8b698d40253a9a4c873111a8904
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:59 -05:00
Allan Stephens ed29b076ea Eliminate unneeded non-public APIs from generated vxmicro.h
There is no longer a reason to expose information about the
internels of the microkernel's event subsystem to application
files.

Note: The one sample project that tests event processing now
explicitly declares any non-public event APIs in requires.

Change-Id: I4c3f85a7b0bc485713c21424a923102b4f400ced
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:59 -05:00
Yonattan Louise b0b11989df Fix checkpatch issue - WARNING:LONG_LINE
Line's length should be shorten than 100 characters. This commit
fixes these lines separating them into two parts.

Change-Id: Ic68c9086866cd778187aa1465470acc0485e2271
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:59 -05:00
Yonattan Louise dbada63eee Fix coding style issues.
Some checkpatch issues were solved by scripts leaving other problems
such as alignment and indentation issues.  In order to comply with the
defined coding style the following fixes were made:

- Fixed the function declaration moving the parameters' comments above
  the function in accordance to the doxygen format.
- Fixed functions' opening and closing brackets. These brackets should
  not be indented.
- Fixed the 'if', 'for' and 'while' statements adding the brackets
  around the sentence.
- Fixed comments' alignment.
- Fixed indentation.

The work was done manually and submitted as one commit. I didn't
separate these changes in different commits because they were fixed all
at once. Basically, all errors were fixed in every file at once.

Change-Id: Icc94a10bfd2cff82007ce60df23b2ccd4c30268d
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:59 -05:00
Yonattan Louise d133f9661d Fix checkpatch issue - WARNING:SPACING
This commit fixes the issue marked as SPACING by the checkpatch script
deleting the whitespaces between the function name and the open parenthesis.

Change-Id: I972b1646904bf6e1131263f94ab5024a528ae07d
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:59 -05:00
Arkadiusz Lichwa f170898634 Bluetooth: Add simple LE scan app
Use scan functionality by simple app that starts LE scan
and in a while stops it.
It uses basic HCI scan interface prepared for
supporting LE central role feature.

Change-Id: Idcde4c742290d46931ab86522e51b0fc547a2d42
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-05 20:13:58 -05:00
Andrei Emeltchenko 5fffe2f225 Bluetooth: Set default toolchain to gcc
Set the toolchain in case the user doesn't have it set in their
environment.

Change-Id: Ia961598bc125ded9326747cc8c5810635a8481d5
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:13:58 -05:00
Andrei Emeltchenko a9cd5276ec Bluetooth: Enable HCI_CORE debug for samples
Enabling HCI_CORE debug helps to identify possible bugs.

Change-Id: I13df39d63ee9b15f83503d86edc71733c7db94d5
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:13:57 -05:00
Andrei Emeltchenko fa2473d912 Bluetooth: Allow redefine QEMU_EXTRA_FLAGS
Allowing to redefine QEMU_EXTRA_FLAGS helps to overcome user channel
stuck cases, you still have the possibility to use bluetooth over tcp
by specifying QEMU_EXTRA_FLAGS="-serial tcp:...". Default behavior
remains the same though.

Change-Id: I3a8190a1ca04029e788bfd424f3b3a3be9f2af75
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:13:57 -05:00
Andrei Emeltchenko f8df842dd5 Bluetooth: Add compile test for nanokernel shell app
Bluetooth regression and system regression would run compile test
for shell app.

Change-Id: I029772483e7aa9ac0717db760d8de1f6be3371b5
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:13:57 -05:00
Andrei Emeltchenko e15102a206 Bluetooth: Add nanokernel configuration for shell app
Add support for nanokernel build for shell application.

Change-Id: Idf5f3673050c2ac4c941dc9164536fc487e9216b
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:13:57 -05:00
Andrei Emeltchenko f3794dd657 Bluetooth: Update README with recent changes
Remove old way of starting qemu target and add extra information.

Change-Id: I37c378aa0eb873b3fc16362991eec8a6b661626b
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:13:57 -05:00
Andrei Emeltchenko 0f73da74c5 Bluetooth: Add Bluetooth shell sample application
Bluetooth shell sample application make use of serial console shell
and register Bluetooth commands to it. It shows example how console
shell might be used.

Change-Id: I98340422b90e85dc7a2c44823536121999a08952
Co-authored-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:13:57 -05:00
Luiz Augusto von Dentz 7f1119bb2e Bluetooth: Remove unnecessary PRJ_INCPATH
It is not necessary to add any PRJ_INCPATH in order to build Bluetooth
samples.

Change-Id: I3ddb0a645e475d937a7067059e8bf5caa783a04e
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:13:56 -05:00
Luiz Augusto von Dentz 8fc12c1600 Bluetooth: Add LE beacon sample app
Adds a sample which initializes Bluetooth and enables non-connectable
advertising (i.e. starts acting in the LE broadcaster role).

Change-Id: Ic554b1354464b357b44215af1c0b613f123aeb5d
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:13:56 -05:00
Andrei Emeltchenko 607819ec5e Bluetooth: Add bt_regression script based on scripts/regression
bt_regression scripts builds all listed projects for all
configurations mentioned in the PRJ_LIST. For targets specified with
"!" it executes test in qemu.

Change-Id: I971a797b2a89547bb14208d0d43d1a36597bad52
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:13:56 -05:00
Andrei Emeltchenko 9bfda983d8 Bluetooth: Add arm targets for init sample
Add new targets for sanity_chk script: fsl_frdm_k64f and ti_lm3s6965,
this would add compile tests for mentioned BSPs in sanity check
script.

Change-Id: I556f8e3a5048d2a58ab09b10197e0cc6fb3c8765
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:13:56 -05:00
Andrei Emeltchenko 0ec0ea297d Bluetooth: Add arm targets for microkernel sanity test
Add ti_lm3s6965 and fsl_frdm_k64f targets for bluetooth test.

Change-Id: Ibbe8ebbab72abb02505f47a82c904f0e9460e812
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:13:56 -05:00
Andrei Emeltchenko 81a97132de Bluetooth: Add arm targets for nanokernel sanity test
Add ti_lm3s6965 and fsl_frdm_k64f targets for bluetooth test.

Change-Id: I054c9500511fe40969127445444f85f3fe85902c
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:13:56 -05:00
Luiz Augusto von Dentz b3cdfed003 Bluetooth: Extend advertising API
Extend bt_start_advertising to make it possible to add any data type
instead of just the name.

Change-Id: I3f2afe1eb64aec51f321f7fd7439e97b3d67374c
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:13:56 -05:00
Allan Stephens 678a2a90bd Limit exposure of non-public microkernel "no-op" API
Hides the existence of _task_nop() from everyone but the
microkernel's no-op subsystem itself. (This change forces the
sample benchmark project that measures no-op performance to
explicitly declare this API itself.)

Change-Id: I0cb2ec32d1c56b10743d5b2e727de2d5a99c95ea
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:55 -05:00
Dan Kalowsky 7b07e940eb Adding in strchr_test
Change-Id: I6da121bb8df48b2f826cfd16fa92c6c383acadce
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:55 -05:00
Dan Kalowsky a6ecac0603 Adding in strncmp test
Change-Id: Ieeb4959257ff366f717bece60a005a0f6a7e729f
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:55 -05:00
Dan Kalowsky 453ca9a402 Adding in strncpy test
Change-Id: I9aec8de9d11f6624e1aea01399040d38a08967cd
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:55 -05:00
Dan Kalowsky 66c0ad748d Adding in strcpy test
Change-Id: I0d278d8f49c038c1ec4f3107a26adbf524d6d9a2
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:55 -05:00
Dan Kalowsky a437761843 Adding in test for strcmp
Change-Id: I07c8a8477fb7bca0005744376bea6c21dd8f0c7f
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:55 -05:00
Dan Kalowsky 190833c66e Adding in strlen test
Change-Id: I8f8aec8589bb32bc983c07633a5c0fd5dcd65d4c
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:55 -05:00
Dan Kalowsky d4ca47573f Adding a string memset test
This is renaming the current stringTest to a stringMemsetTest as a
start to adding in all the other string tests that are currently
not covered.

Change-Id: Ic8fb9263e5588fe16a2cadbec24ffc0565c8224b
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:55 -05:00
Dan Kalowsky fd7109e015 Enabling the libc tests
Currently these tests are disabled in the regression_chk
application.

Change-Id: Ibf53b25a08201db0b50df7dca96f638b419ea4a8
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:55 -05:00
Dan Kalowsky 6831211944 Adding in TC_END_RESULT call
All the other test_* functions have recently had this added in.
Bringing this in to be consistent with the other functions.

Change-Id: If8adf58a82445f6b509015c56937353fab79d823
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:55 -05:00
Dan Kalowsky 23ed8c2f20 WS fix on indentation
Change-Id: I0657ae639e8ff31f336da54598248ef64fe97972
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:55 -05:00
Dan Kalowsky 5ed849961e Aligning comment indentations
Change-Id: I0d9acec1a7d37fe48ca1c74c71c674a7000afb09
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:55 -05:00
Dan Kalowsky a56d62fa11 Fixing bracket alignment
Change-Id: Ieb7210acf0502d05aab58ae47872112696520cbe
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:55 -05:00
Dan Kalowsky d6f5fa36ae Fixing the test_libs functions
After the tree re-structuring, several of the files that the test_libs
functions use are no longer valid, from headers to functions.  Updating
to run on the current lay of the land.

Change-Id: I3359a782f5ae8faa7909a13a4cca47f82c22797f
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:55 -05:00
Yonattan Louise a8571c4b7f Fix checkpatch issue - WARNING:SPACING
Spaces between the function name and the open parenthesis are not allowed.
This commit fixes the case where only one open parenthesis with leading
whitespaces is present in the line.

	#!/bin/bash

	checkpatch_script="$VXMICRO_BASE/scripts/checkpatch.pl --mailback --no-tree -f --emacs --summary-file --show-types --ignore BRACES,PRINTK_WITHOUT_KERN_LEVEL,SPLIT_STRING --max-line-length=100 "

	for file in $(find ./ -name "*.[ch]" ! -path "./scripts/*" ! -path "./host/src/wrsconfig/*");
	do
		# fixing spaces between function name and open parenthesis
		for line in $(eval $checkpatch_script $file | grep "WARNING:SPACING: space prohibited between function name and open parenthesis '('" | cut -d":" -f2)
		do
			echo "$file : $line"
			sed -i ''$line' { /[ \t](.*[ \t](/ b skip_it s/[ \t]*(/(/ ; :skip_it }' $file;
		done;
	done;

Change-Id: I1e026eaee930e297374e5f2f725b78f29824dee3
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:54 -05:00
Yonattan Louise c41d243602 Fix checkpatch issue - WARNING:LEADING_SPACE
Changing each four whitespaces for one tab at the beginning of the
lines that the checkpatch script marks as having the warning LEADING_SPACE.

Change accomplished with the following script:

	#!/bin/bash
	checkpatch_script="$VXMICRO_BASE/scripts/checkpatch.pl --mailback --no-tree -f --emacs --summary-file --show-types --ignore BRACES,PRINTK_WITHOUT_KERN_LEVEL,SPLIT_STRING --max-line-length=100 "
	for file in $(find ./ -name "*.[ch]" ! -path "./scripts/*" ! -path "./host/src/wrsconfig/*");
	do
		for line in $(eval $checkpatch_script $file | grep "WARNING:LEADING_SPACE" | cut -d":" -f2)
		do
			sed -i -r -e ''$line' {s/^    /\t/; s/^([\t]*)    /\1\t/g}' $file;
		done;
	done;

Change-Id: I999e59710f52098ad3ec336b99c05356215cc671
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:54 -05:00
Yonattan Louise 3f1439bf2d Fix checkpatch issue - ERROR:OPEN_BRACE
The open braces of the 'if','for', 'while' and 'do' statements should be at the end on the
same line of the statement to comply with the defined coding style. E.g.:

	if (x is true) {
		we do y
	}

Change accomplished with the following script:

	#!/bin/bash

	checkpatch_script="$VXMICRO_BASE/scripts/checkpatch.pl --mailback --no-tree -f --emacs --summary-file --show-types --ignore BRACES,PRINTK_WITHOUT_KERN_LEVEL,SPLIT_STRING --max-line-length=100 "

	for file in $(find ./ -name "*.[ch]" ! -path "./scripts/*" ! -path "./host/src/wrsconfig/*" ! -path "*/outdir/*");
	do
		if [ ! -h $file ];
		then
			# obtaining the line's number where the error is reported in a reversed order
			reversed_lines="";
			for line in $(eval $checkpatch_script $file | grep "ERROR:OPEN_BRACE" | cut -d":" -f2)
			do
				reversed_lines="$line $reversed_lines";
			done;

			# fixing the issues in reverse order due to lines can be deleted affecting futher lines
			for line_reported in $(echo $reversed_lines);
			do
				# search for the line where the open brace is
				char_found="";
				let line=$line_reported-1;
				while [ ${#char_found} -eq 0 ]
				do
					let line=$line+1;
					char_found="$(sed -n ''$line' { /{/ p }' $file)";
				done

				let statement_line=$line-1;
				let brace_line=$line;

				# condition to avoid modifying lines that ends with the character "\"
				char_found="$(sed -n ''$statement_line' { /\\$/ p }' $file)";
				if [ ${#char_found} -eq 0 ];
				then
					# fix the issue
					echo "$file : reported on $line_reported (found on $brace_line -> moved to $statement_line)";
					sed -i ''$statement_line' { s/[ \t]*$//; s/\([ \t]*\/\*.*\*\/\)$/ {\1/; /{/ b already_done s/$/ {/; :already_done }; '$brace_line' { s/{[ \t]*//; /^[ \t]*$/ d }; ' $file;
				fi
			done
		fi
	done;

Change-Id: I517c40bb33840ef531f2319354350f578b238abb
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:54 -05:00
Johan Hedberg 8f7435ce0f samples: Use common ARRAY_SIZE() helper in all places
Instead of having custom helpers (like NELEMENTS) for evaluating the
array size avoid the code duplication by using the now available
ARRAY_SIZE macro.

Change-Id: I40e2e55bd4a68e3d24854c12086432aa17ce1abe
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:13:54 -05:00
Yonattan Louise 3d97587691 Rename _IdtBaseAddress to _idt_base_address
Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" -o -name "*.arch" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I5c4719458d7bb90af2ba21594deed6885f958d34
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:54 -05:00
Yonattan Louise 817e2b275f Rename _IrqVectorTable to _irq_vector_table
Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" -o -name "*.arch" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Id3f9096f28a1bf98035c6a531cd8d2dc66e6448a
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:53 -05:00
Benjamin Walsh 418e3d361b test_lifo: add multiple-waiters scenario
A number of fibers pend on a LIFO, then the task queues data on it, once
for each waiter. Each time, the first fiber in the queue wakes up, is
context-switched to, verifies the data is the one expected, and gives a
semaphore. The task finally must be able to obtain the semaphore an
amount of times equals to the number of fibers.

Change-Id: I2709ec56368fc72d365bd752657fb319a9b6c394
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:53 -05:00
Benjamin Walsh 654afe9519 test_sema: add multiple-waiters scenario
A number of fibers pend on a semaphore, then the task give the semaphore
once for each waiter. Each time, the first fiber in the queue wakes up,
is context-switched to, and gives another semaphore. The task finally
must be able to obtain the second semaphore an amount of times equals to
the number of fibers.

Change-Id: I36bcd6f5b1b0df73fdb35c2dbbbc639fec9dbae8
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:53 -05:00
Dmitriy Korovkin 3342ddf012 Change _nano_ticks to 64-bit
Change _nano_ticks to 64-bit with the functions that operate it
for the consistency with microkernel.

Introduce *_tick_delta() functions that return 64-bit value
and *_tick_delta_32() that return low 32 bits.

Change-Id: Id02c9f4b2b5c309ad9aa0a82bb7f4330af7e34a3
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-02-05 20:13:52 -05:00
Dmitriy Korovkin c83d58c6e1 Add compiler dependent headers for test inline assembler code
In order to better support different compilers, each test that
uses inline assembler, includes a compiler specific header file
that contains the proper code.

Change-Id: I7e2e27a0663501f934a5bb3539f7e23670a1e755
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-02-05 20:13:52 -05:00
Allan Stephens e68347e4a6 Delete obsolete KHEAP_SIZE and KHEAP_SIZE_FIXED config options
These options are no longer required as malloc-type support has
been previously eliminated.

Change-Id: I93fdb93395bc53c8a550a64fa61a7339d74ba278
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:51 -05:00
Dan Kalowsky ceeab10167 Renaming *_node_tick_delta to just *_tick_delta
This renaming will impact the following functions:
nano_node_tick_delta
task_node_tick_delta

Change-Id: I5d3fdfe0121674d88b8f3d8777150b2242b88d1a
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:51 -05:00
Dan Kalowsky c46f1082d8 Renaming *_node_cycle_get_32 to *_cycle_get_32
We no longer support the concept of nodes.

This will impact:
task_node_cycle_get_32
isr_node_cycle_get_32
nano_node_cycle_get_32

This change also updates the nanokernel test API to work with the change.

Change-Id: I68de883b07d4775b09fda13e503c040b3f14baa7
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:51 -05:00
Dan Kalowsky 901c4f94d3 Renaming *_node_tick_get_32 to *_tick_get_32
We no longer support the concept of nodes.  This will impact the following
functions:

task_node_tick_get_32
isr_node_tick_get_32
nano_node_tick_get_32

Change-Id: I27184c76516da16a0c3f335656f9efcee2fb549d
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:51 -05:00
Andrei Emeltchenko 781c5be2e5 Bluetooth: Enable HCI_CORE debug for samples
This enables debug for HCI_CORE for samples.

Change-Id: Ide0b3c3db0165a5d00439a7bd05fb516bf67a2f5
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:13:50 -05:00
Andrei Emeltchenko f269260b8d Bluetooth: Enable debug for Bluetooth samples and tests
Enable CONFIG_BLUETOOTH_DEBUG option for Bluetooth samples.

Change-Id: Id0d0377082b16f78f15c5e968c866bed2df69844
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:13:50 -05:00
Andrei Emeltchenko 97892857e9 Bluetooth: Add nanokernel sample init application
Add nanokernel configuration to build Bluetooth init sample. Later on
sample would added to sanity check builds.

Change-Id: Ib7251c1b3f5d62c4f1e0bb1fba253ebb1e9342df
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:13:50 -05:00
Andrei Emeltchenko de1477759c Bluetooth: Add Bluetooth microkernel smoke test
The test registers Bluetooth driver to Bluetooth the subsystem and
runs bt_init() which calls open() callback. We return expected error
to indicate that there is no real Bluetooth device attached.

Change-Id: I39526acbb25e7d4bb322d4511659a40505874592
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:13:50 -05:00
Andrei Emeltchenko 3760dc8709 Bluetooth: Add Bluetooth nanokernel smoke test
The test registers Bluetooth driver to the Bluetooth subsystem and
runs bt_init() which calls open() callback. We return expected error
to indicate that there is no real Bluetooth device attached.

Change-Id: I1b324c82ce8be2ce73f2b41a07135b0bc76eed61
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:13:50 -05:00
Johan Hedberg 5bba29f55a Bluetooth: Add LE peripheral sample app
This patch adds a simple app which initializes Bluetooth and enables
connectable advertising (i.e. starts acting in the LE peripheral
role).

Change-Id: I15bb43ce657b5592d32187a0dfd22ba8bd912641
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:13:49 -05:00
Allan Stephens ed7a3d2724 Update minimum nanokernel footprint benchmark
Revises the nanokernel footprint benchmark project so that the
minimum x86 configuration explicitly excludes support for the
system timer. (This doesn't actually save any memory, since timer
support was already being excluded; however, the project now makes
this lack more apparent, and does it the same way as the minimum
microkernel benchmark project does it.)

Change-Id: I509994bb640fee3208e4c1397a79cd134172370a
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:49 -05:00
Allan Stephens 9b400e6f89 Update minimum microkernel footprint benchmark
Revises the microkernel footprint benchmark project so that the
minimum x86 configuration excludes support for the system timer.
The resulting "tickless kernel" image is about 1200 bytes smaller
(about 15%).

Change-Id: Ie7be8427963818c7d0d75173d3da844722487f0b
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:49 -05:00
Allan Stephens 1cb6e5fbb5 Remove LITE-related dependency for app_kernel benchmark
Benchmark code that depends on the state of LITE-related symbols
has this dependency removed, and is now coded as if these symbols
are not defined. This change has no operational impact, as LITE-
related symbols were never defined.

Change-Id: I9b9a108223903b8e4dd675a599ca5b8e5cbe7fc7
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:49 -05:00
Peter Mitsis 9dec8d068c samples: remove SECTION_GARBAGE_COLLECTION
By default, the kconfig option SECTION_GARBAGE_COLLECTION is already enabled.
Removing this option from the project configuration files does not change the
resulting images.

Change-Id: I0f3329aa15a341c2c1082f75162b2b3e12447a26
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:13:48 -05:00
Allan Stephens c6fbf4d8fc Configure number of task priorities for sample projects
Explicitly configures the number of task priorities for sample
projects that require more than 16 priorities. (This ensures
that the projects continue to work properly when the default
value of NUM_TASK_PRIORITIES is reduced to 16 in an upcoming
commit.)

Change-Id: I03b9ae68a6b782c62c8799f44d17e659e7d6074e
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:48 -05:00
Allan Stephens 6f75c5a9c2 Configure task priority queues in microkernel footprint benchmark
Revises the microkernel footprint benchmark sample projects to take
advantage of the NUM_TASK_PRIORITIES configuration option. Most
notably, this reduces the size of the minimum microkernel configuration
by over 500 bytes.

Change-Id: I2be1b0a5a09800559df4d1bf355de38d6c0b9ab3
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:48 -05:00
Peter Mitsis 4694dae214 boot_time: Only set CPU_CLOCK_FREQ_MHZ if necessary
Removes the assignment of kconfig option CONFIG_CPU_CLOCK_FREQ_MHZ from
boot_time project configuration files that redundantly set it to the default
value (20).

Change-Id: I901b2d4dc85d1de53dc4a1809b422ee16301ac03
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:13:48 -05:00
Peter Mitsis 4ebd11258c Remove references to Simics from README.txt files
Simics is not supported.  As such, the sample project README.txt files must
not provide instructions on how to execute an image using Simics.

Change-Id: I6cc09169902b5e10f50799c280d0bbc63f1ae624
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:13:48 -05:00
David Norris 8a0db0aa11 Convert nano/test TC_END to TC_END_RESULT
All uses of TC_END are functionaly equivalent to each other
and to the TC_END_RESULT macro.  Change TC_END to TC_END_RESULT
so that they are consistent.  In the future when TC_END_RESULT
is extended/expanded, it only has to be done in one place.

Change-Id: I61bad52098187f6115896688e0a545d202b6fd05
Signed-off-by: David Norris <david.norris@intel.com>
2016-02-05 20:13:45 -05:00
David Norris df8f130910 add calls to TC_END_RESULT to be consistent
most places call TC_END_RESULT before calling TC_END_REPORT.
These new calls to TC_END_RESULT are added so it is used
consistently in the microkernel tests.

Change-Id: I1125662c47a487b1bf4054d63ee2b9dc314a253e
Signed-off-by: David Norris <david.norris@intel.com>
2016-02-05 20:13:45 -05:00
Benjamin Walsh 531f1c3695 samples: remove explicit enabling of SW_ISR_TABLE/DYNAMIC
These options are now enabled by default.

Change-Id: Ie7f2abb7b7c89f1a5a02ddc831367710a3d72c1f
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:45 -05:00
Allan Stephens 3f6c0e51dd Remove unnecessary sample project use of GDB_INFO
Revises ARM M3/4 ISR installation project, which doesn't actually
require the GDB_INFO capability.

Change-Id: I9eefba5678e2c4a0fa7a8e57df603d25af144eb1
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:45 -05:00
Allan Stephens 9d0c28b892 Remove unnecessary sample project use of CONTEXT_MONITOR
Revises boot time benchmarking project so it doesn't utilize the
CONTEXT_MONITOR capabililty, which is still [EXPERIMENTAL] and thus
could result in potentially misleading results.

Revises ARM M3/4 ISR installation project, which doesn't actual
require the CONTEXT_MONITOR capability.

Change-Id: I45d2abe85a0049b0c745652d2e78210c9696016d
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:45 -05:00
Allan Stephens c7661eb981 Transform HOST_TOOLS_SUPPORT config option to CONTEXT_MONITOR
Revises this option to make its purpose clearer, and to align it
with other experimantal monitoring-type configuration options.

Change-Id: I593bb7560b5a0544eb05affaa07b59dd78ea907e
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:45 -05:00
Johan Hedberg 7b6d006255 Bluetooth: Add Bluetooth init sample
This patch adds a very simple application for demonstrating the use of
the bt_init() API. Right now this is just tested to work with qemu and
the HCI UART driver with the help of the btproxy tool on the host OS
side. More information is available in the samples/bluetooth/README
file.

Change-Id: I03f92d158e9e5d57275241502bb8fa94350fc335
Co-authored-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:13:45 -05:00
Yonattan Louise a9c772cbb6 Rename _SysIdleThresholdTicks to _sys_idle_threshold_ticks
Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I4b7f7806fcfcbeed1abbc2421c3fc470af87eb7d
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise 6120750f19 Rename K_max_eventnr to _k_num_events
Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Idcd3b4dfd86b6e835638623fa7b39401cabdee06
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Peter Mitsis 44c5409140 Remove references to VisualDSP.
VisualDSP is not supported.  Furthermore, with the removal of the VisualDSP
comment, there is no longer any justification for the custom BENCH_MIN() macro.
Thus, it is simply replaced with min()--defined in "util.h".

Change-Id: I3c08add1fc9fcd98c388b843c5849fc71fa84fd3
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:13:41 -05:00
Peter Mitsis 7f5780a46c Remove task_mem_pool_moveXXX() routines from test_pool project
The task_mem_pool_moveXXX() routines are only relevant to multi-node systems.

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Change-Id: I575c32a74b158c8b9b6ac6e1baef7b0e4f988270
2016-02-05 20:13:41 -05:00
Peter Mitsis 6a238004c0 Remove _task_mem_pool_move reference from footprint project
The routine _task_mem_pool_move() is only relevant to a multi-node system.

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Change-Id: I1a97e2b87d29df7a1a63bcd6d8eea290382f3a7e
2016-02-05 20:13:41 -05:00
Dmitriy Korovkin dd084a21a4 Fix benchmark projects makefiles to use proper configuration for i8253
Fix benchmark projects makefiles to use i8253 specific configuration
for only two variants of generic_pc BSP - pentium4 and minuteia, but
not for the whole BSP.

Change-Id: Iac89e29d2e26ee411d9c2d2fbcd3335c0e71fb06
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-02-05 20:13:40 -05:00
Dmitriy Korovkin 869582eb92 Remove PowerPC artefacts from test_fp_sharing test
PowerPC is not supported platform. It's components are to be removed.

Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-02-05 20:13:40 -05:00
Dmitriy Korovkin f51049b81c Reorganization of time calculating macros
Move time calculation macros from application directory to kernel
directory, since it is used by a kernel component.
In order to follow namespace and naming conventions, convert
macros to SYS_CLOCK_HW_CYCLES_TO_NS* form.

Change-Id: I96e9149c399adc363aed5095ae82a1abc78d2977
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-02-05 20:13:40 -05:00
Peter Mitsis 316ec830b4 Rename KSCALL_BENCH to MICROKERNEL_CALL_BENCH
The name of the macro "KSCALL_BENCH" contains a reference to a deprecated
naming convention.

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:13:40 -05:00
Peter Mitsis 2148d3af81 Remove references to unsupported stdlib functionality
"Unsupported stdlib" functionality is not relevant to the current "minimal"
libc implementation.

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:13:40 -05:00
Peter Mitsis 4f9c061f63 Remove reference to DINKUM in samples/libc/README
The Dinkumware libc implementation is not supported.

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:13:40 -05:00
Allan Stephens f2c2a7bc7d Eliminate unneeded NO_EXE task group in sample projects
Several sample project tasks that are not to be automatically
started now indicate this by simply specifying an empty task
group list, rather than by defining and using a new task group.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:39 -05:00
Peter Mitsis 941cab98b0 Replace use of OFFSET with stddef's offsetof
Instances of the custom OFFSET() macro are replaced with the standard
offsetof() macro from stddef.h to reduce code duplication.

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:13:39 -05:00
Yonattan Louise 5b5f4eb948 Fix checkpatch issue - WARNING:LINE_SPACING
Adding a line after variable declaration in order to comply with
the defined coding style.

Change-Id: Id41af88404bd37227bfd59a2d71ce08d0d6ce005
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:39 -05:00
Yonattan Louise 29bd1c70ab Fix checkpatch issue - ERROR:POINTER_LOCATION
This commit changes the pointer's location in order to comply with
the defined coding style.

Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@linux.intel.com>
Change-Id: Ibcf1ef0e4fc53b0cb5286b36119e76d017f24cd9
2016-02-05 20:13:39 -05:00
Yonattan Louise 31dddb9e1b Add parameter to the reference of an extern function
This commit adds the parameter to the reference of the extern function in order to
avoid the checkpatch issue ERROR:FUNCTION_WITHOUT_ARGS.

Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@linux.intel.com>
Change-Id: I42c53314232622a8e2e615420584601ce9b85404
2016-02-05 20:13:39 -05:00
Yonattan Louise 6201e1e5a9 Fix checkpatch issue - ERROR:TRAILING_STATEMENTS
This commit fixes the coding style of the 'if', 'do', 'while' and 'for'
statements in order to comply with the defined coding style.

Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@linux.intel.com>
Change-Id: I70d002462db48f36b9589cdb229ba928f3f424b4
2016-02-05 20:13:39 -05:00
Yonattan Louise 46aad9be1d Fix checkpatch issue - WARNING:RETURN_VOID
This commit fix the return statement in a void function due to this is not useful.

Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@linux.intel.com>
Change-Id: Icae7892853ed1c6c56c18e0c0c8f8fd1610491ee
2016-02-05 20:13:39 -05:00
Yonattan Louise d85179a0cb Fix spaces after #ifdef
This commit deletes the exceeded spaces after #ifdef declaration on the line that
the checkpatch script mark as having the SPACING error in order to complay with
the defined coding style.

The script used to perform this fixes was:

checkpatch_script="$VXMICRO_BASE/scripts/checkpatch.pl --mailback --no-tree -f --emacs --summary-file --show-types --ignore BRACES,PRINTK_WITHOUT_KERN_LEVEL,SPLIT_STRING --max-line-length=100 "

cd $VXMICRO_BASE;
for file in $(find ./ -name "*.[ch]" ! -path "./scripts/*" ! -path "./host/src/wrsconfig/*");
do
	for line in $(eval $checkpatch_script $file | grep "ERROR:SPACING: exactly one space required after that #ifdef" | cut -d":" -f2)
	do
		sed -i -r -e ''$line' { s/^#ifdef[ \t]*/#ifdef /g }' $file;
	done;
done;

Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
Change-Id: Ic9bb67243f91fa3b5aca6288b306f9b4e8c816fe
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:13:33 -05:00
Yonattan Louise f7df273f8c Fix spaces around parentheses
This commit deletes spaces after open parentheses '(' and spaces before
close paratheses ')'.

This modification were done with the following script:

checkpatch_script="$VXMICRO_BASE/scripts/checkpatch.pl --mailback --no-tree -f --emacs --summary-file --show-types --ignore BRACES,PRINTK_WITHOUT_KERN_LEVEL,SPLIT_STRING --max-line-length=100 "

cd $VXMICRO_BASE;
for file in $(find ./ -name "*.[ch]" ! -path "./scripts/*" ! -path "./host/src/wrsconfig/*");
do
	# fixing spaces after open parethesis
	for line in $(eval $checkpatch_script $file | grep "ERROR:SPACING: space prohibited after that open parenthesis '('" | cut -d":" -f2)
	do
		sed -i -r -e ''$line' { s/\([ \t]*/\(/g }' $file;
	done;

	# fixing spaces before close parethesis
	for line in $(eval $checkpatch_script $file | grep "ERROR:SPACING: space prohibited before that close parenthesis ')'" | cut -d":" -f2)
	do
		sed -i -r -e ''$line' { s/[ \t]*\)/\)/g }' $file;
	done;
done;

Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
Change-Id: I4482fc50ec45542afa2e60c5f2fef4e75fb24dd3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:13:22 -05:00
Yonattan Louise 16a2c5800d Fix function declarations on samples
This commit fixes the coding style of the function declarations and aligning
the open and close brackets and change the style of parameter's documentation.

Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
Change-Id: I648d36eb29dafc7fcd87b8db01e682bea993e5d2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:13:11 -05:00
Dan Kalowsky 55af242704 Renaming nanoTimeInit to nano_time_init
Updating nano kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 19:45:35 -05:00
Anas Nashif edb24ef6eb remove QA scripts
QA related scripts should be either maintained out
of the tree or come as enhancements to the sanity check
scripts.

Change-Id: I6dceed81f66b84cedad2dd84fd42d6b388de3468
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2015-04-13 18:47:50 -04:00
Inaky Perez-Gonzalez 8ddf82cf70 First commit
Signed-off-by:  <inaky.perez-gonzalez@intel.com>
2015-04-10 16:44:37 -07:00