Commit graph

9317 commits

Author SHA1 Message Date
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