Commit graph

41120 commits

Author SHA1 Message Date
Jukka Rissanen
781b627f8c Add __may_alias macro to GCC toolchain
This is needed when one wants to avoid gcc
"dereferencing type-punned pointer" warnings.

Change-Id: I7bfd68fabb07deb64908cb0eaa833bdc5c8a4e08
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:16 -05:00
Szymon Janc
6d27b0a33c Add simple UART driver
This driver is a very simple UART driver that can be used to implement
a protocol in application. It has no protocol logic and just allow
application to receive and send data over UART in platform independent
manner.

API is designed to minimize number of required memory copies.
Application is able to provide new buffer every time it decides to
consume received data. It is also able to just alter offset and
reuse current buffer eg if data was corrupted or otherwise invalid.

Change-Id: I8d3827fe2e242196e986d0419bc5487357481558
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
2016-02-05 20:14:16 -05:00
Allan Stephens
072961cda4 Rename VXMICRO_BSP_BASE to ZEPHYR_BSP_BASE
Updates this environment variable to reflect the new OS name.

(Note: Out-of-tree builds are not yet supported.)

Change-Id: If26264c39a98d76c418f07be88ecb196f34fba1c
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:16 -05:00
Allan Stephens
63c7d00584 Rename VXMICRO_BASE to TIMO_BASE
Updates references to this environment variable, which were missed
during previous renamings.

Change-Id: I1126271ce8b84d3eaedeab11198d3a3b645393af
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:16 -05:00
Allan Stephens
06f10df990 Eliminate references to VXMICRO_TOOL
Since the build system now supports only one toolchain, the
VXMICRO_TOOL environment variable is obsolete. The sanity
check scripts that reference this symbol are revised accordingly.

(Note: As a temporary measure, the main sanity check script
continues to accept the -T option; however, the option has no
effect.)

Change-Id: I383b128b9f5b07164abb7ddeb5a699d819a20316
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
570795f014 Rename VXMICRO_JOBS to ZEPHYR_JOBS
Updates this environment variable to reflect the new OS name.

Change-Id: Icc6a2f3d4cdfcf7cab11da7920aaa8110177047b
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
74b98c1cc4 Rename VXMICRO_GCC_VARIANT to ZEPHYR_GCC_VARIANT
Updates this environment variable to reflect the new OS name.

Change-Id: Iba9230466fbfda786be7d1265927b4ecc4c7dd93
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
815c6406bc Rename VPF files to use MDEF file extension
The file extension indicates a "Microkernel DEFinitions" file,
and no longer reflects the obsolete VxMicro/Viper branding.

Change-Id: Ib95b271404a4a4737e851d603c371244fa609e4d
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
b36b379af3 Eliminate VxMicro branding in sanity check scripts
Change-Id: I5cf0c49a986b75f8ea1169f36542d39a3394121d
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
f94682bafb Eliminate VxMicro branding in build system
Change-Id: Ie0f34b36e58ee0ea8e7438742d4448be1c393913
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
5189844df5 Eliminate VxMicro branding in kernel code
Eliminates references to the obsolete OS name. In most cases the
name is simply removed, as it isn't necessary.

Change-Id: I32f9e7390e436aec008a9454b72657e129d65152
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
ec2d3fb6de Eliminate Viper branding
Gets rid of references to the obsolete OS name. (Note that removing
the build system comment entirely makes sense, since there are no
other comments for anything else in the file.)

Change-Id: I4473b016c1c85be48ac9ab8d5b8f6a5b11dd58d0
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
57de8be493 Eliminate VxMicro branding in sample projects
Eliminates references to the obsolete OS name. In most cases the name
is simply removed, as it isn't necessary.

Change-Id: I3796f2aebe802f8c6045b7424a3e7aab4d5fb8e8
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
5b291d3567 Eliminate VxMicro branding in main application include file
File is renamed to zephyr.h.

Change-Id: Ice7ab9318c525630572023614b5bed67ae0400c1
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
a2a14a30b4 Eliminate VxMicro branding in sample project output
Gets rid of obsolete OS name, which isn't really necessary anyway.

Change-Id: Ic25b3addd43c84a75dacd6c61fdcc7a53217d320
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
b1190a00ba Get rid of VxMicro-specific warning from VPF files
This warning isn't relevant to Zephyr OS.

Change-Id: I8a115dec61c0c325e5b09337cd3a785fb0f5c75b
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Johan Hedberg
2628a471fd atomic: Add bitfield API for atomic_t
Add operations to manipulate individual bits in an atomic_t variable
or array of atomic_t variables.

Change-Id: I40133e203af36ebadbef93cfa1a9df04b62a94c9
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:15 -05:00
Johan Hedberg
24c44026db atomic: Add const declaration to atomic_get
The atomic_get() function is a read-only API which doesn't modify the
value given to it. The input parameter should therefore be declared as
const.

Change-Id: I084b7beb623610412f9237fc9dae6139580e2636
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
839fb27f41 Cosmetic changes to microkernel task status flags
Revises names and/or descriptions to bring them up to date.

Change-Id: I5c1db102bfa0156526f1524084f5802e6df52a52
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
ef4521396e Don't expose APIs for experimental task monitoring capability
This feature is still under development, so it's APIs shouldn't
be publicly advertised yet. And while they are being relocated,
they are renamed to adhere to kernel coding conventions.

Change-Id: I7a41d98e2fbb3b975fa42814cf64854f8cc0b623
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
fb7a75cb46 Eliminate unnecessary microkernel symbols
The ENDGROUP symbol isn't needed as it is identical in nature to
ENDLIST. The EMPTYID symbol isn't referenced anywhere (or described).

Change-Id: Ic2ba115ee6cde65fa5e57f8607ffa95979ba5f5a
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
f6d2c14ee1 Eliminate needless #includes
Gets rid of #includes that are no longer required as a result
of recent reorganization of file content.

Change-Id: I9d74b4f1506e26c235e2621099561a4ac3067e43
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
662d02cb33 Remove private context structure from public nanokernel API
The tCCS type doesn't need to be publicly exposed; any public APIs
that need to use this kind of type should be using nano_context_id_t.

Change-Id: Ife1e73c4a21326bf54e2d52bfa1f1281245935a1
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
d0ed154421 Eliminate nanokernel's private.h file
This file doesn't belong in the architecture-specific portion of
the tree, and its contents don't warrant their own file, so the
content is moved to the main nanokernel public API include file.

Change-Id: I0455fc9eb4f5ca31a8e6b487f56b09d0562fdb77
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
f5777f87bc Continue consolidation of arch-independent private nanokernel APIs
Eliminates duplication of these entries by the various architecture-
specific include files for private nanokernel APIs.

Change-Id: I711c3b42fe375d1574ce4a540142c3b507b71557
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
bff7fc17fe Begin consolidation of arch-independent private nanokernel APIs
Introduces nano_internal.h, which will declare all architecture-
independent non-public nanokernel APIs. This file is automatically
incorporated by the various architecture-specific include files
for non-public nanokernel APIs, and will not normally be included
directly by any other files.

Change-Id: I9f3de812a5747cc720fa0ff739007315e8d07dd9
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
69555e8efd Cleanup of nanokernel's fiber scheduling routine
1) Renames routine to conform to kernel naming conventions.
2) Relocates routine declaration to include files for
   non-public nanokernel APIs.
3) Relocates routine definition so that it resides with the
   nanokernel's other fiber manipulation routines.
4) Eliminates an unnecessary argument to the routine.

Change-Id: Ia139280dfea36262ca8417708786b4989f3eaee1
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
24dd3044ca Relocate declarations for public nanokernel object types
These declarations are now co-located with the declarations
for the routines that utilize them.

Change-Id: I70940923d9e424345aeac60cb5ddd7f7a2a54734
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
7e7854008f Remove task monitoring symbols from microkernel public API
Since microkernel task monitoring is currently experimental
anything related to it shouldn't appear in a public include file.

Change-Id: Iff0e6137085ed0743fb34e97f5cee1bb98aecaed
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
53165a631b Eliminate architecture-specific init.h files
These files now have no useful content.

Change-Id: If5d2df361eb8769ca38c4ae63f68a5681b3ad85b
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
0c3fd0afc2 Relocate declarations of _nano_fiber_swap()
These now appear in the files which declare other non-public
nanokernel APIs.

Change-Id: Iea01d6de44851a08b308004b2c3104c08b020970
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
f547a5b7b8 Eliminate cputype.h and its arch-specific derivatives
Since cputype.h no longer has any meaningful content it can be
eliminated, along with the arch-specific files it incorporated.
(This means that the arch-specific nanokernel public APIs are
now referenced only via cpu.h and its derivatives.)

Change-Id: I7f35b6c3c6c092d61c372ff85d73e49414474938
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Allan Stephens
bb9ab0322e Eliminate unnecessary references to cpu.h and cputype.h
Gets rid of places where there is no need to include these files
at all, or places where these files are being indirectly included
due to the inclusion of nanokernel.h.

Change-Id: I7b58148af454b977830c00a6b519a78d0595603b
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:14 -05:00
Allan Stephens
03a2abe737 Relocate macros for supporting non-byte addressible architectures
Moves these macros to the main public API include file for each
supported architecture, since the <arch>type.h include file is
to be eliminated.

Change-Id: Ia87b9c0bed1501bcce7f363bd4155f7ef642376a
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:14 -05:00
Allan Stephens
ecd6acec01 Reorganize dependencies for the 2 major public include files
Revises and documents the confusing and inconsistent set of
dependencies for the kernel's two main public include files.

The files now now clearly exhibit the following behaviors:

1) microkernel.h provides access to all public microkernel APIs,
   public nanokernel APIs (both architecture-independent and
   architecture-specific ones), and public "generic kernel" APIs
   (such as kernel version and system clock APIs).

2) nanokernel.h provides access to all public nanokernel APIs
   (both architecture-independent and architecture-specific ones),
   and public "generic kernel" APIs.

Change-Id: I64d1e88bb033ef10692033bb78e44cdcbe8124bc
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:14 -05:00
Jukka Rissanen
d639bb8c99 libc: Add tolower implementation
Add a tolower implementation that may be used in various parts of the
operating system.

Change-Id: I5aa855b41e2a09fcb077860b4580dbe1e6d4a093
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:14 -05:00
Juan Manuel Cruz
0167ee4279 Kbuild: Simplify prepare targets.
This commit organizes the prepare sequence targets removing
some unused targets left behind as a relique from the linux build.

Change-Id: I7b215865e2c06f9c0138806bce9fce9191d07d8b
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:14 -05:00
Juan Manuel Cruz
ef07b962d8 Kbuild removes kernel.release generation.
This commit removes the generation of the kernel.release file.
THe kernel.release file is redundant with the kernel version file.

Change-Id: I55f75597a760b3a9c672b7409ad93533a4f2c6ab
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:14 -05:00
Juan Manuel Cruz
52c9d87c25 Kbuild speed and target dependency improvements.
This commit improve Kbuild speed by removing the defconfig Make
call and including a direct copy of the default configuration file.

The .initconfig target is broken down in mergeconfig and defconfig
targets as well.

Change-Id: I1efadfca487a3fa8438e65e1c3da83fc46576628
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:14 -05:00
Juan Manuel Cruz
dc2b1f1746 Kbuild: Improve verbosity on project build.
This commit allows to control the verbosity of the Makefile.inc
execution using the console parameter V=1.

Change-Id: I253332b6e33725b6cd4cd83643321278f396ed50
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:14 -05:00
Juan Manuel Cruz
64fd17d96a Kconfig default configurations update.
This commit add the symbols CONFIG_RANDOM_GENERATOR
to the default configurations.

Change-Id: Iff0e5a7d144993bf1cc9967bcffff037333cdf30
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:14 -05:00
Juan Manuel Cruz
80ce28aebe Kconfig stop creating empty header files.
This commit fixes the issue of kbuild creating empty header files
at the include/config directory.

Linux Kconfig creates a header file for each Kconfig symbol that
changed in between build runs and re-configurations. This feature
is not needed in Zephyr.

Change-Id: I366183cef398b3ab7488456ddbed07f292c5a9bc
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:14 -05:00
Allan Stephens
d6db256249 Add missing #includes required to reference non-kernel APIs
Several files were not explicitly including APIs that they reference,
which could eventually lead to trouble.

Change-Id: Ib33cadfa658280df3fcb4c670463d41b63097b31
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:14 -05:00
Allan Stephens
a27910091a Avoid use of "ukernel" terminology in some sample projects
Gets rid of this non-standard terminology, and spells out
"microkernel" in full (when needed at all).

Change-Id: Ibfae84225fdceb526d8732bc23a0885f2d3be462
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:14 -05:00
Allan Stephens
e3108813cc Revise misleading instructions in sample project README.txt files
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>
2016-02-05 20:14:14 -05:00
Allan Stephens
a1bd59de35 Eliminate obsolete coding convention comments
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>
2016-02-05 20:14:14 -05:00
Allan Stephens
60f6a74efe Eliminate non-standard NULL definitions
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>
2016-02-05 20:14:14 -05:00
Allan Stephens
5a4be58707 Eliminate non-standard boolean type support
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>
2016-02-05 20:14:14 -05:00
Allan Stephens
4e74e65744 Delete obsolete file for testing secure string APIs
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>
2016-02-05 20:14:14 -05:00
Peter Mitsis
220f1a5b86 Statically initialize _k_command_stack
Helps streamline kernel initialization.

Change-Id: If18660eaa548e82f5487cd9fcd4e0cada0426ca0
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:14 -05:00