This commit sends a draft of the topics that will be included
as a section for Kbuild documentation.
It also includes content for the Kconfig Structure section.
The intention of this draft is to start gathering comments on
the content sent and the initial menu of topics.
Change-Id: I11f62b015ef0fc722f5e0a089ec83cb0a08b3889
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
export TMP if you want the out of tree tests to write
to something else other then /tmp
Change-Id: I77b1dffe5fa5e61db66a8d754370a0cd47511ab4
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit fix an error with the clean targets.
The package directory does not exist anymore.
Change-Id: I415085cb35eda9a1f30d6b53a5529e1fb2a8447a
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Kconfig creates a header file per each Kconfig symbol that changes
in between configuration changes and rebuilds.
This commit creates the files in the output directory specified by the
O environment variable.
Change-Id: I01b3482e9497f70961268505865788385b41ca8f
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
File name had wrong extension.
Change-Id: I9b8f57d21b2a497bf53e159a62dfee24a4c5de21
Reported-by: Rick Demers <richard.demers@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The type of the handler variable was missing, causing compile failures.
Change-Id: I33c0f8d2893de0c6ad14f33ecb03b106c87cf758
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Some files were left in bsp/ after a failed rebase.
Change-Id: I26d34387d751ddd831b2dfef5c8cb6a1a8904b3c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
As the macros ALIGN_STRUCT(x) and PACK_STRUCT are no longer used, it is safe
to remove them. (Their replacement macros are __aligned(x) and __packed.)
Change-Id: If52302b6fba91ac707af828396592ecc3016934d
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
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>
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>
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>
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>
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>
Allow configuring nano timeouts. They are disabled by default.
Change-Id: I9db0b632681ae149295acd3ed81fccdee2c4f91a
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The microkernel now announces the nanokernel ticks, and takes them into
account when computing the amount of time to stay in tickless idle.
This allows code linked against a microkernel to use the nanokernel
timers and timeouts.
Change-Id: I9436347e22fe76c2c1a314589ffc041a9a1a99a4
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The nanokernel time tracking code (ticker) can now exist in microkernel
systems. This allows the ticker that drives nano timers and timeouts to
advance the tick count for these in a microkernel, thus allow their
presence there. Previously, nano timers could not be used in a
microkernel.
Change-Id: I17f2b659691a081b0f9bf3961ed030533aa02a15
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This interface can be called by the microkernel to obtain the earliest
expiring nanokernel between the timers and timeouts, to allow the idle
code to take the correct decision w.r.t. tickless idle.
Change-Id: I9598ec2a0dd013a6a8ccc95d50105bb98ca27f54
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The system clock code only references it, it should not own it.
Change-Id: I38eb61599eb66458d5a3c3c9713cf11dc14e8a63
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Add the necessary call to dequeue the nano timeouts when a tick occurs
in the nanokernel.
Change-Id: I26fdfc4084d7564e232d8240eab8915076deaa31
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The nanokernel timers and timeouts won't be dependent on each other, so
the expiry handling code needs to be able to only contain the necessary
code depending on what is enabled in the kernel.
Change-Id: Ibb7c31e926a56ebd3e22b8eac6db05faa1c8ddd3
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The nanokernel timers will be available in the microkernel, but can be
disabled if not needed. A kconfig option is needed for that: the option
is enabled by default, and only available in the nanokernel for now. It
will be made available in the microkernel in the future.
Change-Id: I3910affde7bd2e7b25ab0a3c655255a9be01c9b8
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The nanokernel timers are now available to microkernels, alongside
nanokernel object timeouts.
Change-Id: Ia2f0b93e8f848fd02b7260e35c0322d6501c8280
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The nanokernel needs access to these values since the nanokernel objects
API will provide a way of waiting with timeouts.
Change-Id: I2b39fccc1c2a2b5ba937aff774ab2ebc649e643b
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Add the _timeout() variants to the _get_wait() routines. Those allow
waiting with a timeout. The return values are the same as for the
regular _get() routines: a valid pointer on success, NULL on failure.
Note that the task_ variant is still polling, and the task is not put on
a timeout queue, instead polling for the ticker change in addition to
data arriving on the LIFO.
Change-Id: Iad8fa00b3fa0656fee9a67b2dd8b316e1e8aac74
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Add the _timeout() variants to the _get_wait() routines. Those allow
waiting with a timeout. The return values are the same as for the
regular _get() routines: a valid pointer on success, NULL on failure.
Note that the task_ variant is still polling, and the task is not put on
a timeout queue, instead polling for the ticker change in addition to
data arriving on the FIFO.
Change-Id: I6650d0de8494c15698d670442da1e9c8d8c89910
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Add the _timeout() variants to the _take_wait() routines. Those allow
waiting with a timeout. The return values are the same as for the
regular _take() routines: 1 for success, 0 for failure.
Note that the task_ variant is still polling, and the task is not put on
a timeout queue, instead polling for the ticker change in addition to a
semaphore state change.
Change-Id: Idef357f99a5ca30e20665a25abc54d253a848a52
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This new API allows starting a fiber with a delay. It returns a handle
to allow cancelling it before the fiber starts, via the cancel API.
It also adds an API allowing a fiber to sleep for a given amount of
ticks.
NOTE: CONFIG_NANO_TIMEOUTS must be enabled.
Change-Id: I608dc47b5f08321cfd0c1dd9bb18d1d77eab87e3
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
s_NANO contains the timeout queue, and each ccs needs a struct
_nano_timeout object that gets linked in the nanokernel timeout queue.
Change-Id: Iad027eaaebcffe190e95f0b9d068f047062559c2
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The timeout queue interface will allow having fiber interacting with the
nanokernel objects wait with a timeout. It can be completely excluded
from the kernel if not needed, via the CONFIG_NANO_TIMEOUTS option.
Most of the timeout queue interface is contained within timeout_q.h.
However, this file should never be included directly: rather, the
wait_q.h file is to be included instead, which itself provides NOOP
abstractions for some timeout functions when timeouts are not enabled in
the kernel.
Change-Id: Ifeb1b934e0c71d00c59ebc88a54ab26e49686807
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The old doubly-linked list implementation had only support for very
basic operations, i.e. add at head and remove.
The new implementation is highly enhanced, allowing these operations:
- initialize list
- check if a node is the list's head
- check if a node is the list's tail
- check if the list is empty
- get a reference to the head item in the list
- get a reference to the next item in the list
- add node to tail of list
- add node to head of list
- insert node after a node
- insert node before a node
- insert node at position based on condition
- remove a specific node from a list
- get the first node in a list
The implementation is completely inline, since the operations are rather
simple and do not warrant a function call.
Change-Id: Id85c04e67f6a88b005390172f1276daa12bcf8ce
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Obtain the pointer to the encompassing object from the location of a
field in the object.
Change-Id: If8f9ffa4998c4c19b4cd17293610fff677fa0158
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Rename nanokernel's _do_sys_clock_tick_announce() to
_nano_sys_clock_tick_announce() so that it can be called from the
microkernel tick handling code without name ambiguity.
Change-Id: I2ec9dd92ceda51f00be1dd95bc3239d6b2e82943
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The #include <__assert.h> in nvic.h must be guarded by __ASMLANGUAGE
since nvic.h is usable by asm code, and __assert.h is C-only.
Change-Id: I16d72e4579705dbd0bfb55a787525c5938fd1f22
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Enables sanity to run out-of-sanity checks on a set of sample projects.
Change-Id: I58ae894b326a6eb15d6d56bc8e95738d21e17245
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Deprecates (and hides) the -B option in favor of using the -P option.
The -B option is used to specify the BSP, whereas the -P option specifies
the platform.
Change-Id: Ie1d3cd6383f08a84e5d994221b253153152a0658
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
The -s option to sanity_chk became obsolete with the switchover to Kbuild.
Change-Id: I6ab68692aea39e4289520613b53a46320044fcfb
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
The sanity scripts no longer use the deprecated method specifying the BSP (and
the optional BSP_VARIANT). Instead, they now use KBUILD_DEFCONFIG to identify
the target platform.
Change-Id: I583f876afd006e66fc314b8913cd766ba9d2b764
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Completes the separation of data from the sanity scripts.
Change-Id: Icc7a4922d5f108ca54d2c2f08b192259b07b3a0e
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
These data files will eventually replace the project list tables that are
currently defined in the various sanity checks.
Change-Id: I1b9aef528ff2acc1ba96fa540986c50e01032f68
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Changes the set of strings stored in $PRJ_TYPE from
{"microkernel", "nanokernel"} -> {"micro", "nano"}.
The $PRJ_TYPE variable will be used in later commits to create the
$KBUILD_DEFCONFIG string.
Change-Id: I9e2d866d4277ffaccff4f84a42ec2bc75c2ce57a
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
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>
KLIB_DIR builds are a relic from the previous build system.
Change-Id: I382db45f0a21786e1b7c50c9a881c82feb2c7481
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>