Removes the instruction directing users to issue "make pristine"
before building a sample project, as this should be unnecessary
under normal circumstances and can cause the user to unexpectedly
lose their current configuration information. In its place, a section
on troubleshooting is added that describes how to rebuild a project
using the desired configuration.
Change-Id: I4eaace2888000c3ec5d101c27a38c74c2987312e
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Gets rid of single-line comments required by a previous set of
coding conventions. These comments provide no value to readers
and just clutter things up.
Change-Id: I2a08b12cf5026253de56979efdfc510e7e68defe
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Revises kernel so that it uses the standard NULL symbol defined
for C99, rather than having its own custom symbol.
Change-Id: I74342f192e95899a83db879e8b1c8fe89ac8b92d
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Revises kernel so that it uses the standard boolean type library
defined for C99, rather than having its own custom boolean type.
Also revises sample projects that used the non-standard type.
Change-Id: Ib41b7f836da25352aa5ae9dfbbfdd29739017b6f
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
As a result of the conversion to the new build system, this file
was missed when the test project was eliminated.
Change-Id: Ie61d2549910cfeee2c0627451d05a5b1faff3deb
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
The global variable _k_server_command_stack_storage is only referenced in
one file.
Change-Id: I62f327c77dfff2d6c553436f5e77a8053aa93031
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Closing comments to two CONFIG_MICROKERNEL ifdef blocks incorrectly identified
the ifdef block as NOT belonging to the microkernel.
Change-Id: Iee415e33d7f8a88c41009c5783b37da3a431461b
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Instead of initializing the stack (when INIT_STACKS is enabled) in start_task()
and _fiber_start(), do it in _NewContext(). This helps to both reduce code
duplication AND ensure that all contexts get an initialized stack (previously
the background/idle task's was missed).
Change-Id: If2d50309d2be48fac937f5d0ae96b9de185c0fe2
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Add infrastructure support having multiple instances of a driver
configured into the system each with its own compile time
configuration information.
Change-Id: I1e447af18311139b43f74fe0439483ccd132b63f
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
This commit adds the generation of the binary kernel files:
kernel.bin
kernel.lst
kernel.strip
Change-Id: I7e1aab494ee1143994b4b65d0991906fbe8a36df
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
This commit sets Execute in Place (XIP) option
as a default for CortexM architectures.
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Ib9bd361a9ac6c64d9755c6bf3ac5c8df6c1b22f2
According to section 3.7 of Documentation/kbuild/makefiles.txt, using
EXTRA_CFLAGS in Makefiles is "still supported but their usage is
deprecated." However, using make EXTRA_CFLAGS="-DSOMETHING" results in
EXTRA_CFLAGS from Makefiles being overwritten, obviously breaking the
build. This patch converts to them to the newer ccflags-y which also
fixes the problem.
Change-Id: I6309439599d4c9cc184f9ecd941bde841982ef07
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Since the address of the new context is known before _NewContext() is invoked
(due to it being passed a properly aligned stack), there is no longer any
need for _NewContext to return the pointer to the context.
Furthermore, as a direct result of the properly aligned stack, the pointer to
the new context does not need to be passed as a separate parameter since it
will always match the passed stack pointer.
Change-Id: Ie57a9c4ad17f6f13e8b3f659cd701d4f8950ea97
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Hoists the initialization of the the microkernel's idle task's stack fields
out of the runtime and into sysgen thereby removing microkernel code from
the nanokernel initialization.
Change-Id: I54cbbec9e875a52b5fa52562e1a2770cd3ac1cc3
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Runtime alignment of a context's stack is no longer necessary in _NewContext()
as the memory is aligned (via the __stack tag) before calling _NewContext().
Change-Id: I31b7fd883ea3f1dcdb378e8ff508430bc75afcde
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Updates sample projects to ensure that fiber stacks are properly aligned by
using the __stack tag.
Change-Id: I4f92033571d65aa87b6d46da5d7cb6d92eadc27a
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Bluetooth fibers must have their stacks properly aligned.
Change-Id: Id46b376abb46400c563050b4c8393ab3983ff045
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Updates the kernel defined stacks to ensure that they are properly aligned
by using the __stack tag.
Change-Id: I8514d38ee2e5bb2b2d87b17021db3c7f9c36a772
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
The "__stack" tag is to be used to align an array (to STACK_ALIGN) for stack
use by either a fiber or task.
Change-Id: I5828f3ee1b09b0b5ba894ea30689d179de347494
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
The __attribute__ keyword is toolchain specific.
Change-Id: Ia3c0ff54d778785679c864704f8db6a3ba898948
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
The PACK_STRUCT macro is being phased out in favor of using __packed.
Change-Id: I4f231ce99d104377436d14c5a8fa3eb0c6513b35
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
The __attribute__ keyword is toolchain specific.
Change-Id: I2183d154ccdb9b5bed3bc245cc37cbf4c5cc62cc
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
The names "__aligned(x)" and "__packed" are more generic than ALIGN_STRUCT(x)
and PACK_STRUCT respectively and are to be used in their stead.
NOTE: ALIGN_STRUCT(x) and PACK_STRUCT are now considered obsolete.
Change-Id: Ic5e859092643dde53bb8fa1117c6d877c2c4296f
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
The routine _NewContextUsr() does not exist.
Change-Id: Ia20ddd3c9066930bd94e02850880a2f777081e82
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Completes the renaming of nanoFiberStart() -> fiber_fiber_start().
There is little value in listing the callers of _NewContext() in its function
header. Not only was the (deleted) list both incomplete and wrong, keeping
it around and properly updated requires error prone maintenance.
Change-Id: Ic45f51b285c027a2e8be331c0d28c16bdc97647d
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
There is little value in listing the callers of _NewContext() in its function
header. Not only was the (deleted) list both incomplete and wrong, keeping
it around and properly updated requires error prone maintenance.
Change-Id: Iec069847762fdef6b6b2f54ad23c69ab3fa6e592
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Checkpatch generates an error if any spaces follow the '*' when declaring
pointers.
Change-Id: If8fc4b185c5c508eadc78bcc9fa7a5050ccbdad4
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
The length of time it took for the microkernel's test_fp_sharing test to run
was occasionally causing issues with sanity_chk. The test would take close
to five minutes to finish and sanity_chk has a five minute timeout for the
tests. To resolve this, the number of iterations for which the test executes
has been cut in half (from 1000 to 500).
Change-Id: I171b96f6af81a8b08d0367beecab536f16d1ca7e
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
As it is impossible for GETTIMER() to return a NULL pointer, task_timer_alloc()
will never return INVALID_OBJECT.
Change-Id: I270732f31033d9ce55847dc9324f215680865273
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
It is a fatal error if the microkernel is configured with either too few
command packets or too few timer packets.
NOTE: During this refactoring of _Cget(), not only is it renamed to
_nano_fiber_lifo_get_panic(), but it is moved into "nano_lifo.c".
Change-Id: I1d866cda1b444da04877f7eda03762b6e83c9a6f
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
This reason code will be used indicate that the kernel failed to allocate a
critical resource (such as a command packet or a timer packet).
Change-Id: I6d4c3d96fc70b2b8cab4027b1b8e4febf4d6c474
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Improves coding consistency by having _k_timer_alloc() use GETTIMER() instead
of _Cget().
Change-Id: I6575307ab6fe769bcf6dbf7e6c845b6cc4e338bd
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Future commits will prevent task_timer_alloc() from returning
INVALID_OBJECT.
Change-Id: Ib7ec2e0fafb625223d762d73f15c128f134169b3
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
The number of timers in the system is no longer configured via the VPF, but
rather through the kconfig option NUM_TIMER_PACKETS.
Change-Id: I58a4b3009e183a9d04e3618418baa73ed296d0af
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
The use of VXMICRO_BASE has been supplanted by TIMO_BASE.
Change-Id: I905232a8d87145afb2f8df30b5f9056ec72ce045
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Since ARC does not support the microkernel, there is no need to
define any microkernel event symbols for it. (And TICK_EVENT is
an architecture-independent concept anyway ...)
Change-Id: I918a55743f8685ef23b9bb5a8afc67b905ab9766
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
The toolchain-specific macros used to generate absolute symbols
are now part of the main include file for that toolchain, since
there doesn't seem to be a good reason to have them in a separate
file.
Change-Id: Ic97800485b20d6c5b23d14f69f67ee845cf076f5
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Eliminates the need to reserve the "kernel_" prefix in the
kernel namespace. Also, aligns versioning with other APIs
that are neither nanokernel_ or microkernel-specific, such
as the system clock APIs.
Change-Id: I81e43cd03849b45a4b432b0875dc8b1d5862dba9
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Now located with the other public APIs related to kernel versioning.
Change-Id: I60e0111d696b3a4f2f56b7d2021a391b6b00432e
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
1) Renames APIs to align them with conventions used by other
general-context nanokernel APIs.
2) Relocates implementation of these APIs to the architecture-
independent portion of the nanokernel.
Change-Id: I1aa60029aaa96697cd8fcb594bbae23ba6656661
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
The atomic APIs are not really tied to nanokernel-specific
capabilities, and can be used by anyone at anytime -- even
during system initialization!
Change-Id: I427954029b4b465127cb5b4b642c2f9968c17d5a
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Builds upon the approach taken by the x86 version of k_memset()
and k_memcpy() APIs, which uses word-sized operations for greater
efficiency when manipulating large buffers. The algorithms used
here are architecture-independent.
Change-Id: I01ea8b22c8e6028f881e9b61ccc3a01e8ba4c02b
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
These APIs are no longer referenced anywhere.
Change-Id: I56e3410b9fb6bc4eb72bc9299b33f75227916434
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>