Commit graph

41176 commits

Author SHA1 Message Date
Benjamin Walsh
d4006c9ad4 unified/build: adapt Kbuild for unified kernel
Changes needed to build system to build a unified kernel:

- NUM_COMMAND_PACKETS, NUM_TIMER_PACKETS, NUM_TASK_PRIRITIES must be
  passed to sysgen to avoid modifying it. Simply set them to 0. The
  unified build does not need them.

- Pass a different kernel type to sysgen if building for a unified
  kernel.

- Build kernel_main.c if building an MDEF file (micro/unified).

- The location of the include files for building offsets.h is different
  for unified kernels and nano/micro kernels.

Change-Id: I46b30a2b5ffc3ca675b3413150643b92c117c2c8
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh
a8a830b5db arm: only compile gdb stubs when CONFIG_GDB_INFO=y
They use data that is unavailable to the unified kernel, and are not
used anymore really. For now, only compile them when CONFIG_GDB_INFO=y,
and never enable CONFIG_GDB_INFO when building the unified kernel.

These files should go away when the unified kernel is made the only
kernel type.

Change-Id: I0a2a917dd453ecaae729125008756e0f676df16d
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh
781561c855 arm: add __ASSERT() for stack alignment
Change-Id: Id5c23f502a17ad3e889a0de7c7ad18085b123078
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh
b05ce0e0c7 build: only generate the SSE group for x86
SSE is an x86 concept.

Change-Id: Ifb5810201afe734e8b13b949001cd97e7e2f0727
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh
20f7ae47e4 sysgen: add --kernel_type argument
Needs to sort out differences between microkernel and unified MDEF
syntax.

Change-Id: I8f7cb192bdd90c0f9c40593cfbd0aa86b12c7c74
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh
f6684147c1 build: make sysgen take optional command line arguments
Cleaner than positional parameters, easier to add new arguments.

Change-Id: I30e85f7b2643775c1006564d18da115599688e88
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
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