Commit graph

42249 commits

Author SHA1 Message Date
Szymon Janc
8c118f8673 Bluetooth: L2CAP: Fix build with unified kernel
Use helper for accesing nano_sem count. This fix build error on unified
kernel where nano_sem is wrapped by k_sem.

Change-Id: Iad840e3c635a0fbc3b5eeee2e61479fa3d39ca30
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-28 08:09:08 +03:00
Szymon Janc
15c473e290 Bluetooth: Remove not needed includes
Those were leftovers copied around when new files were added.

Change-Id: I283d59255a302f15fb027764ae9f761ebf646961
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-28 08:09:08 +03:00
Szymon Janc
21243bddb7 Bluetooth: A2DP: Cleanup headers includes
Make sure global headers are included before local.

Change-Id: I5b80dad1ecc75e3e40249da2e5f7fd7f8d7b3e8f
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-28 08:09:08 +03:00
Szymon Janc
43192b9788 Bluetooth: Include zephyr.h instead of kernel specific headers
zephyr.h includes required kernel header depending on selected
configuration.

Change-Id: I94c6cc2641e0146c79c4f8ed697e9e0d84667746
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-28 08:09:08 +03:00
Arkadiusz Lichwa
a6f2d703bc Bluetooth: L2CAP: Minor cleanup in conn request
Remove redundant stack var. The status of connection response is set
directly in l2cap_br_conn_req_reply() based on result parameter.

Change-Id: I6f1f5def51a1a027751930b67caf31eed383e4e6
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-10-28 08:09:08 +03:00
Arkadiusz Lichwa
6de63cee65 Bluetooth: L2CAP: Minor cleanup in naming
Uses more apropriate semantically value to status field applied to
connection response by default.

Change-Id: Icfd9cc6a25674ef1df49138f3fcc79e58f419759
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-10-28 08:09:08 +03:00
Anas Nashif
f8dcad4a5b sanitycheck: filter out the prebuilt.elf introduced by Makefile cleanup
commit 018b831a36 keeps another elf file in the
outdir which confused the sanitycheck script.

Change-Id: I87a9bcee6afe6526ecc24f1f5d9cf38101247ce2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 18:30:27 -04:00
Anas Nashif
27043d71e0 tests: move quark_se boot stub to tests
Lets not confuse user with this code, it is clearly not a sample.

Change-Id: I3a0209fb34b2c97383b0f5382f156b80470fdaf7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:14:53 +00:00
Anas Nashif
b5427473fc samples: add light sensor sample using the grove kit
Change-Id: Idf88aac781b2fd2314694c38dfa20d36fee517f9
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:14:33 +00:00
Anas Nashif
2af8eb17c1 samples: add temperature sensor sample using the grove kit
Change-Id: I94a3648f2a3b0928f38baabcfe4ef47d23a7b9fd
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:14:32 +00:00
Anas Nashif
b152246a83 sensors: make grove sensors depend on CONFIG_SENSOR
The grove sensors use the sensor interface, so make them depend
on it just like the other sensors.

Change-Id: I9b62a3fa26f54dd683c65ca154c1af7c7c92772f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:14:32 +00:00
Anas Nashif
adf8a30b80 samples: move grove lcd to samples/grove
Change-Id: Ibf97ad2a4bd1234960f6da9585eff122e5876f62
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:14:31 +00:00
Anas Nashif
fa06c5b879 samples: move basic samples to samples/basic
Change-Id: I0915158424d9f105959e436af3378dc52753347c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:14:31 +00:00
Anas Nashif
cc7b36cd70 test: test_hmac: cleanup excludes
Change-Id: Ib973339191a15b1dbb4fd5f3fa2fc5fe886521a3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:13:36 +00:00
Anas Nashif
36e1e2dbaf move tests from samples to tests/
Change-Id: Ib183936134d27ff84d9af57e8e2e2d9f0cc2670f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:13:36 +00:00
Anas Nashif
5662110ec4 ci: sanitycheck: now that we do not run footprint script, reenable those
build footprint test as part of the main sanitycheck job, we do not run
the script comparing footprint anymore, it will move to somewhere else.

Change-Id: I36d475bfc3d985bf06a872649eae8c19e1a43aa4
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:12:32 +00:00
Benjamin Walsh
b452817b67 kernel: merge _IS_IN_ISR() with _is_in_isr()
They were the same, standardize on the lowercase one.

Change-Id: I8bca080e45f3e0970697d4451e468b9081f96f5f
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-27 21:45:03 +00:00
Anas Nashif
539003b697 samples: hello world: unify sample and use unified kernel
Change-Id: I4d4124245f394030b19a6b80160685798bd6ae72
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 21:19:36 +00:00
Ramesh Thomas
c7ce43a7b9 samples: power_mgmt: Create unified kernel version of power mgr app
Created unified kernel build setup for the power_mgr sample
app. Currently it shares the same source file between
micro and unified kernels. This is to help test and add new
features from unified kernel. In future, separate source will
be created for unified kernel. After transition is completed,
microkernel version will be removed.

Jira: ZEP-1140
Change-Id: Ic3a0b5cb3adc0749a7084ad785a041fee5875f56
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-10-27 21:18:44 +00:00
Ramesh Thomas
3e0f20a7d5 power_mgmt: Update changes in k_idle.c missing in idle.c
Some changes that went into k_idle.c were missing in idle.c
causing errors while building power management code for
unified kernel. Added the missing changes.

Tested with power_mgr app built for unified kernel.

Jira: ZEP-1139
Change-Id: I9fe005544f7ee69d3cb3ff10c649be28037fcf15
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-10-27 21:18:43 +00:00
Dmitriy Korovkin
6072e455f3 unified/tests: Adapt test_aes for unified kernel
Unified kernel invokes main() function in the init thread. This
eliminates the need for a separate thread for the test.

Change-Id: I4ff2e160213d152ca7c5d8422162f3464d935119
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-10-27 21:03:07 +00:00
Dmitriy Korovkin
81c94161f5 unified/tests: Adapt test_sha256 for unified kernel
Unified kernel invokes main() function in the init thread. This
eliminates the need for a separate thread for the test.

Change-Id: I4e6c4f212615d2135adf7971df32db1ad392c0e2
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-10-27 21:01:53 +00:00
Anas Nashif
febe9f5571 samples: add basic blinky application
The mandatory blinky sample at your service.

Change-Id: I999215fbda338effd6f7b65a2a165acf9b850a9a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 20:56:13 +00:00
Anas Nashif
513c1c91fc boards: define LED pin on boards with LED
Those defined will be used in sample applications that deal with
on-board LEDs.

Change-Id: Ia447adfd33547e01206a9fd7ceeae420ba806f31
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 20:56:08 +00:00
Andrew Boie
779aa6ec0b sanitycheck: remove default qemu_support=false
This directive is the default, no need to have an ever-expanding
enumeration of these.

Change-Id: Ic5147fe04de033cb7e97fc5cbe45edd1779d1120
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-10-27 20:54:44 +00:00
Andy Ross
018b831a36 Makefile: Don't hide the "prebuilt" kernel
The pass 1 linkage on x86 produces a real intermediate file that users
might plausibly want to inspect.  There's no reason to give it a
hidden file name or call it "temporary".  Show it off.

Change-Id: I606ee41f7f106ddd00474cdebe7803bcfb01889d
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2016-10-27 20:10:27 +00:00
Flavio Santes
36c09442d9 test/crypto: Fix RAM overflow error in ISSM
According to feedback received in ZEP-1130, decreasing the stack
size in the prj.mdef file solves the RAM overflow issue reported
by ISSM.

Jira: ZEP-1130

Change-Id: I761531e535a9e54ccd024b397d5d92d7666be817
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-10-27 19:56:15 +00:00
Jesus Sanchez-Palencia
5750354f7a dma: Fix QMSI shim by setting the DMA xfer type
Set DMA transfer to QM_DMA_TYPE_SINGLE for all channels.
This keeps the previous behavior as of QMSI 1.1.

In the future, we may consider adding support for using other DMA
transfer types. This, however, will demand adding new API to Zephyr's
dma.h .

Change-Id: I8071555190662a72279069ff9fce3d4b9e861629
Signed-off-by: Maciej Kuc <maciejx.kuc@intel.com>
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
2016-10-27 11:22:58 -07:00
Amit Kucheria
9cbd41ab13 arm: defconfig: Remove platform-specific options
SOC_TI_LM3S6965 and UART_STELLARIS are platform-specific, remove from
arch/arm/defconfig.

Change-Id: I3b37bc2ddfabb1da4e7538b5ab0e553fb2464584
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
2016-10-27 15:00:47 +00:00
Ricardo Salveti
a9f2061dfb gpio: stm32: introduce alternative function config
STM32F4 requires the alternative function config to be set, so just
initialize that as part of the gpio configure call.

Change-Id: I33a4a8efec59c5ebe7dc3f3580f0dd2bf7ded7f4
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
2016-10-27 14:48:43 +00:00
Maureen Helm
3bdc77ee09 sensor: fxos8700: Add accelerometer/magnetometer driver
Adds basic sensor driver support for the NXP FXOS8700 6-axis
accelerometer/magnetometer. Currently this driver supports
accelerometer-only, magnetometer-only, and hybrid (accelerometer +
magnetometer) modes, as well as 2g, 4g, and 8g accelerometer full scale
ranges.

This driver does not yet support any sensor triggers such as the data
ready trigger, or runtime changing of sensor attributes.

Datasheet:
http://cache.nxp.com/files/sensors/doc/data_sheet/FXOS8700CQ.pdf

Origin: Original
Jira: ZEP-721

Change-Id: Iff0f751c737196f60d5c5d3448631b57093ece34
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2016-10-27 14:36:43 +00:00
Allan Stephens
884d9961ae unified: Add sample project using K_THREAD_DEFINE()
Also demonstrates use of k_thread_spawn() and K_SEM_DEFINE().

Change-Id: Id2f32ea38d2b5fea40f90a7ef6665231e4158cb3
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-27 08:36:14 -05:00
Allan Stephens
88095027f4 unified: Ensure K_THREAD_DEFINE() generates a thread id
Previously the macro provided no way for an application to
easily reference a statically-defined thread.

Change-Id: I552e5f4ab4e6e8a793bb3a6a2b0c2636b900023a
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-27 08:36:14 -05:00
Allan Stephens
743bdb8143 unified: Enable handling of thread options for static threads
Change-Id: I51d2d9cfa0eeb5f974a6cf1db32406399ef57418
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-27 08:36:14 -05:00
Allan Stephens
6cfe1322f8 unified: Streamline thread initialization macros
The _THREAD_INITIALIZER() macro is now used in all cases where
a static thread is defined. It accepts the arguments used by
k_thread_spawn(), as well as the legacy abort function and task
group arguments.

The two remaining legacy macros required to support static threads
now appear in legacy.h.

Change-Id: I7ba24c285beee63d63c8da0e0fa120f35c0d9526
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-27 08:14:51 -05:00
Allan Stephens
7c5bffa669 unified: Add options field to static thread initialization structure
Adds the field, in preparation for making use of it in the future.

Also re-orders the existing fields of the _static_thread_data
structure so they appear in the same order as the arguments
to k_thread_spawn(). This makes it easier to ensure all of the
arguments and fields are handled in a consistent manner.

Change-Id: I401687ecfdacd52c05ab95af7f12d8dc658ed419
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-27 08:14:51 -05:00
Allan Stephens
0eae13d6de unified/test: Fix typo in kernel's test_task application
The wrong tag name was used to mark the test as compatible
with the unified kernel.

Change-Id: Idda5d5e0993447270e7131c42c224df8dcd59282
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-27 08:14:51 -05:00
Szymon Janc
ccadd4b006 net: Use proper format for printing size_t
size_t should be printed with %zu. This also fix build error on
unified kernel due to ZEP-1133.

Change-Id: I9c5fc7f7de365e47bd0973913b94baa80f7907e3
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-27 08:08:27 +00:00
Anas Nashif
91d7bdd54f samples: kernel_event_logger: filter platforms by SRAM size
Change-Id: Ieeede04b122a697ff3cd83252677c0a12e428d56
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-26 20:56:42 -04:00
Anas Nashif
5925eaf5f1 optimize testcase runs for sensors
Change-Id: If701d1824572bed068712750fbd14758806ba70f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-26 23:47:39 +00:00
Anas Nashif
511339f54c samples: cleanup sensor samples
- remove useless Kconfigs
- remove SPI DW kconfigs, we now use QMSI driver
- Cleanup readme and turn into ReST

Change-Id: Ie1f39e0afabf499fa81627ded59adf267e01993a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-26 23:47:21 +00:00
Anas Nashif
95bf69197d samples: sensors: cleanup mcp9808 sample and refine documentation
Enhance documentation and build for Quark D2000 Devboard by default.

Change-Id: I3417c31a8898a076465d25f45d7821820b480290
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-26 23:46:38 +00:00
Benjamin Walsh
115d118a2e unified: remove mention of 'fiber' in kernel_event_logger
Adapting to unified kernel naming of 'coop thread'.

Change-Id: I66cb766c2269acf0867e434bc21f633ea1111f89
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-26 23:38:14 +00:00
Benjamin Walsh
14ec7af62c unified: update kernel event logger doc
- replace instances of 'task' and 'fiber' with 'coop' and 'preempt'
  thread
- remove reference to task monitor and task transition logging, since
  this is a concept that is irrelevent in the unified kernel.

Change-Id: I31eef8d7894c45183f6a13cc3fdaa2e6214e8da3
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-26 23:38:10 +00:00
Benjamin Walsh
10f30a5f61 kernel event logger: fix longer-than-80 chars lines
Change-Id: I503c18d339a0731b0fcbb7b83b3dc16b08c2d7a1
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-26 23:38:07 +00:00
Benjamin Walsh
c2aecb26cc samples: fix kernel_event_logger to work with unified kernel
The test is modified to key on CONFIG_TASK_MONITOR instead of
CONFIG_MICROKERNEL, since that is what it was really interested in.
Also, this allows the unified kernel to work w.r.t. task monitoring,
since that is a concept that is alien to the unified kernel, since there
are no more task transitions recorded as part of a kernel server. The
unified kernel does not have a CONFIG_TASK_MONITORING option.

To make this work, since the kernel_event_logger sample makes use of the
philosophers demo, the latter had to be modified as well. The nanokernel
philosophers demo would not work with the unifed kernel since it
identifies as a microkernel, and in that case the test would be looking
for symbols defined in an MDEF file, which the nanokernel demo does not
provide of course; the same thing applies to the nanokernel
kernel_event_logger sample. Instead, the demo defines NANO_APIS_ONLY=1,
which is really what it is interested in. To allow that definition to
exist, the nanokernel philosophers demo and both the nano/micro
kernel_event_logger samples add src/ directory with its own Makefile and
add their own phil_fiber.c and phil.h files, which simply include the
original files from the microkernel philosophers demo. As a final
change, the kernel_event_logger samples need a different prj.conf file
for the unified kernel, since it needs a bigger idle stack than the
default, since the kernel event logger does work in the idle thread when
the kernel goes to sleep.

Change-Id: I4cac45a32d09d6ca1de052a368b3219f64889869
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-26 23:38:03 +00:00
Benjamin Walsh
673cd8bc2b unified: add _sem_give_non_preemptible()
Needed by the kernel event logger when it records a context switch.

The kernel event logger releases a semaphore when a new event is
available in the log so that a thread can consume the event. However,
giving that semaphore cannot add a context switch event itself in the
log or the logger would be caught in an infinite loop.

Change-Id: I571a4aa0d302775e09cdc2d654a6b61f8b2e42c7
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-26 23:37:59 +00:00
Benjamin Walsh
162cbdd22f unified: map legacy nano sem give APIs directly to unified kernel APIs
For some reason, the legacy nanokernel semaphore "give" APIs were
implemented as macros that took a parameter instead of doing a straight
mapping to the unified kernel functions that provide the equivalent
functionalities. This prevented passing the nanokernel semaphore APIs as
function pointers to other APIs.

One such subsystem that does this is the kernel event logger.

Change-Id: Ib302167c9907d2c8ac1f9beef1eef093b48abf61
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-26 23:37:54 +00:00
Benjamin Walsh
1125c2b00e unified: correct comment about number of threads in phil demo
A bit of work has to be done by someone why wants to run the demo with a
different number of threads than the default.

Fixes ZEP-1077.

Change-Id: Ibb5cfed2bd9984bcf0f9d65f957f32daf4c5211e
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-26 23:06:25 +00:00
Marcus Shawcroft
1a13bb8c40 sensor/hp206c: Limit namespace, add static.
Change-Id: I08d0029fae70434794e09a7c9563383d1db58fe0
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 16:52:15 -04:00