Commit graph

41120 commits

Author SHA1 Message Date
Benjamin Walsh
851c537f29 kernel: add CONFIG_MDEF
Easier to build logic for when an MDEF file is to be parsed since
unified kernel needs to do it as well. Can also be useful for testing,
when toggling between static and dynamic objects in the same test case.

Change-Id: I51eb8919e18443516ade13caab04698d37d91803
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh
7280377ae1 checkpatch: do not check for min_t/max_t
We do not provide these.

Change-Id: Ic2f7ba86a7a63753e6da623b6f1267405875375c
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh
f5c5f362a7 checkpatch: add --ignore DATE_TIME
Kernel makes use of __DATE__ and __TIME__ to get its build time.

Change-Id: I34b07a413cd79b2e9c34a2eae5803b9bb837e4ee
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh
1d25d81ecd slist: add sys_slist_append_list and sys_slist_merge_slist()
Allow appending a list to another list. The list being appended can be
either a slist or the head and tail of a singly-linked list with the
same node format as the slist.

Change-Id: I14410d2b793e1d9f893ff4e7ce097bee4a93a4be
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh
e69982b8b5 slist: add sys_slist_get() to fetch and remove the head
More straightforward than doing sys_slist_peek_head() followed by
sys_slist_remove().

Also add a version that does not check if the list is non-empty to be
used when the list is known bo be non-empty.

Change-Id: I8fd10e20e2c84c7d8972c9207f3d4917884808cb
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh
8cff79957b dlist: add static initialization macro
Change-Id: Id37b8a86be26a9b3556a57e37d36f46132c7b6e2
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh
ba2c769073 dlist: add SYS_DLIST_FOR_EACH_NODE/_SAFE
Used for operating on all elements of a doubly-linked list.

Change-Id: I9eae26ef6d24ce497dbb3acc8a699598d1547bde
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
David B. Kinder
7bc92b3d50 doc: workaround for __deprecated functions
This edit to the doxygen.config file causes Doxygen to treat
__deprecated as a predefined macro, which expands to nothing.
See https://wiki.zephyrproject.org/view/Function_Documentation#Workarounds
for further information about this workaround.

Change-Id: I8e344cf65d7ff45609d5dd9a0caec14df9799d46
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2016-09-13 19:17:32 +00:00
Juan Manuel Cruz
31341b3255 task profiler: Adds the task profiler samples to the sanity check
Boards that cannot support microkernel applications for memory resources
are excluded from microkernel build test.

qemu nios2 board is excluded from nanokernel because the Altera JTAG
UART not implemented yet

The kernel even logger buffer size for nanokernel was reduced from 1000
elements to 500 to allow the sample to fit in the Quark D2000 board.

Jira: ZEP-698

Change-Id: I0c5cc4c0bfc27940a758dcdd8ff0e01ad7f4b88c
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-09-13 17:26:34 +00:00
Juan Manuel Cruz
809e52607b task profiler: README file update
Jira: ZEP-698

Change-Id: I790913b4a1a9fadc58b3325b034f039bfcd14ecd
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-09-13 17:26:33 +00:00
Juan Manuel Cruz
b9c6afca43 task profiler: project configuration files clean up
The sample applications for task profiling requires a default
project configuration file that can be used as reference for
any other board.

Quark SE dev board has some optional optimizations that can
be added using the prj_quark_se_devboard.conf file.

Some redundant symbols were removed to simplify the reading
of the configuration.

Jira: ZEP-698

Change-Id: I71d584d4454392e740f8b7a2c2f47206b76c3abf
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-09-13 17:26:33 +00:00
Qiu Peiyang
c53fe299c0 libc: replace null.h and size_t.h with stddef.h
According to commit b71a8a4591 and Jira: ZEP-733
(libc: remove stddef.h which is provided by the compiler),
the stddef.h in zephyr code is removed and it's provided
by the compiler. The original stddef.h includes two head
files, null.h and size_t.h, which are also useless now.
So remove these two deprecated files, in case conflicting
definition.

Change-Id: Ie7163fdbd23c32759425b50f3deff2a57cc051a9
Signed-off-by: Qiu Peiyang <peiyangx.qiu@intel.com>
2016-09-13 10:21:10 +08:00
Anas Nashif
884d9fb50f samples: zoap: build only for specified boards
Change-Id: I52e5dd0d638eb4582baf9bc7c8ce4d30b4d49733
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-12 19:53:15 -04:00
Inaky Perez-Gonzalez
99f4815743 known-issues: clarify documentation on ignore blocks
Some regular expressions used to ignore outputs could use some extra
documentation to clarify what was being ignored.

Change-Id: Iabf3ce6964a89cdb7f9bbe8d99a3b4b8f98da59b
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-09-12 21:55:23 +00:00
Inaky Perez-Gonzalez
02089646bf known-issues: remove entries for fixed ZEP-757
No need to ignore these issues any more.

Change-Id: I943f12753b7b80e50b1006146d3c7d4b4137584e
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-09-12 21:55:06 +00:00
Andrew Boie
31e3a345e5 gen_idt: validate IRQ line before vector assignment
On systems with fixed IRQ-to-vector mapping (like Quark D2000),
if multiple drivers tried to use the same IRQ line, gen_idt would
report an IDT vector collision rather than multiple IRQ line collision,
which is much less intuitive.

Move the IRQ line validation to before the vector validation to report
an easier to understand error.

Change-Id: I3930d8df38391e4708db5486e4bd4527d33c4cce
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-09-12 17:53:22 +00:00
Andrew Boie
9436765914 samples: dma: don't skip this test case
There is no reason to skip it.

Change-Id: I45a9aa3f05263c6deb017c1513cafb9af055037a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-09-12 17:53:22 +00:00
Andrew Boie
eeacd2061d mvic: default to IRQ 10 instead of 0 for timer
This is a better choice of default; on Mint Valley using IRQ 0
for the timer collides with the DMA Error IRQ line.

Issue: ZEP-849
Change-Id: I14cb60fbe548488198813b2351e0ed1f07c2d07d
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-09-12 17:53:21 +00:00
Andrew Boie
c579ca43ac test_context: use correct timer IRQ for mint valley
LOAPIC timer driver is used by both LOAPIC and MVIC, but the
correct #define needs to be used for the IRQ line.

Issue: ZEP-848
Change-Id: Ib682dd95c08ba437d1ff409e0e0352944d13b633
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-09-12 17:53:21 +00:00
Javier B Perez
453d172bff sensor: HP206C: fix kconfig sys log help
Changed help message to be in compliance with the rest of sensors.

Change-Id: Ia18f7623eda5f86fe6f7d99ac934f1a9beda55a8
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-09-12 10:35:41 -05:00
Tomasz Bursztyka
ac7a1d4c64 net: Remove dead sections left by revert
Commit 3e63a74514 did not revert properly
things.

Change-Id: I792d5698966542ce2cfb9f858c56b30c392f02a2
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-09-12 12:47:02 +00:00
Genaro Saucedo Tejada
4dc8078435 fix: net samples no longer include unneeded 802.15.4 files
Some samples were including nullsec.c, simplerdc.c and
framer-nullmac.c, those files are not needed but introduce some
symbol dependencies, causing link to fail when optimization is not
-Os, e.g. when compiling with CONFIG_DEBUG.

Change-Id: Id227470a4517e8e2c3b9af942b0893783075cd40
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-09-12 12:29:09 +00:00
Anas Nashif
44362df31d boards: ia32_pci is long gone, use galileo instead
Change-Id: Id60593cfa900a7a14a3a3be6f3870112bd506b2b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-12 12:28:46 +00:00
Juan Manuel Cruz
941059c69f win-build: fixes to build with alternative make implementations
Some make implementations have different implementations for
notdir and absdir functions.
notdir may require that his parameter do not finish with "\".
absdir may fail when given a windows formated path as input.

The path that is given to notdir as parameter is removed from
the final "\" and abspath is replaced with realpath when the
input given can be a windows formated path.

Jira: ZEP-762

Change-Id: Ic83e3526fc5234decb3192ab1f9f538addf9a76e
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-09-12 12:28:14 +00:00
Anas Nashif
c7faacf3d6 samples: move pci tests to tests/
Change-Id: Ibeb50b25b2f897dc1be87aa0739ef3f31d9015e8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-12 12:26:06 +00:00
Anas Nashif
1ecbea283c samples: move spi tests to tests/
Change-Id: I8d4a50bcbf479c35ccb209fbb04b5b1095075933
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-12 12:26:06 +00:00
Vinicius Costa Gomes
960a5c990b MAINTAINERS: add Zoap section
Change-Id: Idbde405fa9177ac527544dfbc7f7b48088295418
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-09-12 12:25:26 +00:00
Vinicius Costa Gomes
8dad0093d3 samples/net: Add a sample for a CoAP client
Change-Id: I17d88081eb719e55d97a5a034f6861e01ebb6a52
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-09-12 12:25:25 +00:00
Vinicius Costa Gomes
97ea9b19ea samples/net: Add a sample for a CoAP server
Change-Id: Ibca646d9c9f85a14939e1cf488eee7a41f688fd2
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-09-12 12:25:25 +00:00
Vinicius Costa Gomes
3a53a73d8f tests: Add simple CoAP tests
Change-Id: I3d7b11ac5a623eab8e07d484b60c24c8a9a824f1
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-09-12 12:25:24 +00:00
Vinicius Costa Gomes
2baa577b49 lib: Introduce the CoAP implementation for Zephyr
This is a CoAP implementation tailored for Zephyr's requirements, it
tries to use memory predictably by exposing its control structures to
the user (so the user only pays for the features that are used) and
having a lightweight packet representation (the trade-off is that
adding options is not as efficient as it could be, if there were more
information available).

Change-Id: I6f74146c4626a0c554f50b42f163a076e82805ba
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-09-12 12:25:24 +00:00
Laurentiu Palcu
3ef2e059c3 sensor: add driver for HP206C sensor
This sensor is a high precision barometer, altimeter and temperature
sensor. It can also be found on the Grove Barometer module (v1.0).

Sensor datasheet:
http://www.hoperf.com/upload/sensor/HP206C_DataSheet_EN_V2.0.pdf

Grove link:
http://www.seeedstudio.com/depot/Grove-Barometer-HighAccuracy-p-1865.html

Origin: Original
Change-Id: I99986b26b6b4447e31e12a1fc17ede3e6bb4c586
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2016-09-12 12:18:55 +00:00
Dragan Cvetic
eb147c650c spi_qmsi: Add suspend/resume
This patch implements suspend/resume routines which
preserve SPI master 0 and 1 context in SYS_PM_DEEP_SLEEP.
The following parameters are suspended/resumed:
- All non-sticky RW registers for the SPI device which
  are not related to a transfer.
- The SPI MASK registers (interrupt routing register).

The suspend/resume functionality is implemented in
the QMSI shim layer as a fast and temporary solution,
it will be removed and migrated to QMSI later.

Change-Id: Ib60317ca41013a3e794820e9c3ef34f35d108209
Signed-off-by: Dragan Cvetic <dragan.cvetic@intel.com>
Signed-off-by: Julien Delayen <julien.delayen@intel.com>
2016-09-12 12:17:16 +00:00
Daniel Thompson
389ed15b4c build: Make QEMU_BIN_PATH optional
QEMU_BIN_PATH is frequently set to pick up qemu binaries from "obvious"
places such as /usr/bin or /usr/local/bin. Neither of these values will
be correct for all users and both directories would typically be found
in the user's PATH. Much better to make QEMU_BIN_PATH optional and picking
up qemu via PATH instead.

Tested with ZEPHYR_GCC_VARIANT={zephyr|xtools}.

Change-Id: I1acfc5b12341c6d330a3e9e90b0ab5bde29e2e4f
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Andrew Boie <andrew.p.boie@intel.com>
2016-09-12 02:35:20 +00:00
Daniel Thompson
e4980bd392 build: zephyr: Remove unused QEMU variable
This value is unused; it will be overridden by the main Makefile before it
is used. This is for the best since the value is also broken. Remove it.

Change-Id: Ibc5aae3f9967eb2b26a482425c3bbbaf44c0e2bb
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
2016-09-12 02:35:20 +00:00
Daniel Thompson
77a2011910 build: xtools: Honour CROSS_COMPILE (if set)
crosstool-ng toolchains are relocatable so, while the assumption it will
live in $(XTOOLS_TOOLCHAIN_PATH)/$(CROSS_COMPILE_TARGET) is a reasonable
default, it is useful to have to an quick and easy way to override that.

Reusing CROSS_COMPILE works well for this; it allows
ZEPHYR_GCC_VARIANT=xtools to set up the compiler and linker flags
without being too opinionated about anything else.

Change-Id: I6edd97a3753f2a917a34f723273416f76caa647a
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
2016-09-12 02:31:06 +00:00
Daniel Thompson
06844200d8 build: xtools: Simplify derivation of toolchain flags
Currently several of the variables in the CROSS_COMPILE_... family
are repeated for each architecture despite the content of the variable
being the same in all cases. Fix this.

Change-Id: Ib40eca67926e22050a366e7b349331deaa7dd954
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
2016-09-12 02:31:05 +00:00
Yong Li
ee85618d74 samples: shell: add support for nano/micro kernel
This patch adds the micro support for the shell application

Change-Id: I4499a8660323f1fa61ff3bbf6e7a3026a7dba77a
Signed-off-by: Yong Li <sdliyong@gmail.com>
2016-09-12 02:29:01 +00:00
Genaro Saucedo Tejada
59b06e2860 fix: previously uninitialized variables break DEBUG sanity
Fix several compiler warnings that were preventing sanity from
completing successfully when running with the CONFIG_DEBUG=y setting.
(related to compiler flag -Werror=maybe-uninitialized)

JIRA: ZEP-735

Change-Id: I3cb79eb0f254f15d18f18ace50b0cf24e9ef5f10
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-09-12 02:25:22 +00:00
Ravi kumar Veeramally
69236fd49a net: Fix net_send return value documentation
If net_send() is success, do not unref the buffer. Free the buf
when it returns error.

Change-Id: Ic154879dfb583d52a0b12fd3e8bfc390a24efec9
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-09-12 02:19:57 +00:00
Flavio Santes
13a75b7e42 dns: Remove deprecated functionality
This commit removes deprecated APIs and replaces them with routines
that provide similar functionality without the flexibility originally
offered by the deprecated APIs.

Removing deprecated routines will help us to be prepared once the
new IP stack is ready (ZEP-793). Furthermore, this commit will also
help us to move our current DNS Client implementation to the lib/iot
directory, as specified by ZEP-847.

This commit removes the netz library from the DNS client sample
application. UDP functionality is replaced by primitive routines.
Specifically, the following changes are applied by this patch:

- Remove netz routines
- Remove app_buf data structure
- Introduce primitive data types in the DNS client code
- Introduce primitive network routines
- Add a header file containing configurable parameters

Jira: ZEP-793
Jira: ZEP-847

Change-Id: I0302133da77308f0cdd9ace2c0265e6b77673ff0
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-09-12 02:15:44 +00:00
Qiu Peiyang
cf0efbb51f drivers/pinmux: delete deprecated PINMUX_DEV_QUARK_MCU
CONFIG_PINMUX_DEV_QUARK_MCU is deprecated and QUARK MCU support
is replaced by CONFIG_PINMUX_DEV_QMSI. So delete this deprecated
CONFIG option.

Change-Id: I2cad6cfd4344386a00d45a579e8cc586935b041f
Signed-off-by: Qiu Peiyang <peiyangx.qiu@intel.com>
2016-09-12 02:08:08 +00:00
Qiu Peiyang
79e3b5a405 drivers/pinmux: fix CONFIG_PINMUX_DEV_NAME dependency issue
CONFIG_PINMUX_DEV_NAME should depends on CONFIG_PINMUX_DEV, not
CONFIG_PINMUX. In current situation, user will be able to access
pinmux dev driver without enabling CONFIG_PINMUX_DEV. This isn't
excepted to happen.

Change-Id: I75bcfff5a51e1dc93e002c0c6a65876f93cde5b8
Signed-off-by: Qiu Peiyang <peiyangx.qiu@intel.com>
2016-09-12 02:08:07 +00:00
Dmitriy Korovkin
59f198d86d arm atmel sam3: Disable watchdog timer
Watchdog timer is enabled after the board reset. It is not used by Zephyr OS,
and having it enabled causes system resets during CPU-intensive operations.

Change-Id: If5583dbd2d2fb2206274467c523d6b5d147f1fbe
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-09-12 02:00:34 +00:00
Dmitriy Korovkin
8409242d6d arm atmel sam3: Add constants and structures for watchdog registers
Define symbolic constants for watchdog timer registers.
Provides the necessary interface to configure or disable
the watchdog timer.

Change-Id: I80002a843361569fdd78b725fc3f68e65195d02e
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-09-12 02:00:33 +00:00
Jukka Rissanen
4a088a1259 net: apps: Example app for Trickle algorithm
This is only meant for Contiki based IP stack.

Change-Id: I53cbcb7da0bd13ad87243fd70974cec0bd31072e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-09-12 02:00:12 +00:00
Jukka Rissanen
33d92af1cf net: Initial trickle algorithm support for legacy IP stack
This commit only provides the Trickle algorithm support.
Some other entity must call its functions in order to be
useful.

Fixes: ZEP-627

Change-Id: Ice1fcfe9c57269309eeab06eab000622662e2929
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-09-12 02:00:12 +00:00
Andrei Emeltchenko
03b5412849 usb: Allow to register and handle vendor specific commands
At the moment we cannot handle vendor specific commands resulting in
error with following message:
...
[DBG] usb_handle_request: No handler for reqtype 2
[DBG] usb_handle_control_transfer: usb_handle_request failed
...

Change-Id: Ic899300e0c420c58ac3f86ecf5f5ec45955bd46f
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-09-12 00:43:31 +00:00
Andrei Emeltchenko
84b46cd862 usb: Add USB sample build test to sanity check
Adding these tests allows to find issue with QMSI update.

Change-Id: Ib247bee6a5dbdd60aed759b4908e9ae7751d5f78
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-09-12 00:42:17 +00:00
Julien Delayen
fa1d6fb1c9 aonpt_qmsi: Implement suspend and resume functions
In order to restore aonpt context after entering
SYS_PM_DEEP_SLEEP, suspend and resume functions
are called.

Only the interrupt mask is restored as it is reset by
the QMSI ROM and other registers are sticky.

The suspend/resume functionality is implemented in
the QMSI shim layer as a fast and temporary solution,
it will be removed and migrated to QMSI later.

Change-Id: I0dcd4552cd8c60ecb4eb650fc3ad85566b726a38
Signed-off-by: Julien Delayen <julien.delayen@intel.com>
2016-09-12 00:31:54 +00:00