Commit graph

41120 commits

Author SHA1 Message Date
Fabien Chereau
49abcb3fff device: add a new macro to obtain the device object symbol name
The new SYS_GET_DEVICE_NAME macro can be used in combination with
SYS_GET_DEVICE to obtain an external reference to a static device
object, e.g.:

extern struct device SYS_GET_DEVICE_NAME(my_device_name);
struct device* dev = SYS_GET_DEVICE(my_device_name);

dev is here set at compile time.

Change-Id: I9094925c685177f01e0cef194ec382ad49658f9d
Signed-off-by: Fabien Chereau <fabien.chereau@intel.com>
2016-02-05 20:25:15 -05:00
Vinicius Costa Gomes
45dcfe1478 rtc: Fix naming of RTC symbols
These symbols have the same name as the symbols from lib QMSI, which
causes a compilation failure, when lib QMSI is used.

This replaces the offending symbols with names which are more consistent
with the rest of the file (rtc_ prefix).

Change-Id: I288a1a229bf0b40f3b6fc8ffb35c502f998054b8
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-02-05 20:25:15 -05:00
Andre Guedes
1622e4f4b5 kbuild: Move CONFIG_STACK_CANARIES check
This patch moves the CONFIG_STACK_CANARIES check from architecture's
Makefile to the root Makefile since this option is kernel-related,
not architecture-related. This way we avoid replicating the same
CONFIG_STACK_CANARIES check in several Makefiles.

This patch also removes some blank lines from the Makefiles it touches.

Change-Id: I458f92fa6799526c608369d1e56579936bcb196e
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-02-05 20:25:15 -05:00
Rodrigo Caballero
772c85bed4 doc: Change README to reflect new API documentation.
Changed the README.rst to reflect the updates done on the API
documentation.

Change-Id: I591ddb7e618afedf9fd77eb322255aa1ee94c5a0
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-05 20:25:15 -05:00
Tomasz Bursztyka
403b26f665 quark-se: Add the development board support
It's basically the same pinmuxer as in CTB with different external
sensors wired to it.

Change-Id: Icea89a72b805d6dd2c5798c3f517c4fb00c819c9
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-05 20:25:15 -05:00
Peter Mitsis
d63a4f7bf7 nano_timers: Simplify nano_xxx_timer_test() API family
Simplifies the nanokernel timer API so that the timeout parameter must be
specified when invoking nano_isr_timer_test(), nano_fiber_timer_test(),
nano_task_timer_test() and nano_timer_test().

This obsoletes the following APIs:
	nano_fiber_timer_wait()
	nano_task_timer_wait()
	nano_timer_wait()

Note that even the though the new API requires that the timeout parameter
be specified, there are currentl only two acceptable values:
	TICKS_NONE and TICKS_UNLIMITED

Theoretically, the current implementation would allow one to supply a
finite positive value for the timeout and the system would wait up to
that many ticks for the timer to expire. However, it is thought that
that unnecessarily complicates the nanokernel timer model and so it is
left as an unsupported option.  Should that change, then that feature
could be enabled by updating the documentation.

Change-Id: I8835c5342ab5025d6f70fdfbed54a50add7568d7
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:15 -05:00
Peter Mitsis
5c01c09f4d nano_stack: Simplify nano_xxx_stack_pop() API family
Changes the nanokernel stack API so that the timeout parameter must be
specified when invoking nano_isr_stack_pop(), nano_fiber_stack_pop(),
nano_task_stack_pop() and nano_stack_pop().

This obsoletes the following APIs:
	nano_fiber_stack_pop_wait()
	nano_task_stack_pop_wait()
	nano_stack_pop_wait()

Note that even though the new API requires that the timeout parameter
be specified, there are currently only two acceptable values:
	TICKS_NONE and TICKS_UNLIMITED
This nanokernel option does not support CONFIG_NANO_TIMEOUTS.

Change-Id: Ic7f16ee30c3534115ceffa19ef8591ecc5a79080
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:14 -05:00
Peter Mitsis
f0b55aa624 nano_lifo: Simplify nano_xxx_lifo_get() API family
Changes the nanokernel LIFO API so that the timeout parameter must be
specified when invoking nano_isr_lifo_get(), nano_fiber_lifo_get(),
nano_task_lifo_get() and nano_lifo_get().

This obsoletes the following APIs:
	nano_fiber_lifo_get_wait()
	nano_fiber_lifo_get_wait_timeout()
	nano_task_lifo_get_wait()
	nano_task_lifo_get_wait_timeout()
	nano_lifo_get_wait()
	nano_lifo_get_wait_timeout()

Change-Id: Ie9f93e46da42ea33c32544c02ab1d70b893cc198
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:14 -05:00
Peter Mitsis
54b782a88b nano_sema: Simplify nano_xxx_sem_take() API family
Changes the nanokernel semaphore API so that the timeout parameter must be
specified when invoking nano_isr_sem_take(), nano_fiber_sem_take(),
nano_task_sem_take() and nano_sem_take().

This obsoletes the following APIs:
	nano_fiber_sem_take_wait()
	nano_fiber_sem_take_wait_timeout()
	nano_task_sem_take_wait()
	nano_task_sem_take_wait_timeout()
	nano_sem_take_wait()
	nano_sem_take_wait_timeout()

Change-Id: If7a4bce1bd8ec8d6410d04f3c16ff1922ff0910e
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:14 -05:00
Peter Mitsis
cd6db374de nano_fifo: Simplify nano_xxx_fifo_get() API family
Changes the nanokernel FIFO API so that the timeout parameter must be
specified when invoking nano_isr_fifo_get(), nano_fiber_fifo_get(),
nano_task_fifo_get() and nano_fifo_get().

This obsoletes the following APIs:
	nano_fiber_fifo_get_wait()
	nano_fiber_fifo_get_wait_timeout()
	nano_task_fifo_get_wait()
	nano_task_fifo_get_wait_timeout()
	nano_fifo_get_wait()
	nano_fifo_get_wait_timeout()

Change-Id: Icbd2909292f1ced0bad8a70a075478536a141ef2
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:14 -05:00
Peter Mitsis
a6b20d4c04 nano timeouts: Add support macros
The macros _NANO_TIMEOUT_TICK_GET() and _NANO_TIMEOUT_ADD() will be
used in later commits to help simplify the nanokernel APIs.

Change-Id: I668af85d775eab112953d064d9c91de607f60a59
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:14 -05:00
Peter Mitsis
6ef5761b69 test_timer: Make file header doxygen compliant
Change-Id: I9a4eda052b096faec9382680f423655f4f3f45db
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:14 -05:00
Peter Mitsis
0032dbe8ad test_stack: Make file header doxygen compliant
Change-Id: I9bfc678ad4a6abe144f9486fac34fbb34e2dd716
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:14 -05:00
Peter Mitsis
7f56d855cf test_lifo: Make file header doxygen compliant
Change-Id: I59fa96ad7508d2f3d123b22d9a3ff5b4e5a1dacd
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:14 -05:00
Peter Mitsis
3cdf484ef4 test_sema: Make file header doxygen compliant
Change-Id: I5cb98fac35b32bd68f151ca8eed5622f8ca95f12
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:14 -05:00
Peter Mitsis
9b7f31ea88 test_fifo: Make file header doxygen compliant
Change-Id: Ia6f48645c723f0483516c956cb5e3f446bfe0086
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:14 -05:00
Anas Nashif
e7e125a7b9 Zephyr 0.8.0
Bump version to 0.8.0

Change-Id: Ia9390bb659fcad640300e262b8a354fcd9edd88c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:14 -05:00
Anas Nashif
0bb325d035 release: Update sanitycheck footprint data
Change-Id: I6a5115980ab98617ab8496d246f9ae375b24c8a8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:14 -05:00
Anas Nashif
7ca98c05df doc: add mac installation guide
Change-Id: I177fa345a0758fd6ba1305007b02d7ae49e25c86
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-05 20:25:14 -05:00
Anas Nashif
893320abd3 toolchain: remove forgotten debug message
Change-Id: I2d05eeafdb150452de31918ac8bde8fcdc31183d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:14 -05:00
Anas Nashif
e49530a562 kconfig: do not build with NLS by default
Build kconfig with -DKBUILD_NO_NLS by default and disable compiler
warning on Mac OS when building the host tools.

Change-Id: I76a2b5ab6b6b1c0bbe2dc2b31e3bd651fd05948e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:14 -05:00
Andre Guedes
215f5905a8 gitignore: Add vim temporary files
Change-Id: Ia36f479b449bb17ad0496d977c034f13ea978fd0
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-02-05 20:25:14 -05:00
liu.lei
3b28220c40 pwm samples: Correct MIN_PERIOD
1ms should be 32000, not 320000

Signed-off-by: liu.lei <lei.a.liu@intel.com>
Change-Id: I39d82f5081149e0584075e728edc700f3db5f71c
2016-02-05 20:25:14 -05:00
Javier B Perez Hernandez
243c36360a sample: nano: benchmark object: update BOARD to arduino_101
Updated board to arduino_101 and updated nanokernel_objects.c
NANO_CPU_INT_REGISTER macro args.

Change-Id: I5281a84138ef031ae82cdd80ab617f94b3f712af
Signed-off-by: Javier B Perez Hernandez <javier.b.perez.hernandez@linux.intel.com>
2016-02-05 20:25:14 -05:00
Andrew Boie
4f0f7e3325 ipm_quark_se: don't wait for response with interrupts locked
If the remote handler tries to send a message back with wait enabled
it can lead to a deadlock.

Change-Id: Ife6eae29c10e8937abd1b6511ee605f7786c6a7a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:14 -05:00
Andrew Boie
08d3cd7bfd ipm: quark_se: fix dropped/repeating characters
The while loop on the status bit was unnecessary as we will get
a separate invocation of the ISR for every message. We also ensure
that the global status register bits for the channel being serviced
are cleared before exiting. Fixes an issue where some messages
would be dropped or repeated.

Some runtime checks that shouldn't happen in practice have been moved
to assertions.

Change-Id: Iedd28ae15522c7b9f59ef34fa9fa8b4e24e6be14
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:14 -05:00
Andrew Boie
4d3e120109 ipm_console_receiver: fix carriage returns
It's unclear why the carriage returns were moved to the begnning and
not the end.

Change-Id: Ic6bda55c7537538c47477e6c44f5e4c1534573d4
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:14 -05:00
Daniel Leung
760f8798f3 uart/ns16550: implements new API of line control
This implements the newly introduced APIs to manipulate line controls
for UART.

This also implements the driver command API as setting baud rate
may require setting the DLF.

Change-Id: I80634aa3fbd4a3223c46edb61417123e36f439dd
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:14 -05:00
Daniel Leung
64cba6d9c7 serial/uart: adds new APIs for serial line control
This adds 2 new APIs to the serial/uart drivers:
() One is to control the serial line, such as RTS and CTS.
() Another one is to allow driver to expose hardware specific functions
   to apps. This is needed as some hardware may have extra registers to
   set for baud rate.

To keep the code size small, these features are disabled by default.

Change-Id: I15c000ce68a0a490dcfd3493b2fe9bc51fa974fa
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:14 -05:00
Daniel Leung
b85d3ef826 uart: move baud rate and options into driver data
This moves the baud rate and options fields out of the UART driver
config struct and into the driver data struct. This will allow
changing baud rate and options at runtime in the future.

Change-Id: I62ddea2f95e634f2d60eeb9537f960799fc9301f
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:14 -05:00
Daniel Leung
b9c70ce76a uart/ns16550: support divisor latch fraction (DLF)
The UART on Quark SE and D2000 supports fractional clock divider.
It is used to limit frequency error for supported baud rates.

Change-Id: I1f39a95db09f4a5a4116edc700a10e4b9ecfa2bd
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:14 -05:00
Benjamin Walsh
0ad859aaf3 arm/arc: fix typos
Change-Id: I0f1c8ccab38719e095547254fdd27e85125f01dc
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:25:14 -05:00
Anas Nashif
04727bcf9e toolchain: remove hardcoded compiler versions
When the SDK is updated usually it comes with new versions of the
compiler causing issues with the toolchain not finding libraries.

This will get the version from the compiler and sets the path
accordingly.

Change-Id: I854c57bb082ae8136eebdd0ae7a8c151c1d699c8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:14 -05:00
Anas Nashif
8fc8e9fb9f strip MDEF_FILE_PATH variable
Avoid issues with variables having leading/trailing spaces.

Change-Id: I9e51197c1428a9eb701a73ee55f3a726486660d3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:13 -05:00
Anas Nashif
9d26ab769d dequote and strip CONF_FILE variable and minor variable cleanup
Avoid issues with variables having quotes and leading/trailing spaces.
Additionally, set KERN_TYPE to micro.

Change-Id: Id3f5aeca6844292bbb537f443bd36f191432fe58
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:13 -05:00
Anas Nashif
6c5509f34f linker: prefer board specific linker file
First look for a custom linker file defined by a config variable, if
not defined, look in the board directory. Finally look in the SoC
directory.

This adds flexibility and enhances modularity allowing a board to define
the linker the script instead of the SoC specific one.

Change-Id: Id44aa7d0e93d97234163ec858e2cfefe09768a08
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:13 -05:00
Andrew Boie
4f48ac1c20 arc: soc: fix comment for NUM_IRQS
The semantics of this value is that it allows for the use of IRQ lines
0 through CONFIG_NUM_IRQS - 1.

Change-Id: I0287da931b06253065f4fba076e9a949dcb3cf53
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:13 -05:00
Andrew Boie
c97150b9ed ARC: correctly generate the SW IRQ table
Too many entries were being created in this table. It needs to
create indexes starting from 16 to CONFIG_NUM_IRQS - 1, since IRQS 0-15
are reserved for CPU exceptions and are not handled through this
mechanism.

generic_arc was still using the old C-based table which is
incompatible with the static IRQ implementation. An attempt was made
to move the SW IRQ table to arch/arc/core, but linker issues were
encountered and this will be done in another patch.

With CONFIG_NUM_IRQS set to 68 on Quark SE, inspection of binary
with objdump -x reveals that we are generating table entries:

00000000 g     O .isr_irq16	00000000 _sw_isr_table
00000000  w    O .gnu.linkonce.isr_irq16	00000000 _isr_irq16
00000000  w    O .gnu.linkonce.isr_irq17	00000000 _isr_irq17
00000000  w    O .gnu.linkonce.isr_irq18	00000000 _isr_irq18
...
00000000  w    O .gnu.linkonce.isr_irq67	00000000 _isr_irq67

Which is exactly what we need.

Change-Id: I8ca1682128ae67e2a24642791b7ce31ebca759bf
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:13 -05:00
Peter Mitsis
58acef1162 kconfig: Fix INT_LATENCY_BENCHMARK description
Fixes the routine names referenced in the INT_LATENCY_BENCHMARK
kconfig option description.

Change-Id: I74c67a8f54cfc3b0ce75fc390d7ab6bd39561d6f
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:13 -05:00
Peter Mitsis
4146b346b4 x86: streamline irq_lock()/irq_unlock()
The routines _int_latency_start() and _int_latency_stop() have been
replaced by macros that evaluate to nothing when the kernel config
option INT_LATENCY_BENCHMARK is not enabled thereby giving a performance
boost to the x86 versions of irq_lock() and and irq_unlock().

Change-Id: Iabfa7bf001f5b8396e7bcf5eebd6b1aa342bac46
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:13 -05:00
Peter Mitsis
3c350ffb39 fixdep: Use correct printf identifier
Fixes a build warning caused by using the incorrect printf
identifier for a parameter of type size_t.

Change-Id: I03ecc245de366e7de07eb2b49a03f69af087090c
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:13 -05:00
Anas Nashif
16266f5cd5 Zephyr 0.8.0-rc2
Change-Id: I79f294623ca9bae1a5f9f88492ecbc5da9907cbb
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:13 -05:00
Peter Mitsis
aad3ba5134 arc timer: Fix tickless idle tick announcement
Change-Id: Iad6806c7be76661987652a63deb70a740c0d8e15
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:13 -05:00
Benjamin Walsh
7e5dd561ca arc: select NANOKERNEL_TICKLESS_IDLE_SUPPORTED
The ARC is an architecture that supports tickless idle in
nanokernel-only systems, and it thus must signal this to the build
system.

Change-Id: I96b0a4e8f78b2ea67d2f1b3384e94a32d8eb80e8
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:13 -05:00
Benjamin Walsh
1ffdea1eb9 idle: add infrastructure for tickless support in nanokernels
An architecture that supports tickless idle in the nanokernel can allow
selecting TICKLESS_IDLE by forcing NANOKERNEL_TICKLESS_IDLE_SUPPORTED to
be enabled.

Change-Id: I4e45b619c599913d40b7bc19902094fb361b1e3b
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:13 -05:00
Dirk Brandewie
ad99c3f93b kconfig: remove useless tickless idle dependency
Re-applying this patch, which was lost when moving to kbuild:

	commit 64c0f13f9380 ("kconfig: remove useless tickless idle dependency")
	Author: Benjamin Walsh <benjamin.walsh@windriver.com>
	Date:   Mon May 11 15:13:46 2015 -0400

	kconfig: remove useless tickless idle dependency

	TICKLESS_IDLE_THRESH depends on TICKLESS_IDLE, which depends on
	ADVANCED_POWER_MANAGEMENT, which itself already depends on
	MICROKERNEL. There is thus no point in having TICKLESS_IDLE_THRESH
	depend on MICROKERNEL.

Change-Id: I95edcc7b927dd122b80f376c96233decdcc9afab
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:25:13 -05:00
Peter Mitsis
9cfd0de410 arc: add nanokernel tickless idle support in timer0 driver
Change-Id: Id2ee328458c5a1be944e90c34bbc2158464be325
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:13 -05:00
Peter Mitsis
c100aa825f arc: Remove misleading comment in Timer0 driver
Change-Id: I42051af9503272b3b7a4dd7dfaf66ae7eb38c133
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:13 -05:00
Benjamin Walsh
1831900cd3 arc: add nanokernel tickless idle support
Modified interrupt handling and idle code to enter and exit tickless
idle mode.

Change-Id: I3461ab6dba30003a4317027fc50a3ba07e830015
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:13 -05:00
Benjamin Walsh
38a601e578 idle: add support for nanokernel tickless idle
The architectures need to add support for it in their nano_cpu_idle()
and nano_cpu_atomic_idle() implementations, as well as in their
interrupt entry and exit code.

Change-Id: I44a241c56e624dc8e32e08db29a84489314cd7a4
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:13 -05:00