Commit graph

4744 commits

Author SHA1 Message Date
Andrew Boie df5cc172f4 gen_mmu.py: load directly
On most workstations this was unintentionally being run under Python 2.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-21 13:27:25 -04:00
Anas Nashif eb756c5d1a build: remove leftover qemu target
Fixes GH-1522

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-19 10:54:31 -04:00
Jukka Rissanen 0ff4c25958 build: Add rules in Makefile.gen to generate a hex file
This commit is useful if there is a need to generate a file
that can be included into the application at build time.
The file can also be compressed automatically when embedding it.

Files to be generated are listed in
     generate_inc_file
     generate_inc_gz_file
variables.

How to use this commit in your application:

1. Add this to your application Makefile

   SRC = $(ZEPHYR_BASE)/<your-app-dir>/src
   include $(ZEPHYR_BASE)/scripts/Makefile.gen

2. Add needed binary/other embedded files into src/Makefile
   to "generate_inc_file" or "generate_inc_gz_file" variables:

   # List of files that are used to generate a file that can be
   # included into .c file.
   generate_inc_file += \
           echo-apps-cert.der \
           echo-apps-key.der \
           file.bin

   generate_inc_gz_file += \
           index.html

   include $(ZEPHYR_BASE)/scripts/Makefile.gen

3. In the application, do something with the embedded file

   static const unsigned char inc_file[] = {
   #include "file.bin.inc"
   };

   static const unsigned char gz_inc_file[] = {
   #include "index.html.gz.inc"
   };

The generated files in ${SRC}/*.inc are automatically removed
when you do "make pristine"

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-09-18 14:56:16 -04:00
Kumar Gala aed577a853 scripts/dts/extract_dts_includes.py: allow multiple fixup files
Allow the script to take multiple -f (fixup) file options.  We output
the fixup files in order that the -f options are passed.  This will
allow us to have a common soc fixup and board fixup if we desire.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-09-17 17:34:38 -04:00
Aska Wu 729a7b1e84 scripts/dts/extract_dts_includes.py: Fix tab calculation
If there's any key in the alias which length is larger than other keys
in the node, the include file will be incorrect, there will be no tab
between the key and value.

We need to take into account the max length of alias keys.

Signed-off-by: Aska Wu <aska.wu@linaro.org>
2017-09-17 16:51:16 -04:00
Anas Nashif 541f791fad ci: compliance script should use python3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-12 19:01:58 -04:00
Anas Nashif bd166f4903 sanitycheck: save/load lists of filterd tests
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-12 18:13:46 -04:00
Anas Nashif 70783cab60 sanitycheck: rename arch_root -> board_root
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-12 18:13:46 -04:00
Andrew Boie 424e993b41 x86: implement userspace APIs
- _arch_user_mode_enter() implemented
- _arch_is_user_context() implemented
- _new_thread() will honor K_USER option if passed in
- System call triggering macros implemented
- _thread_entry_wrapper moved and now looks for the next function to
call in EDI

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-12 12:46:36 -07:00
Anas Nashif 1e8afbfe5a cleanup: remove lots of references to unified kernel
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-12 12:37:11 -04:00
Anas Nashif 83134d9531 scripts: move kconfig related scripts to scripts/kconfig
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-11 08:53:56 -07:00
Anas Nashif 9186b6801c scripts: move checkpatch scripts to checkpatch/
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-11 08:53:56 -07:00
Anas Nashif 38625607b1 scripts: move footprint scripts to footprint/
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-11 08:53:56 -07:00
Anas Nashif 3461c8cf59 scripts: move dts related scripts to scripts/dts/
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-11 08:53:56 -07:00
Anas Nashif db3d55ff1b sanitycheck: move all related files to sanity_chk
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-11 08:53:56 -07:00
Anas Nashif 63d418f0da scripts: move GRUB script to galileo
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-11 08:53:56 -07:00
Anas Nashif c2de83c32f misc: remove MAINTAINERS file
Remove MAINTAINERS in favor of CODEOWNERS file which is supported by
github. Also remove scripts using this file and change checkpatch to
reference CODEOWNERS instead.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-08 15:08:18 -04:00
Andrew Boie 54ffae7940 gen_mmu.py: Ignore 0-sized regions
Prevents overlapping region errors when enabling application memory
but there is nothing to put in application data.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-07 16:35:59 -07:00
Andrew Boie 945af95f42 kernel: introduce object validation mechanism
All system calls made from userspace which involve pointers to kernel
objects (including device drivers) will need to have those pointers
validated; userspace should never be able to crash the kernel by passing
it garbage.

The actual validation with _k_object_validate() will be in the system
call receiver code, which doesn't exist yet.

- CONFIG_USERSPACE introduced. We are somewhat far away from having an
  end-to-end implementation, but at least need a Kconfig symbol to
  guard the incoming code with. Formal documentation doesn't exist yet
  either, but will appear later down the road once the implementation is
  mostly finalized.

- In the memory region for RAM, the data section has been moved last,
  past bss and noinit. This ensures that inserting generated tables
  with addresses of kernel objects does not change the addresses of
  those objects (which would make the table invalid)

- The DWARF debug information in the generated ELF binary is parsed to
  fetch the locations of all kernel objects and pass this to gperf to
  create a perfect hash table of their memory addresses.

- The generated gperf code doesn't know that we are exclusively working
  with memory addresses and uses memory inefficently. A post-processing
  script process_gperf.py adjusts the generated code before it is
  compiled to work with pointer values directly and not strings
  containing them.

- _k_object_init() calls inserted into the init functions for the set of
  kernel object types we are going to support so far

Issue: ZEP-2187
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-07 16:33:33 -07:00
Andrew Boie 3ef0b56c15 sanitycheck: fix rw_sections whitespace
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-07 16:33:33 -07:00
Anas Nashif 7015b7e5ea release: sanitycheck: update footprint data
Reset the baseline for the new release. This is used by the sanitycheck.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-07 12:29:23 -05:00
Andy Gross ad704937ff scripts/extract_dts_includes.py: Allow for includes in common yaml files
This patch adds the capability to include yaml files in other yaml
files that reside in dts/common/yaml.

Fixes #1149

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-08-18 08:55:31 -05:00
Anas Nashif 593f6d4a1b boards: qemu_xtensa: this is not supported by xcc
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-16 13:05:54 -04:00
Anas Nashif e783179948 sanitycheck: add espressif as a supported toolchain
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-14 19:14:59 -04:00
Anas Nashif 6222418337 sanitycheck: fix RAM check
make this consistent with flash size check. This issue caused platforms
with 8k to be completelty ignored.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-14 13:28:42 -04:00
Anas Nashif c1cafb1f50 ci: run more tests on boards that have changed
Check if any board files have changed and build more tests with this
board to uncover any build regressions.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-14 13:28:42 -04:00
Maureen Helm 61c5c2382b scripts: Run JLinkGDBServer in silent mode
The JLinkGDBServer was printing log messages that messed with debugging
in -tui mode. Run it in silent mode instead.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-08-11 11:21:46 -04:00
Johan Hedberg 2975ca0754 Bluetooth: Kconfig: Rename CONFIG_BLUETOOTH_* to CONFIG_BT_*
The API name space for Bluetooth is bt_* and BT_* so it makes sense to
align the Kconfig name space with this. The additional benefit is that
this also makes the names shorter. It is also in line with what Linux
uses for Bluetooth Kconfig entries.

Some Bluetooth-related Networking Kconfig defines are renamed as well
in order to be consistent, such as NET_L2_BLUETOOTH.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-08-09 11:14:19 +03:00
Anas Nashif 87766a25c6 gitlint: ignore titles prefixed with Revert
The revert commit title is usually prefixed with "Revert" which causes
the title to become longer than the allowed limit. Allow such commits to
keep revert commits consistent with the original commit message.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-08 09:04:25 -04:00
Anas Nashif 408a61d42b gitlint: tolerate long lines with URLs
When including referecnes to external resources using a URL, keep the
line with URL in one line to not break the link and allow this to pass
the gitlint test.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-08 09:04:25 -04:00
Inaky Perez-Gonzalez 662dde6675 sanitycheck: validate YAML files w/ schemas files
This introduces an schema-based YAML validation process when loading
any YAML file, before doing any operations on them. An exception will
be raised at SanityConfigParser() if the file fails to verify with the
given schema.

Schemas are defined for the platform files in board///*.yaml and for
the (sample|testcase).yaml files. The verification is done using the
pykwalify python library. If not installed, a warning is printed and
the verification schema is skipped. At some point, we might want to
force it being installed.

The verification library is made a separate module (scl.py) so it can
be easily imported by others.

Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2017-08-07 21:19:12 -04:00
Sebastian Bøe d3409c5e67 doc: scripts: sanitycheck: s/ini/yaml/
AFAIK an ini file system was ported to a yaml file system. But some
ini file references still remain.

This patch changes all ini file mentions into yaml.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2017-08-07 12:58:49 -04:00
Anas Nashif 3ac7b3a229 doc: qemu target was deprecated, use 'run'
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-03 11:48:55 -04:00
Andrew Boie 0f16d98b32 x86: mmu: add runtime modification indicator
The CPU first checks the page directory entry for write
or user permissions on a particular page before looking
at the page table entry.

If a region configured all pages to be non user accessible,
and this was changed for a page within it to be accessible,
the PDE would not be updated and any access would still
return a page fault.

The least amount of runtime logic to deal with this is to
indicate at build time that some pages within a region may
be marked writable or user accessible at runtime, and to
pre-set the flags in the page directory entry accordingly.

The driving need for this is the region configuration for
kernel memory, which will have user permissions set at
runtime for stacks and user-configured memory domains.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-08-03 11:46:26 -04:00
Anas Nashif 9527693f2a sanitycheck: support feature classes for boards
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-02 07:31:22 -04:00
Andy Gross 6654f273e3 build: Fix distclean for gen_idt
This patch removes the gen_idt subdirectory from the clean target as
this directory is no longer in use due to recent changes to the way the
gen_idt is generated.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-08-01 22:10:22 -04:00
Anas Nashif 08ed56016d scripts: fix offset.h header guard
Using __hash__() is unpredictable and produces different results for
different python processes. This has been causing unnecessary rebuilds
due to changing header files at the top of the dependency tree.

Just use _GEN_OFFSETS_H_.

Jira: ZEP-2457
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-01 15:05:13 -04:00
Andrew Boie a0da632fad gen_gdt: properly set descriptor privilege level
The 'dpl' argument was unused, causing problems if the privilege
level was not 0.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-08-01 10:10:28 -07:00
Marti Bolivar 94bf92497d build: allow user to specify DTC_OVERLAY_FILE directly
In some cases, it's possible to share a DTC overlay across multiple
boards (one example is when the overlay just has to choose a
zephyr,code-partition and set it to a well-known value).

To support this, only go looking around in DTC_OVERLAY_DIR if
DTC_OVERLAY_FILE is not already given.

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-07-31 09:21:46 -05:00
Anas Nashif 31df3b27cc tests: run modified tests with full coverage
This addition would catch tests being added or modified and would run
those tests with --all and catch issues with non default board
configurations before they get merged into the tree.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-28 17:03:04 -04:00
Kumar Gala a19f6629bb scripts/extract_dts_includes.py: Fix typo in device name list
For CONFIG_UART_PIPE_ON_DEV_NAME the chosen property is
"zephyr,uart-pipe" not ""zephyr,bt-mon-uart".

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-07-26 11:37:06 -05:00
Kumar Gala b32b581a34 scripts/extract_dts_includes.py: Reduce code for handling chosen names
We have the same pattern for how we map a chosen property to the device
label that generates a Kconfig define.  Rather than duplicating the code
over and over again, lets just iterate over a list of defines and chosen
properties.  This also provides us a list we can use in the future to
special case handle the defines associated with names.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-07-26 11:21:21 -05:00
Punit Vara a4eaf6e80c scripts: Fix string pattern on byte like objects error
This patch fixes following error of python script.

TypeError: cannot use a string pattern on a bytes-like object

Jira: ZEP-2290

Signed-off-by: Punit Vara <punit.vara@intel.com>
2017-07-26 06:54:12 -04:00
Andrew Boie 3aecba10f7 scripts: add version check for pyelftools
Versions before 0.24 have string handling issues in Python 3.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-25 13:41:16 -04:00
Erwan Gouriou 9f374d9d9c script: extract_dts_includes: Add cell prefix to interrupt-names
Cell prefix was missing to interrupts-names generated defines

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-07-25 11:18:05 -05:00
Andrew Boie bc666ae7f7 x86: implement improved double-fault handler
We now create a special IA hardware task for handling
double faults. This has a known good stack so that if
the kernel tries to push stack data onto an unmapped page,
we don't triple-fault and reset the system.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-25 11:32:36 -04:00
Andrew Boie 08c291306e x86: generate RAM-based GDT dynamically
We will need this for stack memory protection scenarios
where a writable GDT with Task State Segment descriptors
will be used. The addresses of the TSS segments cannot be
put in the GDT via preprocessor magic due to architecture
requirments that the address be split up into different
fields in the segment descriptor.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-25 11:32:36 -04:00
Andrew Boie 8a102e44ed x86: allow IDT vectors to be task gates
This has one use-case: configuring the double-fault #DF
exception handler to do an IA task switch to a special
IA task with a known good stack, such that we can dump
diagnostic information and then panic.

Will be used for stack overflow detection in kernel mode,
as otherwise the CPU will triple-fault and reset.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-25 11:32:36 -04:00
Andrew Boie ddf9f4be31 x86: convert gen_idt to Python
This is one less host tool we have to compile for every build,
and makes the build tools more portable across host OSes.
The code is also much simpler to maintain.

Issue: ZEP-2063
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-25 11:32:36 -04:00
Leandro Pereira f5a8d498ea scripts: Convert gen_offset_header to Python
By having this as a Python script rather than a host executable, this
should simplify the build process on non-Unix platforms.

With this change, pyelftools is now required to build Zephyr.  Please
consult the getting started documentation for your host platform for
installation instructions.

Jira: ZEP-2062

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-07-24 11:20:04 -07:00
Anas Nashif 35a70b41dd doc: add python pip requirements.txt
List all required modules in one file and just call pip with this
file to install all needed modules instead of listing them
individually.

Added gitlint and pyocd and other required packages to the list.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-22 14:04:20 -04:00
Erwan Gouriou 7bace4c290 scripts: extract_dts_includes.py: Fixup for pinmux nodes
Current version of extract_dts_include.py assumes end subnode
of pinctrl is 'pin'. This fix allows having different names.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-07-20 11:52:44 -05:00
Erwan Gouriou 1d602b30ce scripts: extract_dts_includes.py: allow @ in node names
@ could be used in subnode names.
Convert is to '_' in post processing

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-07-20 11:52:44 -05:00
Erwan Gouriou cb78d8c816 scripts: extract_dts_includes.py: nodes without address def generation
def_label generation was assuming node names always have address
(eg: rcc@40023800). This was generating incorrect def_labels
when node names doen't have address (eg: pin-controller)
With this fix, this case is now taken into account

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-07-20 11:52:44 -05:00
Savinay Dharmappa c1e5cbfd41 devicetree: Generate BLUETOOTH_UART,UART_PIPE etc config from dt
patch uses chosen property zephyr,bt-uart, zephyr,uart-pipe
and zephyr,bt-mon-uart to determine the uart instance to be
used for bluetooth,uart_pipe and bluetooth_monitor and generate
appropriate configs.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-07-19 11:52:35 -04:00
Anas Nashif 7e61190d94 scripts: updated spelling.txt file
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-14 12:57:40 +03:00
Vinayak Kariappa Chettimada f16f88555f scripts: Fix size_report to use correct objdump and nm
Commands for objdump and nm where hardcoded in size_report
script, which failed on MacOS as it tried to use ones from
Xcode. Fixed the script to pick the right objdump and nm
from the toolchain being used to build the application.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-07-13 14:27:49 -05:00
Kumar Gala b8d7b4e0e1 scripts/extract_dts_includes: extract_reg_prop handle cells being 0
Its possible that #size-cells is 0 (ie i2c bus).  So we should handle
either #address-cells or #size-cells being 0 in extract_reg_prop.  This
means that the reg property in reduced map will end up being an integer,
so we need to convert it to a list with one element.  We also need to
not output any address-cell or size-cell related info if the respective
cell is 0.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-07-13 14:27:19 -05:00
Kumar Gala 65e72be8f7 devicetree: Generate CONFIG_UART_CONSOLE_ON_DEV_NAME from dt
We can use the chosen property "zephyr,console" to determine what uart
should be used as the console and find its name to generate a define for
CONFIG_UART_CONSOLE_ON_DEV_NAME.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-07-11 12:09:10 -05:00
Adithya Baglody c5ff761325 scripts: gen_mmu: Better verbose reporting and updated execution logic
Verbose output now prints the value of the raw data provided by
soc.c file. The page directories are printed with the correct
address ranges for each required region.

Updated the page table number calculation and also updated other
calculations which use this information.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2017-07-11 07:57:11 -07:00
Andrew Boie d5f523c1e6 gen_mmu.py: verbose mode dump MMU_LIST
It's useful to see what original memory regions were configured
in code via the MMU_BOOT_REGION() macros.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-10 11:44:56 -07:00
Andrew Boie 65a9d2a94a kernel: make K_.*_INITIALIZER private to kernel
Upcoming memory protection features will be placing some additional
constraints on kernel objects:

- They need to reside in memory owned by the kernel and not the
application
- Certain kernel object validation schemes will require some run-time
initialization of all kernel objects before they can be used.

Per Ben these initializer macros were never intended to be public. It is
not forbidden to use them, but doing so requires care: the memory being
initialized must reside in kernel space, and extra runtime
initialization steps may need to be peformed before they are fully
usable as kernel objects. In particular, kernel subsystems or drivers
whose objects are already in kernel memory may still need to use these
macros if they define kernel objects as members of a larger data
structure.

It is intended that application developers instead use the
K_<object>_DEFINE macros, which will automatically put the object in the
right memory and add them to a section which can be iterated over at
boot to complete initiailization.

There was no K_WORK_DEFINE() macro for creating struct k_work objects,
this is now added.

k_poll_event and k_poll_signal are intended to be instatiated from
application memory and have not been changed.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-10 11:44:56 -07:00
Kumar Gala 5141d526b3 sanitycheck: fix depends_on when multiple dependencies
If the depends_on has more than one item we need to match all of those
dependencies in the supported list.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-07-07 09:01:01 -05:00
Anas Nashif 25a8b88588 sanitycheck: fix supported/depends_on usage
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-05 12:43:13 -04:00
Adithya Baglody 5ffffb86bf scripts: gen_mmu: Rectified MMU page table generation.
The script failed on certain corner cases. Whenever the memory region
was falling on the PDE boundary, the glitch was causing incorrect
PTE to be generated.

JIRA: ZEP-2328

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2017-07-05 12:32:33 -04:00
Andy Gross 70e54f9ef7 scripts: extract_dts_includes.py: Adhere to PEP8
This patch PEP8-ifies the extract_dts_includes.py script

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-07-05 10:54:32 -05:00
Andy Gross 066edc7bac scripts: extract_dts_includes.py: Fix names generation
This patch fixes issues with the IRQ definitions when using
the interrupt-names property in the DT entry.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-07-04 10:06:20 -05:00
Andrew Boie d9c48563a1 check_link_map: fix check for app memory
This script was assuming that all XIP data copied sections
were contiguous. However with application memory partitioning
enabled, this is not the case; in between the kernel data sections
and the app data sections will be the kernel's BSS and noinit.

As a quick fix, reset the last section compared if we encounter
the kernel's BSS section.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-06-29 07:46:58 -04:00
Andrew Boie 8eed4b0309 sections.h: define application-level sections
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-06-29 07:46:58 -04:00
John Andersen 913e2cdb24 samples: net Documented QEMU_INSTANCE usage
Signed-off-by: John Andersen <john.s.andersen@intel.com>
2017-06-29 07:20:46 -04:00
John Andersen 06b92c6611 samples: net: Multiple instances of QEMU
Makefiles which start QEMU (make run) have been changed to operate
off of the QEMU_INSTANCE variable. QEMU_INSTANCE is simply appended
to the pid and sock file names. This makes us able to run multiple
QEMU Zephyr instances of the same sample.

Signed-off-by: John Andersen <john.s.andersen@intel.com>
2017-06-29 07:20:46 -04:00
Anas Nashif b17e1caf0a sanitycheck: add toolchain keyword to testcases
Some testcases can only be built with certain toolchains. Instead of
using filters, add support for toolchain keyword which enables
whitelisting and exclusion.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-28 09:51:40 -05:00
Kumar Gala 914d92e488 scripts/sanitycheck: split out log from config-sanitycheck
Put the results of the config-sanitycheck into their own log so we can
see warnings from that stage of the build.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-06-27 19:11:31 -04:00
Kumar Gala c5940fa673 scripts: pyocd.sh: Add support for passing board_id to pyocd commands
If we have more than one board of a given type we need to be able to
specify the board_id to select which specific board that the pyocd
command should target.  Introduce an environment variable PYOCD_BOARD_ID
to we can set that will get passed to the pyocd command that needs it.

Here's an example:

$ make -C samples/hello_world/ BOARD=frdm_k64f flash PYOCD_BOARD_ID=1234

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-06-23 15:05:10 -05:00
Kumar Gala 76be0a4c92 scripts: bossa-flash.sh: fix variable usage
We define a variable to pickup a default for the bossa binary, however
we weren't using it.  Lets do so now.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-06-23 15:05:10 -05:00
Anas Nashif 6b1c3e3f1b toolchains: add DTC to environment
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-23 13:10:52 -05:00
Anas Nashif bfab06bb52 sanitycheck: fix platform filtering
The build_on_all tag in synchronisation sample was resetting the
supplied arguemnt for filtering platforms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-22 09:48:48 -04:00
Anas Nashif cf21f5f10b sanitycheck: enhance toolchain filtering
Do not run filters on platforms not supported by toolchain.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-22 09:22:48 -04:00
Anas Nashif a792a3d410 sanitycheck: support testcases in yaml instead of ini
This commit changes the syntax of the testcase files and changes the
behaviour and configuration of the sanitycheck script.

To avoid having multiple files with different syntax for boards,
samples, tests; this change unifies the syntax and uses YAML instead of
INI.

We maintain the current keywords used in the old syntax and maintain the
flexibility of adding tests with different configuration by using YAML
list configuration. On top of that, the following features are added:

- We now scan for board configurations in the boards directory and look
for a YAML file describing a board and how it should be tested. This
eliminates the need for listing boards per architecture in a special ini
file under scripts/.

- We define hardware information charachterstics in the board YAML file
that helps identifying if a certain test should run on that board or
not. For example, we can specify the available RAM in the board and
filter tests that would require more RAM than the board can handle.

- Boards can be set as default for testing meaning that we always run a
test case (build and run of possible) when sanitycheck is called without
any arguments. Previously this was done only by selecting the first
board defined for a specific architecture.

- Tests can be configured to run on all possible boards, this is to make
sure we always build some basic tests for all boards to catch issues
with the core kernel features.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-21 20:56:53 -04:00
Leandro Pereira f0b4e174d7 esp32: Use esptool.py to flash with 'make flash'
This flashes Zephyr at 0x1000: that's where the first stage bootloader,
part of the ESP32 ROM, expects to find an "image header".

The second-stage bootloader, part of ESP-IDF, isn't used by the Zephyr
port.  However, the bootloader can be used if desired; please refer to
the ESP-IDF documentation on how to set up partitions tables and use
the bootloader.

The following environment variables will affect the ESP32 flashing
process:

  Variable              Default value
  ESP_DEVICE            /dev/ttyUSB0
  ESP_BAUD_RATE         921600
  ESP_FLASH_SIZE        detect
  ESP_FLASH_FREQ        40m
  ESP_FLASH_MODE        dio
  ESP_TOOL              espidf

It's impossible to determine which serial port the ESP32 board is
connected to, as it uses a generic RS232-USB converter.  The default of
/dev/ttyUSB0 is provided as that's often the assigned name on a Linux
machine without any other such converters.

The baud rate of 921600bps is recommended.  If experiencing issues when
flashing, try halving the value a few times (460800, 230400, 115200,
etc).  It might be necessary to change the flash frequency or the flash
mode; please refer to the esptool documentation for guidance on these
settings.

If ${ESP_TOOL} is set to "espidf", the esptool.py script found within
ESP-IDF will be used.  Otherwise, this variable is handled as a path to
the tool.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-06-21 12:35:49 -04:00
Leandro Pereira bb19e08cde Support for Espressif SDK (ESP32, etc)
Three environment variables must be set to use this variant:

   export ZEPHYR_GCC_VARIANT="espressif"
   export ESP_IDF_PATH=/path/to/esp-idf
   export ESPRESSIF_TOOLCHAIN_PATH=/path/to/xtensa-esp32-elf/

ESP-IDF is the SDK provided by Espressif.  It contains, among other things,
the HAL and header files for registers and ROM functions used by the Zephyr
port.  At this stage, with the exception of the HAL library, none of the
binary blobs provided by ESP-IDF are used.  This can be obtained directly
from Espressif, at <https://github.com/espressif/esp-idf>.

Instructions on how to obtain the toolchain are detailed in the README for
ESP-IDF.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-06-21 12:35:49 -04:00
David B. Kinder 29963c30d1 scripts: sanitycheck: more spelliing fixes
PR #515 got merged before I could submit some additional spelling
fixes.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-06-16 17:15:57 -04:00
Andy Gross 07b43e352c scripts: extract_dts_includes.py: Correct LOAD_OFFSET
This patch fixes the LOAD_OFFSET calculation to use the actual offset
of the partition.  This assumes the reg entry in the DTS for that
partition is in relative offset to the flash base address.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-06-16 13:15:32 -05:00
Johan Hedberg 9703927f84 net: buf: Move net_buf_pool objects to dedicated linker area
Moving the net_buf_pool objects to a dedicated area lets us access
them by array offset into this area instead of directly by pointer.
This helps reduce the size of net_buf objects by 4 bytes.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-06-16 17:05:06 +03:00
Paul Sokolovsky ff70add7ab scripts: sanitycheck: Clean up help text.
Fixes a typo, punctuation, and a bit of old info about test paths.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-06-15 23:04:12 -04:00
Andy Gross 25309ab51a scripts: sanitycheck: Switch config target
This patch changes the config target to use the config-sanitycheck
target.  The config-sanitycheck target gets not only the Kconfig
options, but also the DTS generated options.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-06-15 16:14:59 -05:00
Erwin Rol 0c4ba8f7d2 boards: arm: olimex_stm32_e407: Initial Olimex STM32-E407 BSP
- board name olimex_stm32_e407
- CPU STM32F407ZGT6 Cortex M4
- LED/BUTTON support
- Console on USART1 with 8n1 115200 baud

Signed-off-by: Erwin Rol <erwin@erwinrol.com>
2017-06-15 15:07:46 -05:00
Adithya Baglody a407739ef4 scripts: x86: MMU: Script to generate page tables
Generates the MMU page tables. This creates a binary output for
the page tables. It takes an binary input which represents the
configuration information needed to generate the page tables.

JIRA:ZEP-2096

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2017-06-13 11:36:54 -04:00
Andrew Boie 65e5401502 xtensa: fix 'make debug' for xt-sim targets
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-06-12 18:01:13 -04:00
Anas Nashif 2f117af6c5 scripts: make check_compliance scripts take arguments
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-10 10:44:33 -04:00
Anas Nashif 1fc69dd4db ci: merge xml reports into one single file
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-10 10:44:33 -04:00
Anas Nashif c363a0d000 ci: compliance: add missing classname and enhanced description
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-10 10:44:33 -04:00
Punit Vara 2f28bf538c scripts: convert helper scripts to python3
This patch ports helper scripts from python2 to python3
with following changes:

- print should be used with () in python3
- resolved bytes-like object is required, not 'str'
- added python3 header

ZEP-2054

Signed-off-by: punit vara <punit.vara@intel.com>
2017-06-09 18:52:03 -04:00
Andy Gross fa4a39322e scripts: extract_dts_includes.py: Correct LOAD_OFFSET
This patch fixes a bug with the computation of the FLASH_LOAD_OFFSET
option that is derived as part of the DTS parsing.  Offset should be
the relative offset from the base of flash.  If the flash base address
and selected partition are the same, the offset should be 0.

JIRA: ZEP-2260

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-06-09 14:54:02 -05:00
Kumar Gala 817a043fc8 toolchain.gccarmemb: Fix support for where to find newlib
When we build with newlib enabled and utilizing one of the other
variants (like having floating point enabled) we need to have the proper
library path setup to find the library.  This is mimicked after what we
do in Makefile.toolchain.zephyr for newlib.

Issue: ZEP-2240

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-06-08 14:52:49 -04:00
Andy Gross 69255043e7 dts/extract_dts_includes.py: Add partition support
This patch adds parsing support for flash partitions.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-06-08 07:37:44 -05:00
Andrew Boie 5b22d6fab3 Makefile.toolchain.zephyr: fix C++ on Xtensa
Need to set CXXFLAGS just like we did CFLAGS.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-06-06 20:37:11 -04:00
Anas Nashif b520075788 gitlint: Ignore signed-off-by line
When checking for line length limits, ignore lines with Signed-off-by.
Some developers have a long name that would not fit within the limits.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-06 09:35:50 -04:00
fallrisk 106bf1c09a arm: board: Add support for board Atmel SAM4S Xplained.
This commit provides support for Atmel SAM4S Xplained board

Signed-off-by: Justin Watson <jwatson5@gmail.com>
2017-06-02 14:11:13 -04:00
Florian Vaussard 13cba0bb76 stm32f4: Add STM32F412 Nucleo board
Add necessary board files, pinmux and device tree in order to have a
usable debug console.

Origin: Original

Change-Id: I43a9d278c3f2c936a714263626722f630367b663
Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
2017-06-02 14:11:13 -04:00
Carles Cufi 5dec78bb50 build: Fix DTC overlay file paths on MSYS2
On MSYS2, the #include paths for GCC need to be in native format
(Windows-style paths) since GCC is a native Windows application and
therefore requires standard paths.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-05-31 14:57:33 -04:00
Anas Nashif b60ff2f840 dts: generate definitions for build system
This will generate an additional file that can be sourced by the build
system to expose definitions generated by device tree and used for
flashing and debugging targets.

Change-Id: I184e247f0a8dbd1a4a42dd4b02ea01f2caa70533
Jira: ZEP-2119
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-31 14:56:57 -04:00
Anas Nashif 6b081415d3 dts: make extract script take options
Use argeparse for options and add a fixup option to add on top of
generated file. This was previously done in the top Makefile and was
generated defines outside of the header main if statement.

Jira: ZEP-2147

Change-Id: If65f34a11de27baa770d4ce0ef4fca2abbd30258
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-31 14:56:57 -04:00
Anas Nashif bf4d07024a xtools: add new configurations for xtools 1.23
Remove arm.config, we should be using the official ARM cross compiler
instead.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-31 14:54:34 -04:00
Andrew Boie 113015b64c gccarmemb: don't assume 'dtc' is in /usr/bin
Just search for it in the system PATH.

Issue: ZEP-2211
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-05-30 19:01:55 -04:00
Anas Nashif 61dbb5058e Revert "xtools: get rid of warnings about wrong path"
This reverts commit 96def63f10.

This breaks building with xtools for some reason, removing for now while
we figure out what went wrong.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-29 16:20:15 -04:00
David Brown 7a8380a81d dts: Allow override of dts overlay directory
Instead of requiring the dts overlay files to be at the top level
directory (where make is invoked), allow this default to be overridden
by setting DTS_OVERLAY_DIR.  This is a directory where the overlays
themselves (which are still named $(BOARD_NAME).overlay) will live.

Change-Id: Ie9796afbd27971650b7636a36149c0d1f8e2b9fb
Signed-off-by: David Brown <david.brown@linaro.org>
2017-05-27 10:15:48 -04:00
Andy Gross cb16f5ab9f scripts: Makefile.lib: Add dependency for DTS overlay
This patch adds a dependency for the DTS overlay so that the DTS is
compiled when the state of the overlay file changes.

Change-Id: I2affe67f90f56b1d97384d5cd4e3026abed24253
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-05-27 10:15:48 -04:00
Johan Hedberg 9516d63836 Bluetooth: Remove support for NBLE
NBLE has been deprecated for a few releases now and can be removed.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-05-25 09:03:16 -07:00
Anas Nashif 8e986c6b8c toolchain: require SDK 0.9.1
The 0.9.1 SDK is now required to cover all architectures and to enable
tests on all plartforms supported.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-20 09:35:51 -04:00
Anas Nashif 051b4b7686 xtensa: add to sanitycheck
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-20 07:04:33 -04:00
Anas Nashif 3c27c46562 gitlint: check for subsystem in commit subject
Check that we have <subsystem>: <subject> in commit messages.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-19 20:04:08 -04:00
Anas Nashif 96def63f10 xtools: get rid of warnings about wrong path
Eliminate following errors:

make[2]: /home/nashif/Work/sdk/xtools/outdir/x-tools//bin/-gcc: Command
not found
make[2]: /home/nashif/Work/sdk/xtools/outdir/x-tools//bin/-gcc: Command
not found
make[2]: /home/nashif/Work/sdk/xtools/outdir/x-tools//bin/-gcc: Command
not found

Also, usage of CROSS_COMPILE with a predefined toolchain is not required and
complicates things, just call CROSS_COMPILE with the full path if you
want to build with a toolchain not supported with Zephyr.

Change-Id: I93ec4ff2e04d22cee82c8e4b74b652927572b30a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-19 18:38:27 -04:00
Neil Armstrong 4a6ba84f67 boards: arm: Add support for STM32F469I-DISCO
Add board configuration, dts and pinmux based on the stm32f4_disco
board.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-05-19 10:06:48 -04:00
Kumar Gala 21ef8a6acc dts/extract_dts_includes.py: Quote strings values
If the value of the property is a string quote it on output.  This lets
us use things like label properties that will have values of strings.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-05-19 10:06:48 -04:00
Kumar Gala fc2130a3a4 arm: Fixup sanity check list of boards
The stm32f4discovery was incorrectly named and should have been
stm32f4_disco.  Also added 96b_carbon_nrf51 that was missing from the
list.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-05-19 10:06:48 -04:00
Neil Armstrong 84441b2ee4 arm: Add support for STM32F4DISCOVERY Board
Add configuration, documentation, flash script, pinmux and dts for the
STM32F4DISCOVERY board.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-05-19 10:06:48 -04:00
Neil Armstrong b729b478ec boards: arm: Add support for STM32L496G Discovery board
Add configuration, pinmux, dts and documentation for the STM32L496G
Discovery board based on the STM32L496AG SoC.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-05-19 10:06:48 -04:00
Huaqi Fang 9bc69a46fa boards: Update arc em_starterkit support from 2.2 to 2.3
Here are the main changes:
* board: Update EMSK onboard resources such as Button, Switch and LEDs
  + update soc.h for em7d, em9d, em11d
  + update board.h for em_starterkit board
* arc: Add floating point support and code density support
  + add kconfig configuration
  + add compiler options
  + add register definitions, marcos, assembly codes
  + fixes in existing codes and configurations.
* arc: Update detailed board configurations for cores of emsk 2.3
* script: Provide arc_debugger.sh for debugging em_starterkit board
  + make BOARD=em_starterkit debug
    This will start openocd server for emsk, and arc gdb will connect
    to this debug server, user can run `continue` command if user just
    want to run the application, or other commands if debugging needed.
  + make BOARD=em_starterkit debugserver
    This will start an openocd debugger server for emsk, and user can
    connect to this debugserver using arc gdb and do what they want to.
  + make BOARD=em_starterkit flash
    This will download the zephyr application elf file to emsk,
    and run it.

Signed-off-by: Huaqi Fang <huaqi.fang@synopsys.com>
2017-05-19 15:58:41 +02:00
Andrew Boie 4f69bdaa0d sanitycheck: build more Xtensa SOCs
Now that we can specify what toolchain is intended for each
SOC, enable some more SOCs to be built.

A full sanitycheck run will require the installation of both
RF-2016.4 and RG-2016.4 releases.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-05-18 07:18:36 -04:00
Andrew Boie de61aa1560 Makefile.toolchain.xcc: support multiple builds
XTENSA_TOOLS_PATH and XTENSA_BUILDS_PATH have been retired.

XTENSA_SDK is now the base directory for the Xtensa SDK. The build
systems will search for toolchains in there, using
CONFIG_TOOLCHAIN_VARIANT to locate the right one. It defaults to
/opt/xtensa.

XTENSA_BUILD_PATHS is now a list of additional directories to search
for Xtensa CPU builds. By default the build system will already search
the builds included in the SDK; this is intended for vendor-supplied
CPU build definitions.

Some whitespace changes made for readability and comments added.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-05-18 07:18:36 -04:00
Andrew Boie 074b806f07 Kbuild.include: add function for unquoting strings
Useful for extracting values from CONFIG_* variables which are always
quoted.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-05-18 07:18:36 -04:00
Andrew Boie 12379d17c1 xtensa: run simulator in turbo mode
This greatly increases the speed in which test cases are evaluated
on the Xtensa simulator.

The cycle limit parameter was removed, we don't currently need it
since sanitycheck handles killing test cases if they time out.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-05-17 12:04:10 -04:00
Anas Nashif e6fcc0105e sanitycheck: remove color output from xml
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-17 09:10:42 -05:00
Anas Nashif 0605fa33ea sanitycheck: junit: add total duration of run
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-15 15:54:50 -04:00
Anas Nashif 202d1308ae sanitycheck: add classname to testcase
classname seems to be expected by some parsers, so use it in the report,
the name now has the same value, we can add some more information once
we have meaningful metadata for the testcases with more details.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-15 15:54:50 -04:00
Anas Nashif 035799fe45 sanitycheck: add subsets support
This new options makes it possible to only run a subset of the tests
which will allow us to run sanitycheck on multiple hosts and merge the
results into one report. This way we do not need to worry about
selecting specific architectures to be run on a certain host.

The option accepts a string value: x/y where x is the subset and y is
the total, so if we specify --subset 1/5, we will only run the first
fifth of the total tests, --subset 5/5 would only select the last fifth.

To get consistent results, the testcase instance list is now ordered,
to avoid duplications and have full coverage.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-15 15:54:50 -04:00
Florian Vaussard 614db02cc6 stm32f4: Add STM32F413 Nucleo board
Add necessary board files, pinmux and device tree in order to have a
usable debug console.

Origin: Original

Change-Id: I280320700352fd36a544c03f4e57d2eeec2449e5
Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
2017-05-15 13:22:54 -04:00
Maureen Helm f49e199c27 scripts: Add flash and debug support using pyOCD on NXP boards
Adds a new debug support script using pyOCD and configures most NXP
boards so they can use it. frdm_kw41z is the one exception because pyOCD
doesn't yet support kw41z. Tested with pyOCD v0.8.0 and the latest
DAPLink firmware for each board.

Introduces two new environment variables, PYOCD_FLASHTOOL and
PYOCD_GDBSERVER, that allow you to set custom paths to the pyOCD tools.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-05-15 13:22:54 -04:00
Maureen Helm c16ad344e9 scripts: Add support for 'make debug' using Segger JLink on NXP boards
Adds a new debug support script using Segger JLink and configures all
NXP boards so they can use it. Tested with Segger JLink GDB server
V6.14b and OpenSDA v2.1 firmware.

Change-Id: Ia1b297d9c93d21db61379e22f27ae54cda3ad461
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-05-15 13:22:54 -04:00
Anas Nashif 7708ff8bf6 emulation: fix path of ELF binary when running with xt-sim
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-11 16:51:56 -04:00
Max Filippov 4b8419e420 xtensa: drop references to C library
C library is not actually used by the xtensa port, we only need the
'exit' function. Implement 'exit' in crt1-* and drop remaining
references to the C library.

Change-Id: I8a562363956b4755a6b5baee7acf3726485e5ce3
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2017-05-11 16:51:56 -04:00
Max Filippov a4f7e562ef Makefile.toolchain.zephyr: fix xtensa support
Building zephyr for xtensa with gcc requires additional include paths and
additional library (libhal).

Add xtensa sysroot and include paths to CFLAGS when building for xtensa.
The root Makefile then does the right thing adding these parameters to
KBUILD_CFLAGS and KBUILD_ASFLAGS.

Add xtensa libhal to the TOOLCHAIN_LIBS_xtensa. Modify TOOLICHAIN_LIBS to
include arch-specific libraries.

Seems that it would be nice to have TOOLCHAIN_CFLAGS_$(ARCH) with the
same behavior as TOOLCHAIN_LIBS_$(ARCH). It also seems that the SYSROOT
definition doesn't have to be restricted to MAKEFILE_TOOLCHAIN_DO_PASS2.

Change-Id: Ia6703ca067b964ac2f8be8fe8513ca28f101a6a3
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2017-05-11 16:51:56 -04:00
Andrew Boie 18c949c9c9 xtensa: remove xt-sim_XRC_D2PM
This core configuration was removed from the tree since it cannot
implement irq_offload().

Remove an orphaned block in xtesna.ini.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-05-11 12:47:23 -04:00
Neil Armstrong 6256c99703 boards: arm: Add support for Nucleo L432KC
Add configuration, dts and documentation for the Nucleo L432KC board
based on the STM32L432KC SoC.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-05-08 15:03:15 -04:00
Anas Nashif e930a41842 build: honor V=1 when flashing via DFU
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-08 09:15:09 -04:00
Anas Nashif 1338f49206 gitlint: verify full name in signed-off-by line
Make sure we get full name in the commit message and not the username or
some incomplete data that we need to decipher. We still need to verify
the commiter name that is not part of the commit message body, but this
is out of scope of gitlint.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-05 16:11:11 -05:00
Anas Nashif a1c74b74d2 ci: update path to theme repo
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-03 15:36:03 -04:00
Anas Nashif ed6eba7f4f CI: show commit range in log
Also print range in the test report.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-03 12:27:10 -05:00
Anas Nashif accc8eb6f5 sanitycheck: include qemu log when failure is not a build issue
When tests run in Qemu fail, we want to see the log from Qemu, not the
successful build log.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-01 17:48:24 -04:00
Anas Nashif 0de394d313 MAINTAINERS: replace git pointer to github
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-30 20:10:07 -04:00
Anas Nashif 3a212f8875 ci: add documntation checking and posting to AWS S3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-30 11:40:26 -04:00
Erwan Gouriou 2e20577554 board: Add support for board disco_l475_iot1
This commit provides support for disco_l475_iot1 board
Pinmux driver is provided with initial support definitions

Change-Id: I17b637a8ba0b033014969eca8fffe76319c47c52
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-04-28 15:26:39 -05:00
Gustavo Denardin 94abb1f7fb arm: Support for new ARM board FRDM-KL25Z
In order to allow the use of such board, a very preliminar port was
developed. It consists of board files, as well as pinmux, uart, gpio,
spi drivers and device tree files.

Change-Id: I5753064e39e0b023cf4481744c176de26d8dbebb
Signed-off-by: Gustavo Denardin <gustavo.denardin@gmail.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-28 15:26:38 -05:00
Gil Pitney 70040f0e11 boards: Add support for the CC3220SF_LAUNCHXL board
CC3220SF_LAUNCHXL effectively replaces the CC3200_LAUNCHXL,
with support for the CC3220SF SoC, which is an update for
the CC3200 SoC.

This is supported by the Texas Instruments CC3220 SDK.

Jira: ZEP-1958

Change-Id: I2484d3ee87b7f909c783597d95128f2b45db36f2
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2017-04-28 15:06:41 -05:00
Anas Nashif da871298b4 checkpatch: per coding style, we do not allow c++ style comments
Change-Id: I933f317f2117917bf6413fa0514342f6df4c1e90
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-28 13:03:33 +00:00
Anas Nashif acedb70a94 ci: add CI/CD integration and related scripts
Add initial .shippable.yml for CI integration on github and related
scripts.

Change-Id: I095d125e780bba980e635e218205c8741e753a8e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-27 20:58:14 -04:00
Daniel Thompson 955ba73024 scripts: openocd.sh: Honour V=1
Currently running "make V=1 flash/debug" does not result in the caller
discovering what commands are run to perform the action because make
calls into an opaque script (which then makes complex invokations of
both openocd and gdb). Make the script more transparent by conditionally
enabling enabling tracing within the script.

We also remove the "Done flashing" message. It is pointless because
openocd has already *told* us it has done flashing ["wrote 16384 bytes
from file .../zephyr.elf in 0.802135s (19.947 KiB/s)"]. It is also
potentially misleading since it tells us we are "Done flashing" even
when we failed to flash anything which risks misleading someone
unfamiliar with openocd.

Change-Id: Icaea28c4b00ac10965726dd4502162b7de080953
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
2017-04-27 13:01:08 +00:00
Anas Nashif b3311edff6 sanitycheck: support xunit report
Generate a test report using junit/xunit format with all details and
logs that can be published on the web to show results from a sanitycheck
run.

Output is stored in scripts/sanity_chk/ alongside the CSV file.

Change-Id: I5ea6f409c1f86f408eeae870b90a953e71046da9
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-26 21:37:33 -04:00
Anas Nashif a35378e494 scripts: add gitlint to check for validity of commit messages
Install gitlint using pip:

 # pip install gitlint
 # gitlint install-hook

This will install the pre-commit hook.

Policies are define in .gitlint. Custom rules are available under
scripts/gitlint.

This script will also run in CI, so avoid CI errors by using the hook
above.

Change-Id: I62750a1fd9369341db29c413a6c4a1677bb0db8a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-25 22:48:24 +00:00
Anas Nashif 19ee5efa61 build: support building host tools
To speed up builds, this change allows building the needed host tools
that are built for every application and stores them un
${ZEPHYR_BASE}/bin.

Run 'make host-tools' and then define PREBUILT_HOST_TOOLS to reuse the
host tools across multiple builds.

$ make host-tools
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/gen_idt/version.o
  HOSTCC  scripts/gen_idt/gen_idt.o
  HOSTLD  scripts/gen_idt/gen_idt
  HOSTCC  scripts/gen_offset_header/gen_offset_header.o
  HOSTLD  scripts/gen_offset_header/gen_offset_header
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf

$ export PREBUILT_HOST_TOOLS=${ZEPHYR_BASE}/bin

$ make -C samples/hello_world

Now you will notice a speedup when building the application!

Change-Id: Ie0aeee7f9a60b1fd49e7e32d78601f03473d73b8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-25 22:48:23 +00:00
Kumar Gala a48e8790d3 checkpatch: update checkpatch to warn about C99 type usage
Only in rare cases should we allow C99 types, so lets warn about it to
catch issues.

Change-Id: I2bacdd4ba98f88482e0b7acc0567ff1139e749bf
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-21 17:24:04 +00:00
Kumar Gala 789081673f Introduce new sized integer typedefs
This is a start to move away from the C99 {u}int{8,16,32,64}_t types to
Zephyr defined u{8,16,32,64}_t and s{8,16,32,64}_t.  This allows Zephyr
to define the sized types in a consistent manor across all the
architectures we support and not conflict with what various compilers
and libc might do with regards to the C99 types.

We introduce <zephyr/types.h> as part of this and have it include
<stdint.h> for now until we transition all the code away from the C99
types.

We go with u{8,16,32,64}_t and s{8,16,32,64}_t as there are some
existing variables defined u8 & u16 as well as to be consistent with
Zephyr naming conventions.

Jira: ZEP-2051

Change-Id: I451fed0623b029d65866622e478225dfab2c0ca8
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-20 16:07:08 +00:00
Anas Nashif 45a7e5d076 kernel: remove legacy.h and MDEF support
Change-Id: I953797f6965354c5b599f4ad91d63901401d2632
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-19 10:59:35 -05:00
Andrew Boie c09b4b84fc sanitycheck: catch ValueErrors when evaulating expressions
Change-Id: Iae4eb0b242427b98dd6515676c024f307446e49d
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-04-18 20:51:48 +00:00
Andrew Boie 31e772de20 expr_parser: fix issue with hex values in environment
Hex mumeric values directly in the expression were cast correctly
via the t_HEX rule, but ValueErrors would occur if a hex value was
looked up due to the expansion of some environment symbol.

Change-Id: Ia98dfea91eff4ed95778922d38d2967284f4e31b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-04-18 20:51:26 +00:00
Maureen Helm 14ca99af1e sanitycheck: Add hexiwear_kw40z
Jira: ZEP-1391
Change-Id: I32d0acfc03c57b305667746e9d8315100dec6833
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-04-14 05:56:53 -05:00
Kumar Gala 653d2695a7 sanitcheck: add nrf52_blenano2
Change-Id: Ia4f65b027c75d696ae172569e52fc74eb307f715
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-14 05:56:53 -05:00
Anas Nashif ed3d7c1de5 build: make sure we are calling python3 in all scripts
Jira: ZEP-1759
Change-Id: I0fc7329f806ca0049c555d3402dd145e92e54028
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-13 20:22:54 +00:00
Andrew Boie 6e1ff792fc sanitycheck: remove hifi_mini from arch config
Change-Id: I24eca1d3f95a4941e5efe1bfbc4905c38d7cb253
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-04-13 11:54:49 -07:00
Kumar Gala 46e4755d63 Revert "Revert "scripts: devicetree: Handle mixed case node names""
Yes, revert the revert, was a little too quick to apply this.  The fix
is to cleanup the dtsi file in question.

This reverts commit 6702686976.

Change-Id: I933fad9d96ec6375eda33f0b012349f1c39e261f
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-13 15:02:13 +00:00
Andrew Boie 6922a22c28 xtensa: add simulator targets for more SOCs
Change-Id: Ibceaf01ed71783c597b030bcc5778da6a03e5699
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-04-13 12:42:07 +00:00
Andrew Boie 11ee791b32 xtensa: build similar to other Zephyr arches
* CONFIG_SOC is now properly set and we do not need a separate
  XTENSA_CORE build variable

* Some unnecessary macro -D CFLAGS in the Xtensa Makefile removed

* There is no default SOC selection, it is now done explicitly in
  the board's defconfig

* CONFIG_<board name> now renamed to CONFIG_SOC_<board name in
  uppercase> to conform to established style.

Issue: ZEP-1711
Change-Id: I88997530db09970b7fdd1c3e3d355bfca9d0be1a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-04-13 12:42:06 +00:00
Anas Nashif 6702686976 Revert "scripts: devicetree: Handle mixed case node names"
This reverts commit 1c06065941.
Breaks cc3200_launchxl really bad:

 CC      drivers/serial/uart_cc32xx.o
/projects/zephyr4/drivers/serial/uart_cc32xx.c:39:18: error: ‘TI_CC32XX_UART_4000C000_BASE_ADDRESS’ undeclared here (not in a function)
  .base = (void *)TI_CC32XX_UART_4000C000_BASE_ADDRESS,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/projects/zephyr4/drivers/serial/uart_cc32xx.c: In function ‘uart_cc32xx_init’:
/projects/zephyr4/drivers/serial/uart_cc32xx.c:65:5: error: ‘TI_CC32XX_UART_4000C000_BAUD_RATE’ undeclared (first use in this function)
     TI_CC32XX_UART_4000C000_BAUD_RATE,
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Change-Id: If46c239bc8d6b4296494f638e900f6044a92ce26
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-12 22:07:36 +00:00
Andy Gross 1c06065941 scripts: devicetree: Handle mixed case node names
This patch fixes an issue with mixed case node names.  Node names
containing upper case letters were causing key match errors during
post processing.  This patch maintains the case of the node names.

Change-Id: I153a186fa09dcf958c9de55b578dbc63e615a076
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-04-12 19:44:12 +00:00
Andrew Boie c92c7ee8f9 sanitycheck: add arduino_101_mcuboot
Change-Id: I70613baefd96e71dd548273927b049139f1bbe25
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-04-12 16:31:47 +00:00
Andrew Boie 06dc2f203f xtensa: fix CONFIG_DEBUG build
A patch moved the specification of debug flags to a
KBUILD_CFLAGS_OPTIMIZE, but this Makefile wasn't updated.

Change-Id: Ic0d23f95609798473298cda4c044981edabb3ed5
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-04-12 16:31:45 +00:00
Mazen NEIFER 6683f13c94 sanitycheck: Let waitpid script kill Xtensa ISS if user hits ctrl+c.
Change-Id: I4a623e55c7e69258d58b2116bd7645d1e83ed274
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
2017-04-11 16:53:41 +00:00
Patrice Buriez 49a8de7ae3 build: use -O2 instead of -Os for ARC with SDK 0.9
This is intended as a temporary fix for ZEP-1882.
Investigation for this bug has shown that the current SDK 0.9 compiler
for ARC generates incorrect code under -Os optimization level.

Kuo-Lang Tseng found out that SDK 0.8.2 does not have this issue, and
that lowering optimization level to -O2 fixes the issue with SDK 0.9.
Juro Bystricky is working on an updated SDK with ARC GCC 6.3.0, but
there are still problems with it, so he also suggested to use -O2 in
the meantime.

Instead of blindly setting -O2 for all toolchains and architectures,
let Makefile.toolchain.zephyr make the decision for ARC and 0.9 only.
Tested with hello_world, CONFIG_ADC=y and BOARD=arduino_101_sss.

Jira: ZEP-1882
Change-Id: Ifde2e3950c9d93eed8982149805acfda9d13a94f
Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
2017-04-09 14:57:50 +00:00
Patrice Buriez fd8c59b996 scripts/dfuutil: support both "alternate setting" name and number
Initial assumption with Arduino 101 was that the "alternate setting
name of the DFU interface" would be simple enough to be used as the
grep pattern when attempting to find the board in DFU mode.
However, for boards such as the 96Boards Carbon, this name includes
grep meta-characters, so the DFUUTIL_ALT environment variable is
provided as a numeric value, instead of the previously expected name
string.
In order to avoid false positives, we now check whether DFUUTIL_ALT
is a numeric value, and the grep pattern is adjusted accordingly to
search for either "alt=" or "name=".
Also take into account that the name might contain spaces.

Change-Id: I81351d03bd727b35093fd1280e2b8b6904f3c89b
Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
2017-04-09 14:57:36 +00:00
Andy Gross 2fb6dce2a1 dts: Add application overlay support.
This patch adds DTS application overlay support.  Applications
requiring specific device features can specify these using
board dtsi files located in the application directory.  These overlay
files are board specific.

Issue: ZEP-1745

Change-Id: I1c5f1a8a198fe543b6d52ee8c1fb31a2038a7956
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-04-06 09:19:28 +00:00
Kumar Gala a0fbc88c1a arm: dts: Move common arm includes into a dts system include
Introduce a system include so that board dts files are able to live in
any location and properly include the things they need.

Change-Id: Icd26433117a4ca9726aeb74eec9f72c6d9df617c
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-04 17:55:13 -05:00
Piotr Mienkowski ce6ad70c06 scripts: openocd.sh: align usage of OPENOCD_*_CMD variables
OPENOCD_PRE_CMD, OPENOCD_POST_CMD variables require adding
'-c' in front of an actual OpenOCD command. This is in contrary
to other OPENOCD_*_CMD varialbles which specify OpenOCD commands
directly. This patch aligns usage of various OPENOCD_*_CMD variables.
It is no longer required to add '-c' in front of OPENOCD_PRE_CMD,
OPENOCD_POST_CMD variables.

Change-Id: I276fab00b099694c83c3bf74aa5dd59c8d6a308b
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2017-04-01 12:21:36 +00:00
Kumar Gala 023f2ce94d dts/extract_dts_includes.py: Fix IRQ define name creation
We were missing the cell name in how we create the IRQ define.  This was
working fine because the only name we had been using with IRQ which we
would shorten down.

Change-Id: I8449c8ced1a9284982d3d5b07c6acdcf26e965e2
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-03-27 18:26:22 +00:00
Ricardo Salveti 4f92c18ebf scripts/dfuutil: add support for DfuSe devices
Add DFUUTIL_DFUSE_ADDR to the list of dfu-util environment variables,
which can be used to flash DfuSe devices (e.g. STM32 based MCUs).

Change-Id: I39fdc338f7f034376ce50b648b06f39fee3169a7
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
2017-03-22 20:59:07 -03:00
Michał Kruszewski 46a00d4b7c scripts:nrf: Add 'make flash' for nrf boards.
Tested on nrf52_pca10040 and nrf51_pca10028 using hello_world sample.

Change-Id: I7cdf1d21e7f8232da737a06e5afbfb1eaec05cde
Signed-off-by: Michał Kruszewski <mkru1992@gmail.com>
2017-03-20 13:44:58 +00:00
Piotr Mienkowski b6480cd5ae flash: openocd: make 'make flash' target work without Zephyr SDK
At present 'make flash' target for boards that support flashing with
OpenOCD works only with Zephyr SDK. This patch enables flashing
without Zephyr SDK as long as openocd itself is installed.

Change-Id: I4594d795225e54b7638839d590e4c0620f9ca88c
Jira: ZEP-1893
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2017-03-19 20:22:22 +00:00
Kumar Gala efc68b4faf dts/extract_dts_includes.py: Replace cell_prefix to cell_string
Only the IRQ prasing was using cell_prefix and cell_string does the same
thing so lets just use that everywhere.

Change-Id: I2ef9b1e2c1baef54b71d811c835b29a9ca8fe81b
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-03-16 22:16:24 +00:00
Patrice Buriez 82188ed651 scripts: add support script for 'make flash' over DFU
Flashing the Arduino 101 board over DFU can be tricky: the
dfu-util command line is cumbersome, and the reset button
must be pressed at the right time.

This script brings the convenience of 'make flash' for the
Arduino 101 board and for other boards that support the DFU
protocol. It checks whether the board is in DFU mode, and
prompts the user to reset it when needed.

The dfu-util command line is constructed from the following
environment variables, to be exported from the Makefile:
- DFUUTIL: path to the dfu-util executable, default: dfu-util
- DFUUTIL_PID: vendor_ID:product_ID of the board in DFU mode
- DFUUTIL_ALT: alternate setting name of the DFU interface
- DFUUTIL_IMG: path to the binary image sent to the board

Change-Id: Ia9577ec96102a92d4c60481f980f30f4f6e7cd9e
Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
2017-03-14 23:38:13 +00:00
Paul Sokolovsky cb2ae52fae scripts: sanitycheck: Typo fixes in docstring.
Change-Id: I219d9f6af972b4090536fe83b6b93e6b7191572a
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-03-13 18:06:05 +03:00
Tomasz Bursztyka e38a9e8b9c net: Switch from per-iface tx thread to a unique k_poll triggered one
Now that k_poll landed in the kernel, it's worth using it to save
memory and reduce the number of threads at runtime.

Such switch has been first done in bluetooth (see hci_core.c and conn.c
in subsys/bluetooth/host). Since network interfaces kind of follows the
same design for sending data, it was then easy to copy the same change as
in bluetooth.

Change-Id: I7f9734b88ac818284bbabaedc946b4765b905ebb
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-03-09 20:33:49 +02:00
Anas Nashif 3b3659c0d2 sanitycheck: run legacy tests only on daily basis
Change-Id: I3d928264cc47e8e71f05b691133814bcf8a0fd3f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-07 22:54:54 +00:00
Punit Vara 2c3a20b1ea boards: arduino_due: Add make flash support
This patch automates flashing process for arduino_due board. Just make flash will able
to flash binary file on the board.

Bossa tool(http://www.shumatech.com/web/products/bossa) manual flashing process is
automated through shell script and currently this binary is only available for
x86_64 architecture.

JIRA : ZEP-145

Change-Id: Ib7b525466239d0437e449c56827f8a9b3e5a96a1
Signed-off-by: Punit Vara <punit.vara@intel.com>
2017-03-01 12:46:06 +00:00
Anas Nashif 6d72e63f81 sanitycheck: add _k_queue_area to recognised sections
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Change-Id: I2b5084e651d57ffeada38327c774af6471b43efc
2017-02-27 19:52:58 -05:00
Inaky Perez-Gonzalez 5907a56264 filter-known-issues: fix missing variable printing
This is a corner case that barely hits and thus we had not seen it
before.

Change-Id: Ie1420a4c866834e5a233985c6b8a19643426a1f5
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2017-02-27 21:51:47 +00:00
Marcus Shawcroft f62e681a5c checkpatch: Recognized volatile as part of a declaration.
Adjust the checkpatch script to recognize the volatile keyword as
forming part of a declaration.  This prevents inappropriate checkpatch
gripes for patches such as:

https://gerrit.zephyrproject.org/r/#/c/10345/

Change-Id: Ia29a9002bb9ef15f747d29231d938ae12790724d
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-22 14:56:44 +00:00
Kumar Gala d3d2fab1ba boards: Add panther & panther_ss to sanity
Change-Id: I08345fb1063a4ba38095fca6512c5b7eb3e96da8
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-02-20 15:41:31 +00:00
Anas Nashif 15a6598691 Merge "Merge remote-tracking branch 'origin/core'" 2017-02-15 04:33:25 +00:00
Kumar Gala 047ae4033c toolchain.gccarmemb: set DTC for building targets that use devicetrees
We default DTC to /usr/bin/dtc so we can build targets that are using
devicetree and not using the zephyr SDK (which provides a version of
dtc).

Change-Id: I84c3e3181eda75b4da715e16bbde2e67f28785e7
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-02-14 14:15:10 +00:00
Marcus Shawcroft 459e850429 scripts: Fix hardwired python path in extract_dts_include.py
Replace the hardwired #! python path with a PATH search.  This is
necessary to allow build tools to execute from a virtualenv.

Change-Id: Ib83131fd96656bc9f76c606356b1f92c877cc117
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-14 02:14:39 +00:00
Andrew Boie 1e4e68b52a sanitycheck: only disable tryrun when using SDK
Change-Id: I8018db62408240208b6f0b5e8f6f5ddf96d497f2
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-13 11:39:03 -08:00
Mazen NEIFER e861775ebb xtensa port: Added arch .ini file to support xt-sim
Change-Id: I0c1fac867cde2c76975fda396b8f524240954be4
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-13 11:39:03 -08:00
Andrew Boie 60823c2325 sanitycheck: fix defconfig regex
By convention Kconfigs are in all uppercase, but not strictly
required to be so. Currently the Xtensa build defines
CONFIG_${XTENSA_CORE} which can have lowercase letters. This
is marked for cleanup in ZEP-1711.

Issue: ZEP-1711
Change-Id: Ia901ea1688202129f1629001a77f498522859f14
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-13 11:39:03 -08:00
Andrew Boie dec83a7ac2 xcc: add ccache support
This toolchain Makefile defines CC/CXX directly so we need to add
a USE_CCACHE case here.

Change-Id: Iee8dc6ab030db8dc45b16e21c5b17864e51341b4
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-13 11:39:02 -08:00
Andrew Boie a95d524328 xt-run: don't leave dead emulator processes lying around
A ctrl-c in the script wouldn't terminate the child process.
Only do the pid trick if we're communicating with sanitycheck over
pipes.

Change-Id: I79da7362958b5fac00defd74d4b709076085575b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-13 11:39:02 -08:00
Andrew Boie eb50958266 xt-sim: add support for 'make debug'
Change-Id: I60b64c6b8c83e1e1c49d8cb2c5f857faee88a7a0
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-13 11:39:01 -08:00
Mazen NEIFER a6746c83ba Xtensa port: Removed unsupported c++ flags cuasing xt-c++ to throw an error.
Manu command lin eoption are not supported by xt-c++. There are filtered out
when calling Makefile.toolchain.xcc.

Change-Id: I1e60843d2b23f90250fbb493487c6fc838b7485a
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
2017-02-13 08:04:27 -08:00
Mazen NEIFER 0cbf12489e Xtensa port: xt*-run requires options to be passed before file to be ran.
If passed after the file they are just ignored silently!

Change-Id: Ic9b04c3023e4d312382850fa5e1b5ae4ef555856
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
2017-02-13 08:04:27 -08:00
Mazen NEIFER 8f1dd3a6e5 sanitycheck: Fixed displayed log when current directory is a symbolic link.
When current directory is a symbolic link or in a symbolic link then os.getcwd
return the real path leading to os.path.relpath returning not so nice relative
path.

Change-Id: I3e24d3e6f1fe7185992f64803d3728e9588d67e1
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
2017-02-13 08:04:27 -08:00
Andrew Boie 495d922406 xt-run: fix sanitycheck communication
Sanitycheck actually creates the pipes, using a naming convention imposed
by QEMU. We also need to leave a PID file.
'xt-run' Make target removed, we don't need it.

Change-Id: Ie9fd9dbb1327eb4b10424e7ee5d2f4dc09b121a4
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-13 08:04:27 -08:00
Mazen NEIFER b012aa1901 Xtensa port: Use directly assmebler and linker instead of via the compiler.
This allows handling options like --fatal-warnings that are passed by
sanitycheck.

Change-Id: Ia78dcef480d9d81cab6051453204c05d52917af2
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
2017-02-13 08:04:27 -08:00
Andrew Boie e536b270f0 sanitycheck: don't disable tryrun
This completely breaks all the cc-option checks. It's not clear
why this was done for everyone running sanitycheck.

Change-Id: I3f944423869ccb15fab29c28130820a93cd94917
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-13 08:04:27 -08:00
Andrew Boie 9d8d026294 xt-run: delete any stale fifos to avoid mkfifo error
Change-Id: I53d56587a0b90da273e118bd5b9e051aa2451d8f
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-13 08:04:27 -08:00
Andrew Boie 2b2763aa95 xcc: add location of C++ compiler
Change-Id: I5b6ee6e9d424f401cca0e9d360555ff6cf94f504
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-13 08:04:27 -08:00
Mazen NEIFER 7f046378eb sanitycheck: support other simulators (xt-run and/or xtsc) than QEMU.
In scripts/Makefile.qemu, the target qemu is already an alias for taget run.
In scripts/Makefile.xt{,sc}-run there is no target qemu but a target run.

Change-Id: Ib9dce3561ef9367b17d30070354e709df4d7e528
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
2017-02-13 08:04:27 -08:00
Mazen NEIFER 0efb2313ca Xtensa port: Let xcc specific make file override unsupported -Og with -O0.
Change-Id: If1a1833b5ce09c7112245b8b73c0ccd28be66c88
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
2017-02-13 08:04:27 -08:00
Mazen NEIFER ffd4eb9272 Xtensa port: Changed simulation support with xt-run/xtsc-run to be qemu like.
Change-Id: I1626a5cd75d17bc4f72d4a638484f87956f9e703
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
2017-02-13 08:04:27 -08:00
Mazen NEIFER e8813d6fe5 Xtensa port: Define __builtin_unreachable() as CLI macro when using XCC.
XCC does not recognize __builtin_unreachable() and thus cause a link error.

Change-Id: I5dadf5a49d971d5e0a5ef88d582bb5ad2c36bced
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
2017-02-13 08:04:27 -08:00
Mazen NEIFER aa1e95bfb2 Xtensa port: Moved XCC specific libraries out of genric Xtensa make file.
These libraries are unlikely to be uesd by GCC port and thus should not be in
a generic make file. Moved to specific toolchain make file.

Change-Id: Ib585b87700e409d678f7a5cb60cff67b6022ab05
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
2017-02-13 08:04:27 -08:00
Mazen NEIFER 0e0e0950dd Xtensa port: Fixed typo in XCC toochain specific make file.
Change-Id: I3ce26e8c047e743bb73fc2e75647788481b2490a
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
2017-02-13 08:04:27 -08:00
Mazen NEIFER 0b4adc398d Xtensa port: Added support for XCC, the Cadence Systems Inc compiler
Change-Id: I6947519be1d3b155e4501950ee1303c40a4e5b16
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
2017-02-13 08:04:27 -08:00
Anas Nashif 1208bab079 add curie_ble board for all curie based boards
Change-Id: Id87839f80db00da499077ac1c2bb8f588fcf3f06
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-11 07:20:03 +05:30
Anas Nashif abbd2129ed boards: add tinytile board
Change-Id: I9661c21c25761e29b695f78236df4e44192f367f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-11 07:16:31 +05:30
Vincenzo Frascino ae5dbe47f6 arm: dts: Add base DTS support for v2m_beetle
This patch adds the base DTS support for the V2M Beetle board.  The
initial set of changes include SRAM, FLASH, and IRQ controller support.

Change-Id: I06685622b9c57ac358544c71350074ce06e3371e
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-02-10 18:14:03 +00:00
Andy Gross bb063164aa dts: Add support for Device Tree
This patch adds support for using device tree configuration files for
configuring ARM platforms.

In this patch, only the FLASH_SIZE, SRAM_SIZE, NUM_IRQS, and
NUM_IRQ_PRIO_BITS were removed from the Kconfig options.  A minimal set
of options were removed so that it would be easier to work through the
plumbing of the build system.

It should be noted that the host system must provide access to the
device tree compiler (DTC).  The DTC can usually be installed on host
systems through distribution packages or by downloading and compiling
from https://git.kernel.org/pub/scm/utils/dtc/dtc.git

This patch also requires the Python yaml package.

This change implements parts of each of the following Jira:
ZEP-1304
ZEP-1305
ZEP-1306
ZEP-1307
ZEP-1589

Change-Id: If1403801e19d9d85031401b55308935dadf8c9d8
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-02-10 18:13:58 +00:00
Anas Nashif 648ecef7bd sanitcheck: add sam_e70_xplained
Change-Id: Ic16f6132b701b4e2079939302473e5e5b295dc59
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-04 02:57:49 +00:00
Anas Nashif 268fa152f2 scripts: add configuration file for uncrustify
Use this configuration file with the uncrustify tool to fix style
issues. the configuration should apply the zephyr coding style on
source code files with a few minor excrption. Do not take the output for
granted, always check for correctness after running.

To use, for example:

uncrustify --replace --no-backup -l C -c $ZEPHYR_BASE/scripts/uncrustify.conf

This will do the changes inline.

Change-Id: Iecfd2e10bc7e475ca83de0d921ebb5d72156d286
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-04 01:46:29 +00:00
Andrew Boie f7a6e28a3c sanitycheck: don't override environment for USE_CCACHE
Many users set USE_CCACHE=1 in their envionment. Sanitycheck was
disregarding that and placing USE_CCACHE=0 in the generated
Makefile unless --ccache was added to the command line every time
it was invoked.

Issue: ZEP-1663
Change-Id: Id3c1379f5039d4d2f4a3ae01d2ec8d0dd216f523
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-02 13:09:00 -08:00
Anas Nashif 8436c0a967 toolchain: define DTC for zephyr SDK
Change-Id: I34a6d23a3f0f4385b41896ceb8477bc441f3a33e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-30 21:45:05 +00:00
Leandro Pereira ca42e85bcd scripts: Add device tree parser script
As decided during the Zephyr Mini Summit in December 2016, we're going
to use the same Device Tree format as used by the Linux kernel to store
device configuration from vendors.

This is a parser written during the summit that will parse *.dts files,
and will be used as part of the solution to read in the files provided
by manufacturers and generate board configuration files.

The script will also optionally generate files in the DOT language so
that DTS files can be graphed using the Graphviz suite.

Change-Id: I6e2b7a64a6dcc349b2888332a660b4700af6cd63
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-01-30 20:51:21 +00:00
Anas Nashif d159c8e476 Merge "Merge arm branch into master" 2017-01-30 18:22:45 +00:00
Maureen Helm 2c1e318389 frdm_kw41z: Add frdm_kw41z board
Adds initial support and documentation for the frdm_kw41z board.

- Configures the kw41 to use the 32 MHz external oscillator on the board
  to generate a 40 MHz system clock. The clock settings match the MCUX
  SDK hello_world example project.
- Provides pinmux settings for the uart, i2c, LEDs, and switches
- Enables pinmux, gpio, uart, and i2c driver instances
- Configures the fxos8700 accelerometer/magnetometer driver

Jira: ZEP-1390
Change-Id: I025a0eae3d380eaf90b02683acf5c592e2204a2e
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-01-30 11:02:35 -06:00
Andrew Boie ded842ec89 Revert "Revert "sanitycheck: add support for risc v boards""
This reverts commit 9fb0c2af5c.
SDK 0.9 has now been released.

Change-Id: I676b6f0e31ab48fde3dda41b681abf53964ea9f9
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-01-30 08:58:36 -08:00
Andrew Boie 9fb0c2af5c Revert "sanitycheck: add support for risc v boards"
The 0.9 SDK is not released yet!!

This reverts commit 7995e6207c.

Change-Id: I550d1aa27ba7a06ff2cda09496ceb92645a17460
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-01-24 16:50:58 -08:00
Anas Nashif 7995e6207c sanitycheck: add support for risc v boards
Change-Id: I9d51be1d284b31f7ea84868bf09ce5b5a6afa004
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-25 00:08:48 +00:00
Inaky Perez-Gonzalez e45f05bc1e filter-known-issues: add warning support, clean up, add more help
Introduce support to tag some issues as warnings, that can be printed
but not considered errors.

Added the ability to write the errors and warnings to split files, for
later reporting.

Added a more consistent help.

Change-Id: Ia75430c3337385afca59595437168ab643c92911
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2017-01-24 13:44:48 +00:00
Jon Medhurst ac4bfe49d1 boards: arm: Add board for MPS2 with AN383
ARM's Cortex-M Prototyping System (MPS2) is a board with an FPGA that
can be programmed with different 'SoCs'. To use these in Zephyr we need
a set of board files for each variant.

This adds a board for a variant which implements a Cortex-M3 CPU; the
naming of this matches that used for the Zephyr SoC (which is itself
based on ARM's documentation nomenclature).

Change-Id: Ie02a67a03016b8aeee31e3694f0edbcc37f9ee64
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2017-01-23 15:15:54 -06:00
Adam Podogrocki d8992f576e boards: add initial support for STM32373C-EVAL with SoC STM32F373VC
Change-Id: Iec92b0c7e2c244bd82ee9c318f6f2cb3ed2d7397
Signed-off-by: Adam Podogrocki <adam.podogrocki@rndity.com>
2017-01-23 15:15:53 -06:00
Adam Podogrocki 5f2fa051a6 boards: add initial support for Nucleo-64 with Soc STM32F334
Change-Id: I0b9992e26353cea3b0415aa57ab3b983d84cef05
Signed-off-by: Adam Podogrocki <adam.podogrocki@rndity.com>
2017-01-23 15:15:53 -06:00
Anas Nashif c9c36f15de build: have sysgen create SPDX license identifiers
Jira: ZEP-1593
Change-Id: I9b1f1d26f18b0e4da2ab2110416a4e60e3889f29
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-20 02:29:41 +00:00
Andrew Boie b739acf5cd gen_idt: show vector assignments in debug output
Change-Id: I3099e56b480cc0e939a37efbf57e0700251d039a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-01-19 20:16:08 +00:00
David B. Kinder ac74d8b652 license: Replace Apache boilerplate with SPDX tag
Replace the existing Apache 2.0 boilerplate header with an SPDX tag
throughout the zephyr code tree. This patch was generated via a
script run over the master branch.

Also updated doc/porting/application.rst that had a dependency on
line numbers in a literal include.

Manually updated subsys/logging/sys_log.c that had a malformed
header in the original file.  Also cleanup several cases that already
had a SPDX tag and we either got a duplicate or missed updating.

Jira: ZEP-1457

Change-Id: I6131a1d4ee0e58f5b938300c2d2fc77d2e69572c
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-01-19 03:50:58 +00:00
Andrew Boie 7a992aebac sanitycheck: improve terse output
Values now spaced 4 apart since we commonly build thousands of
tests.

Percentage complete indicator added.

Change-Id: Ia7454dc1e8cc0701dc74dc8a4f6e7a37706524e8
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-01-18 18:47:38 +00:00
Andrew Boie 18ba153300 build: remove obsolete sections from linker scripts
These were causing some issues in the old kernel, but the unified
kernel no longer uses these.

Issue: ZEP-513
Change-Id: I87216565231cd244886fbffe4b4d420d1687b245
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-01-18 18:47:17 +00:00
Anas Nashif bfcdfaf941 sanitycheck: riscv: add vector to recognised sections
Change-Id: I7f1692eb1bd51b8efc16919780aebaf890b8872c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-13 20:00:16 +00:00
Jean-Paul Etienne ba776a1fd1 scripts: added Makefile to handle an external riscv32 toolchain
Compiling Zephyr with an external riscv32 toolchain would
require the following env variables to be exported:

export ZEPHYR_GCC_VARIANT=riscv32
export RISCV32_TOOLCHAIN_PATH=/PATH/TO/TOOLCHAIN/BINARY

Change-Id: I2072ed9079a4cabd27837ab39b947bc0a0a1a8b4
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
2017-01-13 19:52:22 +00:00
Anas Nashif a1ae7f565b Merge "Merge arm branch into master" 2017-01-12 18:23:39 +00:00
David Brown 8405ce13a1 scripts: Explicitly call out python2
At least one Linux distribution (Arch) has made python 3 the default
interpreter, and Debian and Ubuntu have expressed a desire to eventually
make this the case.  As such, invoking 'python' or '/usr/bin/python'
will possibly run python 3 instead of version 2.

Distributions have included a 'python2' link for quite some time now,
and given that we have some scripts that require python 3, we should be
explicit about those that require python 2.

In addition, be more consistent about how python is invoked, preferring
the:

  #!/usr/bin/env python2

construct rather than a hardcoded path to python.  This allows the user
to have an alternative python in their path that will be used in
preference to the system provided version.

Jira: ZEP-1548
Change-Id: I125c2af808dc268f74277bc97a092df3acad23c0
Signed-off-by: David Brown <david.brown@linaro.org>
2017-01-12 10:28:02 -07:00
Adam Podogrocki 7aeea1a124 boards: add initial support for STM3210C-EVAL board with SoC STM32F107VC
Change-Id: Ib120e0088b009d1e07a756470742fb29a606857e
Signed-off-by: Adam Podogrocki <adam.podogrocki@rndity.com>
2017-01-12 09:46:27 -06:00
Andrew Boie 822b08711f sanitycheck: properly identify when QEMU crashes out
This had been erroneously reported as a build error.

Issue: ZEP-1460
Change-Id: Idddaf833011beb1165bd766dd115c021c5b90cdf
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-01-11 14:03:39 +00:00
Andrew Boie d01535cbb6 sanitycheck: don't explode if log data can't be read
Issue: ZEP-723
Change-Id: I5d2b2e756fed7e2906da1e84c2da332682893660
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-01-11 14:03:33 +00:00
Anas Nashif 2bc9d69981 build: abstract emulation and replace qemu goal with run
This will replace the current goal of 'make qemu' with 'make run' and
moves Qemu handling into its own file and into the boards instead of
being architecture specific.

We should be able to add new boards that support some other type of
emulation (by adding scripts/Makefile.<emu type>) and allow the board to
define their own options for the use type of emulation.

'make qemu' will still work, however it will be deprecated, starting
with this commit it is recommended to use 'make run'.

Jira: ZEP-359
Change-Id: I1cacd56b4ec09421a58cf5d010e22e9035214df6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-10 20:20:47 +00:00
Anas Nashif 6d9ed994aa build: use target 'debugserver' for Qemu debugging
Use the existing debugserver target also for Qemu debugging. Qemu
should be maintained as one of many emulation/simulations platforms and
emulation should be abstracted in the Makefiles and not tied to Qemu.

qemugdb will still work, it is however being deprecated.

Change-Id: I0cd10fb66debb939b8f7f1304bf2ef4605da6a1d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-10 20:20:46 +00:00
Anas Nashif 6d4ff2303e sanitycheck: reduce number of unnecessary configuration builds
When running a reduced set of tests with --platform-limit or using the
default of 1 we build the configuration (make initconfig) for all
platforms, although we are only interested in a limited set. On my
machine this is 100s of build time for configurations we are never going
to use.
This reduces the number of builds to what we really need and speeds up
sanitycheck runtime overall.

Might need a few more optimisations.

Change-Id: I813fabf1453f19ce7a83b28e4792b5c80616d936
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-05 02:05:58 +00:00
Juro Bystricky 30093f13ca Makefile.toolchain.zephyr: Modifications for SDK 0.9
Various changes required by new SDK 0.9:

1. Renamed toolchain vendor name ("poky" -> "zephyr")
2. Toolchains now 64 bit, previously 32 bit
3. New toolchain for Xtensa
4. New toolchain for RISC-V

0.8.2 is still supported.

Change-Id: Icfd4cc44ef643da0f3840b33d6dfc4b3c99dfa9a
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-01-04 14:16:12 -08:00
Inaky Perez-Gonzalez 9a36cb6456 sanitycheck: add --log-file to log everything to a file too
Currently CI plays tricks with `tee` to capture the output and post
process it. This makes it more complex to handle and easier for it to
fail in ways it should not.

So add a simple log capture option sanity check that mirrors the
stdout output, removing color encoding for errors.

Change-Id: I6de0b6cfe4da9c289f537979545dddbcd49cf834
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2017-01-03 19:21:31 +00:00
Kumar Gala 60a079cb2c Revert "sanitycheck: reduce number of unnecessary configuration builds"
This reverts commit 4e2cf33d9d.

The change does not work correct if we have a filter and specify a
specific platform, such as:

./scripts/sanitycheck -p 96b_nitrogen -i -s samples/hello_world/test_singlethread

Change-Id: I43a4f25ed25c8fe5379cda23b6dbfa8f9ae5cb0d
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-12-30 09:43:48 -06:00
Anas Nashif 4e2cf33d9d sanitycheck: reduce number of unnecessary configuration builds
When running a reduced set of tests with --platform-limit or using the
default of 1 we build the configuration (make initconfig) for all
platforms, although we are only interested in a limited set. On my
machine this is 100s of build time for configurations we are never going
to use.
This reduces the number of builds to what we really need and speeds up
sanitycheck runtime overall.

Might need a few more optimisations.

Change-Id: I53d6bacf66045dde7baabbaa40b4fbfc4a01782a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-12-28 19:51:43 +00:00
Anas Nashif 5312754988 sanitycheck: remove kernel keywords
Change-Id: I076491f58147ffc70d84b62e1d78b4ae419add7b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-12-28 18:38:46 +00:00
Javier B Perez 814534ba4e compare footprint: add sanity args files
Added sanity args to be used by the compare footprint.
Please notice that compare footprint use sanitycheck to
build footprint apps for base commit and for current commit.
This in order to collect the information and generate the diff.

Change-Id: I6f86bbfa020999b3f26e93a608fc7b34ee508e10
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-12-21 13:46:56 +00:00
Kumar Gala f4df430bac sanity_chk: add nucleo_f411re to arm list of boards for sanity
Change-Id: I34d3c7a7dd8dc53e6c592fc9339c656a39aeeb3b
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-12-20 09:15:28 -06:00
Carles Cufi 429bea5381 boards: arm: Add support for the Nordic pca10056 PDK
With the appearance of the nRF52840 IC a new Preview Development Kit
(PDK) board has been introduced. This patch adds basic support for this
new board.

JIRA: ZEP-1418

Change-Id: If5845e75312ec756b968e595e5dc31c4c9624be2
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-12-20 09:14:48 -06:00
Anas Nashif 569f0b4105 debug: move debug features from misc to subsys/debug
Change-Id: I446be0202325cf3cead7ce3024ca2047e3f7660d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-12-19 19:58:40 +00:00
Anas Nashif 095112516a scripts: remove old qemu patch
This patch does not apply anymore. A patched qemu already exists in the
SDK.

Change-Id: Iee18550a7b9288a1db2a6ecc4378ff554b240229
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-12-12 20:25:06 +00:00
Neil Armstrong afe71f61e7 nucleo_l476rg: add board support
Add board support for the Nucleo64 L476RG development board.

Change-Id: Ibb5424bc936c67a5d96855617202136d7dea772c
Signed-off-by: Fabien Parent <fparent@baylibre.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2016-12-06 10:31:45 -06:00
Anas Nashif 70f9244db7 Merge "Merge net branch into master" 2016-12-05 15:56:26 +00:00
Anas Nashif a224a9a67a sanitycheck: update footprint data
Change-Id: I9b400a2f2ae1a1a2739e9c96eb4b9ebc098d998a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-12-03 00:09:40 +00:00
Jukka Rissanen 8e84e36f14 net: Declare a macro to define stacks used by networking
The macro defines the stack as usual, but if user has
enabled net shell (CONFIG_NET_SHELL), then additional
information about the stack is stored in net_shell
linker section. The information in the net_shell linker
section is then used to print information about the
stacks in the networking sub-system.

Change-Id: Ic6e9f16a73a192b9a59d32a6d0070322382f98bd
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:41:14 +02:00
Jukka Rissanen dbb3988ee6 net: Remove nbr_data section as it is useless
No need to store the nbr pool data into a dedicated section
as we have only one nbr pool defined.

Change-Id: I6f2afcce57b5f588878496bf085567b938e32c80
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:40:27 +02:00
Tomasz Bursztyka b56c4df869 sanitycheck: Add support for section net_l2_data
We missed that section, so sanitycheck was failing.
Also putting the right section in the relevant array.

Change-Id: I361ffa1707c01f0d3c870a7bc36a86ada66af1d2
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-12-02 12:40:23 +02:00
Tomasz Bursztyka 11f572c9e1 sanitycheck: Recognize native IP stack specific sections
Without these, test case will fail miserably.

Change-Id: Ib46d167b8782c33362ac6edb9d8c50abc25908c0
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-12-02 12:40:13 +02:00
Inaky Perez-Gonzalez 96c4a4b3a3 scrips/kconfig: reduce impact of getenv() buffer overflow
getenv() returns an string of unknown size, so Coverity warns that it
might be used to overflow the stack in the call chain off
conf_read_simple().

To avoid that, wisdom says copy to an string of known size and pass
that.

Change-Id: I9e468de0ae66429062027f58fe0a0a4e1197218f
Coverity-ID: 150819
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
(cherry picked from commit 0307d6ea5fa361abe5c9fb1872f9dc8256208ee0)
2016-12-02 04:16:53 +00:00
Anas Nashif e3febe9aa5 sanitycheck: allow error on deprecation warnings
Added new option to make sanitycheck script error on deprecation
warnings, to use:

sanitycheck --error-on-deprecations

For example, to find usage of legacy APIs in master, run the following:

sanitycheck -e legacy --error-on-deprecations

Change-Id: Ib83c266c8357475840dea03d62ceefed72b73f27
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-12-01 21:06:07 +00:00
Andrew Boie 52fef67c13 sanitycheck: allow for extra binary sections in testcase.ini
Change-Id: I9e47a58f3f32ba093f7916af111a289b620c30d5
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-11-30 14:14:10 +00:00
Anas Nashif d9616b9400 sanitycheck: abort if last_sanity.csv not found
When running --only-failed make sure last_sanity.csv exists.

Change-Id: I862529a58f337987c37da83fd5541dd4f42b3391
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-29 13:41:00 -05:00
Juan Manuel Cruz 7f1c76f2bf win-build: Fixes a kconfig incompatibility for Windows
In windows systems the rename() function fails if the new name
of the original file corresponds to a file that already exists.

The fix removes the new file before renaming the original one.

Jira: ZEP-980

Change-Id: Ib3a43db86c0dd3fabb592f53ea7619eb5738bb65
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-11-18 23:22:21 +00:00
Inaky Perez-Gonzalez ababbf7815 scrips/kconfig: use snprintf() vs sprintf()
Coverity reported 150819 issue, which steams off Flex generated code
from zconf.l in which sprintf() was use. Because of that, the
conf_read_simple() @name parameter could be used to overrun
zconf_open() @fullname by crafting SRCTREE and KCONFIG_ALLCONFIG
environment variables.

Change-Id: I2cff817dccafe0e06b35636bbb7be95e062410af
Coverity-ID: 150819
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-11-18 23:04:32 +00:00
Benjamin Walsh 59a382e339 kernel: remove last instances of tNANO in comments
Change-Id: I3d533b819422d4b754afb81d3ea67c03bc7f5630
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-11-14 10:30:24 -05:00
Anas Nashif f23b038431 tests: update sanitycheck footprint baseline
Update file to catch any regressions and major changes during
stabilisation period.

Change-Id: Id30dd1827034b96c5478c78f9c388384f51bcbec
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-13 09:27:02 -05:00
Benjamin Walsh f6ca7de09c kernel/arch: consolidate tTCS and TNANO definitions
There was a lot of duplication between architectures for the definition
of threads and the "nanokernel" guts. These have been consolidated.

Now, a common file kernel/unified/include/kernel_structs.h holds the
common definitions. Architectures provide two files to complement it:
kernel_arch_data.h and kernel_arch_func.h. The first one contains at
least the struct _thread_arch and struct _kernel_arch data structures,
as well as the struct _callee_saved and struct _caller_saved register
layouts. The second file contains anything that needs what is provided
by the common stuff in kernel_structs.h. Those two files are only meant
to be included in kernel_structs.h in very specific locations.

The thread data structure has been separated into three major parts:
common struct _thread_base and struct k_thread, and arch-specific struct
_thread_arch. The first and third ones are included in the second.

The struct s_NANO data structure has been split into two: common struct
_kernel and arch-specific struct _kernel_arch. The latter is included in
the former.

Offsets files have also changed: nano_offsets.h has been renamed
kernel_offsets.h and is still included by the arch-specific offsets.c.
Also, since the thread and kernel data structures are now made of
sub-structures, offsets have to be added to make up the full offset.
Some of these additions have been consolidated in shorter symbols,
available from kernel/unified/include/offsets_short.h, which includes an
arch-specific offsets_arch_short.h. Most of the code include
offsets_short.h now instead of offsets.h.

Change-Id: I084645cb7e6db8db69aeaaf162963fe157045d5a
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-11-12 07:04:52 -05:00
Anas Nashif ff23cb58a8 build: support pre-built host tools
Right now the build system builds the host tools over and over again, in some
environments especially when running in an IDE on windows for example,
this is not desired and a set of pre-built host tools should be used.

Provide an option to use pre-built tools instead of building them
from source.

To use, set PREBUILT_HOST_TOOLS to the path where all pre-built host tools
are hosted. To get a prebuilt version of the host tools, build without the
variable set and copy the generated host binaries from outdir. The following
tools are supported:

* conf
* fixdep
* gen_idt
* gen_offset_header

Jira: ZEP-237
Change-Id: Iea505bfd0b50f851ee2781b5117bb6085ab20157
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-12 00:34:03 +00:00
Vincenzo Frascino 1d2fcc2254 board_beetle: Add support for ARM V2M Beetle Board
Add board support for ARM V2M Beetle platform.

ARM V2M Beetle board is build around the ARM Beetle Cortex-M3
based processor.

The support has been tested in nanokernel mode with the bringup
application that will be pushed with a future patch.

Jira: ZEP-1245
Change-Id: Ib05a40c072f10149e692283177387cf2cfe32f66
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-11-11 20:39:54 +00:00
Anas Nashif 0f3d5478a8 checkpatch: update with latest checkpatch from the linux kernel
Update with commit 577f12c07e4edd54730dc559a9c7bc44d22bf7dc from
the Linux kernel.

Change-Id: Ie2cabbfea415d26ffacef340d9497342b496dc29
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-11 14:27:39 +00:00
Anas Nashif 49598db96d Revert "checkpatch: update with latest checkpatch from the linux kernel"
This reverts commit 0c9152d42d.

This was not ready for merge yet.

Change-Id: I08f69e27929867606bc58cdeffed6540725069a1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-10 12:48:33 -05:00
Anas Nashif 0c9152d42d checkpatch: update with latest checkpatch from the linux kernel
Update with commit 577f12c07e4edd54730dc559a9c7bc44d22bf7dc from the Linux
kernel.

Change-Id: I6314dd41eb200c87cdcc6f212f13d3351128de0d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-10 17:24:44 +00:00
Kumar Gala 126fa0073b sanitycheck: Add bbc_microbit to list for platforms
Change-Id: I2afd9f04e1a88b0b7c0ec600cffea18c1b86a3e8
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-11-10 16:58:26 +00:00
Johan Hedberg dad2a77e6b boards: Add support for Quark SE C1000_BLE
The Quark SE C1000 BLE Core is a nRF51822-QFAA, with 16kB of RAM and
256kB of flash. The configuration is otherwise similar to the Arduino
101 BLE, except that the UART RTS pin is the same as that used by
nrf51_pca10028.

Change-Id: I88cb18876bdde65abcf9a499894f70802046c824
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-11-08 15:00:00 +00:00
Sakari Poussa 1bfdfbf384 c++: enable subdir-cxxflags
Similar to C subdir-ccflags, enable similar C++ variable subdir-cxxflags

Change-Id: I4355817bc2d6a80a3eebba9b87fbf54725dda5e7
Signed-off-by: Sakari Poussa <sakari.poussa@intel.com>
2016-11-08 13:30:28 +02:00
Andrew Boie b4cc4c9bea sysgen: build for unified kernel only
sysgen will also now re-run if the build system detects that
the script itself has changed.

Change-Id: I2bf5c4893da088fa27729bc6337bc66cc4cee341
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-11-04 19:19:17 +00:00
Andrew Boie 4187822d08 sanitycheck: build for unified kernel only
Change-Id: I3bd744b10341bc7292fb0670faf217933efe9edc
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-11-04 18:32:15 +00:00
Gil Pitney 10ea5d01c6 boards: arm: Add support for TI SimpleLink WiFi CC3200 LaunchXL
Added Kconfig and makefiles to be able to build a Zephyr application
on Linux/gcc, and load via OpenOCD.

Validated by running the hello world, and philosophers microkernel
samples, and stepping through the code in gdb.

Jira: ZEP-1109

Change-Id: If5d3e7b1a8ecf5ecf6a00f147742b3bc5716190f
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2016-11-04 09:38:51 +00:00
Benjamin Walsh 5ce3be75aa unified/sysgen: do not generate TICK_EVENT event
Sysgen was still generating the TICK_EVENT event needed for the
microkernel system clock timer driver in the unified kernel. That ended
up dragging in alerts all the time, which in turns drag in the system
work queue, which drags in the work queue, which drags in FIFOs.

This shaves 1052 bytes of RAM and 860 bytes of ROM in systems that don't
need these components (on x86 with IAMCU).

Change-Id: Ica56857da2b6444181f10e83f6c986d092aa967b
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-11-03 23:06:42 +00:00
Kumar Gala a3e23bc022 sanitycheck: enable missing ARM platforms
Now that these platforms pass sanitycheck add them into the list of
platforms we support

Change-Id: If559c80e107505e6b98f81c0e94b9862618b1735
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-11-03 19:20:20 +00:00
Allan Stephens 3f5c74c922 unified: Add linker script support for all kernel object types
Enhance the linker script so that all statically-defined kernel
objects of a given type are co-located.

Note 1: This capability is needed so that static kernel objects
can be added to the associated object tracing list. (Some kernel
object types are already co-located to permit the kernel to do
other initialzation on statically-defined objects.)

Note 2: A follow-up commit is needed to ensure statically-
defined kernel objects are placed in the sections referenced
in the linker script.

Note 3: The legacy script info remains for now to allow
applications using the microkernel or nanokernel to continue
to build.

Change-Id: I40d831f9e183fb121c950e30fa8298b6d529375b
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-11-02 21:56:26 +00:00
Yael Avramovich d5db35204a console: shell: Support multiple modules
Ability to use Zephyr shell by multiple modules simultaneously, each
module for its own usage.

Old shell implementation enabled the user to call only one module
commands, not all of the modules simultaneously.

Change-Id: I0ef8fa2fd190b7490c44fe91d1016363258302c9
Signed-off-by: Yael Avramovich <yael.avramovich@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-02 00:23:18 +00:00
Gil Pitney 304e5a69bf Makefile: Fix clobber of LIB_INCLUDE_DIR during second pass
The commit:
commit f25ac092b9
 "Makefile: Restructure for multilibs"

breaks external HAL library linking, by overriding, in the
the second Makefile pass, the LIB_INCLUDE_DIR variable
set in the first Makefile pass from ext/hal Makefiles.

This breaks use of the CONFIG_CC3200SDK_LIBRARY=y option in
the cc3200 SDK, and also likely the QMSI ext/hal/qmsi/Makefile,
when CONFIG_QMSI_LIBRARY=y is set.

This commit just changes the '=' to "+=".

Jira: ZEP-1163

Change-Id: I1aaaaee57378dcd01ab6f2ed4799281b2337eea2
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2016-11-01 23:51:02 +00:00
Peter Mitsis 058fa4e493 unified: API changes to event handling
Allows event objects to pend signals in a cumulative way using
the semaphore in a non-binary way.

Jira: ZEP-928
Change-Id: I3ce8a075ef89309118596ec5781c15d4f3289d34
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-11-01 16:27:41 -04:00
Flavio Santes 70ff94c42a scripts: Update fixdep from kernel.org
This commit updates fixdep.c from the Linux Kernel, stable v4.8.5.

Origin: https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/plain/scripts/basic/fixdep.c?id=refs/tags/v4.8.5

Jira: ZEP-737

Change-Id: If75d0abb22f98bae74a801aea53218039107dd65
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-10-31 20:58:57 +00:00
Andrew Boie f1c373c2d5 unified: handle MDEF files that declare main()
Before, the kernel would run the main() function twice; first
as an entry in k_task_list, and then again from _main(). The
_main() invocation would be using a potentially insufficient stack
size.

Now if an MDEF file declares a main() thread, invoke it from
_main(), but honor the desired priority and stack size.

Issue: ZEP-1145
Change-Id: I1abf38fc038e270059589b11d96fae1b3f265208
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-10-28 21:54:38 +00:00
Andrew Boie c9985d74b0 REVERTME: disable sanity for arduino_101_ble
This is broken currently.

Change-Id: I97bbc8c3c6aa8f5328fa651f5d7fb8d4ad03ded6
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-10-28 13:48:38 -07:00
Amit Kucheria eb0f8ab9fc boards: 96b_carbon: Add support for 96boards Carbon board
Add support for the STM32F401 chip on the board

Change-Id: I96c0799f3658ecea096fa5971bce9faf21919ee1
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-10-28 18:58:06 +00:00
Ricardo Salveti 779fb0586a boards: nucleo_f401re: add new board
Add configuration for Nucleo-64 F410RE board.

Change-Id: I88b06d87f0fc62b941241cc2f374b8541de86e00
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-10-28 18:58:05 +00:00
Benjamin Walsh 31a3f6a70e unified: rename 'events' to 'alerts'
Event is such an overloaded and generic term (event logger, *kernel*
event logger, "protocol" events in other subsystems, etc.), that it is
confusing for the name an object. Events are kinda like signals, but not
exactly, so we chose not to name them 'signals' to prevent further
confusion. "Alerts" felt like a good fit, since they are used to "alert"
an application that something of significance should be addressed and
because an "alert handler" can be proactively registered with an alert.

Change-Id: Ibfeb5eaf0e6e62702ac3fec281d17f8a63145fa1
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-28 18:44:18 +00:00
Benjamin Walsh 7ef0f624a7 unified: rename 'memory maps' to 'memory slabs'
This better aligns with the actual functionality of the object.

Change-Id: I70abf54f994e92abd7367251089ea4f735d273fe
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-28 18:44:18 +00:00
Kumar Gala d5719a64c6 sanitycheck: Add support for ccache
Add a ccache option to allows enabling the use of ccache for builds
generated by sanitycheck.

Change-Id: Ia997ed29f38a3d2d71ba143456e6fcbc5946d56e
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-10-28 17:04:27 +00:00
Anas Nashif f8dcad4a5b sanitycheck: filter out the prebuilt.elf introduced by Makefile cleanup
commit 018b831a36 keeps another elf file in the
outdir which confused the sanitycheck script.

Change-Id: I87a9bcee6afe6526ecc24f1f5d9cf38101247ce2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 18:30:27 -04:00
Anas Nashif 5662110ec4 ci: sanitycheck: now that we do not run footprint script, reenable those
build footprint test as part of the main sanitycheck job, we do not run
the script comparing footprint anymore, it will move to somewhere else.

Change-Id: I36d475bfc3d985bf06a872649eae8c19e1a43aa4
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:12:32 +00:00
Andrew Boie 779aa6ec0b sanitycheck: remove default qemu_support=false
This directive is the default, no need to have an ever-expanding
enumeration of these.

Change-Id: Ic5147fe04de033cb7e97fc5cbe45edd1779d1120
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-10-27 20:54:44 +00:00
Johan Hedberg 9702b83ef2 boards: Add board definition for the BLE core on Arduino 101
The BLE core on the Arduino 101 is an nRF51822 QFAA (256kB flash, 16kB
RAM).

Change-Id: Ia802b3eb634c0cd6775c4059c9569bccd915a578
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-10-26 17:35:58 +00:00
Anas Nashif aabbdb79e6 scripts: limit compare_footprint script to a defined group of boards
This script is part of the CI job and currently is run on all defined boards.
We are limited on resources in the CI infra and this part is taking way too
much time. We now select a group of boards to look at instead of just building
everything.

Change-Id: Ifd634e74426c9cc801032b26ad9a9a94a0e55960
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-26 17:18:38 +00:00
Andrew Boie 431607c20a nios2: port to unified kernel
With this patch we introduce unified kernel support for NIOS II.
Not all test cases have been ported, but the following command
currently succeeds with 43/43 passing test cases:

 $ sanitycheck --arch=nios2 -xKERNEL_TYPE=unified \
         --tag=unified_capable

Issue: ZEP-934
Change-Id: Id8effa0369a6a22c4d0a789fa2a8e108af0e0786
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-10-26 17:10:13 +00:00
Szymon Janc 50b9317832 sanitycheck: Add support for unified kernel
This fix sanitycheck for apps that specify unified kernel.

Change-Id: I3f1c4d5a566f6833e56bbda097cb497ccdbfbec9
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2016-10-25 19:01:28 +00:00
Javier B Perez 3daf30c912 sanity: add unified args
Added unified kernel args in zephyr tree.

Usage:
source zephyr-env.sh
sanitycheck +scripts/sanity_chk/sanity_unified.args

Change-Id: I5bc087dbdcfffe3197bb8b4608206bb8f56810c2
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-10-25 11:08:19 -05:00
Genaro Saucedo Tejada 28bba92dc0 sanity: Load arguments from files
Python module argparse has a feature to load arguments from a file.
This commit enables such feature on sanitycheck script so files
prefixed by + (plus sign) are loaded during argument parsing stage
and included as arguments to such script.

Jira: ZEP-122

Change-Id: Ibb0a6e8464218a4f58ce4044a5a0860dc5b32480
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-10-25 13:05:36 +00:00
Allan Stephens 480a131ad9 unified: Support heap memory pool
Fleshes out the prototype heap memory pool support
to make it fully operational. Noteworthy changes are
listed below:

Tweaks arguments to k_malloc() and k_free() to be more like
malloc() and free(). Similarly, modifies k_free() to take
no action when passed a NULL pointer.

Now stores the complete block descriptor at the start
of any block allocated from the heap memory pool. This
increases memory overhead by 4 bytes per block, but
streamlines the allocation and freeing algorithms. It also
ensures that the routines will work if the block descriptor
internals are changed in the future.

Now allows the heap memory pool to be defined using the
HEAP_MEM_POOL_SIZE configuration option. This will be the
official configuration approach in the unified kernel.

Also allows the heap memory pool to be defined using the
(undocumented) HEAP_SIZE entry in the MDEF. This is provided
for legacy reasons only.

Co-locates memory pool initialization code to keep the line
that causes memory pool initialization to be done during booting
right next to the routine that does the initialization.

Change-Id: Ifea9d88142fb434d4bea38bb1fcc4856a3853d8d
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-25 00:10:34 +00:00
Kumar Gala 5680681ed9 tests: Rename test_arm_m3_irq_vector_table test since it is not M3 specific
Drop the _m3 from the test name since this can run on M0, M3, M4, etc.

Change-Id: Ia12ece62fc7b42e28f37e191c90c0dead48d40d0
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-10-24 22:56:19 +00:00
Anas Nashif dfa86e2aca sanitycheck: provide option to exclude tags
This will make it possible for us to optimize the list of tests we run, for
example, we could exclude footprint tests from the main run because those are
run as part of the footprint checks later in the CI job.

Use like this: sanitycheck -e footprint

Change-Id: I4e7a3aa6fac2ba1c9c99b356f08459da97fda777
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-24 22:55:13 +00:00
Kumar Gala 8d35760fec board: organize boards based on architecture
Introduce an architecture sorting of boards.  This is to allow for
easier maintenance going forward as the number of boards grows.  It
will be easier for any scripts to know the board/arch mapping without
having to maintain an explicit list of what boards are associated with
which arch.  We can also do things like have architecture maintainers
cover reviews and branches for arch/${ARCH} and boards/${ARCH} going
forward.

Change-Id: I02e0a30292b31fad58fb5dfab2682ad1c5a7d5a7
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-10-24 19:59:42 +00:00
Anas Nashif e95abcd310 sanitycheck: add nrf51_pca10028 to buildable tests
Change-Id: I5e3297bfa23870c956b7d89d06c5028020c77087
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-22 16:55:54 -04:00
Andrew Boie 238fe1f60f gen_idt: remove int_vec_alloc bitfield from output
This is no longer used.

Change-Id: I6536076ae3510d66eb26c49d89b865dc82e91e33
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-10-21 23:30:05 +00:00
Anas Nashif 34ffa15669 checkpatch: complain only about actual leading spaces
Change-Id: Ia591966a35765bfc560bd823be488257537e6530
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-19 16:46:41 +00:00
Peter Mitsis 1da807e7a8 unified: Tweak msgq API parameters
- Reorders parameters where necessary
 - Adds alignment parameter to K_MSGQ_DEFINE() for buffer alignment
 - Renames parameters where necessary so they are more intuitive

Change-Id: I0b53105c04109127897bf4790e6908082f82da4e
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-19 14:54:44 +00:00
Maureen Helm d5a252cc35 sanitycheck: Add hexiwear board
Enable build tests for the hexiwear board.

Change-Id: If7bf155bc77da0d2571eb617fb1803ece65e3a96
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2016-10-18 21:42:33 +00:00
Peter Mitsis 578f9111ed unified: Tweak mem_map API parameters
- Reorders parameters where necessary
 - Adds buffer alignment parameter to K_MEM_MAP_DEFINE()

Change-Id: Ifa1a09c62492cd6db8bdd83f31a5ca5ba072b484
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-18 15:31:51 +00:00
Peter Mitsis 2a2b075826 unified: Tweak K_MEMORY_POOL_DEFINE() macro
- Renames to K_MEM_POOL_DEFINE() for consistency
- Adds alignment parameter to align the pool buffer.

Jira: ZEP-926
Change-Id: I6cf0a1ce45c3a0fc5f0675047d8928659df1e75e
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-18 15:30:40 +00:00
Peter Mitsis b2fd5be4dc unified: Rework K_THREAD_DEFINE()
K_THREAD_DEFINE() can no longer specify a thread group. However, it now
accepts a 'delay' parameter just as k_thread_spawn() does.

To create a statically defined thread that may belong to one or more thread
groups the new internal _MDEF_THREAD_DEFINE() macro is used. It is only used
for legacy purposes.

Threads can not both have a delayed start AND belong to a thread group.

Jira: ZEP-916
Change-Id: Ia6e59ddcb4fc68f1f60f9c6b0f4f227f161ad1bb
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-17 17:52:33 +00:00
Sonia Leon Bautista 5606f7f424 check_link_map: Removing unsuported python version.
Zephyr uses python 2.7 by default. Phython3 is breaking windows build.

Change-Id: Id0fdbdce89d63f51a0625f5d1f2f45584ecd4023
Signed-off-by: Sonia Leon Bautista <sonia.leon.bautista@intel.com>
2016-10-15 15:09:55 +00:00
Peter Mitsis e5d9c58301 unified: Tweak pipe API parameters
- Reorders parameters where necessary
 - Adds alignment parameter to K_PIPE_DEFINE()
 - Renames parameters where necessary so they are sync'd
   between header and source files

Change-Id: I4f2367abc28aff646cc90beb9f08bb266e143b0c
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-10-15 07:09:58 +00:00
Allan Stephens ea6cfd1d83 unified: Add legacy DEFINE_TASK support
Allows unified kernel to support legacy microkernel applications
that use private tasks.

Also renames the unified kernel macro for defining a thread
to be consistent with the naming used for defining other kernel
objects.

Change-Id: I667d87056138c45c291dd848344e4051bf9fd1ff
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-11 09:59:16 -05:00
Andy Ross 8d801a5e27 sanitycheck: Remove linker VMA/LMA offset checking
This misfeature can crop up at development time as the linker scripts
are modified, not just as a regression in known tests (c.f. ZEP-955).
So it makes more sense to put it in a check_link_map script inovked
for every build.  Remove it from sanitycheck.

Change-Id: I9c2f47a26a3bc03170b895545476350341e91170
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2016-10-05 09:48:54 +00:00
Andy Ross 4cc228baf6 check_link_map: rewrite in python
Oops, turns out that we don't require perl in all our build
environments.  Rewrite this script (it's tiny) in Python.  Exactly the
same logic.

Change-Id: Icbf4b36ef0b18fca94d54fc7fe5e47343c55c669
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2016-10-05 09:48:54 +00:00
Yannis Damigos 84ae7d83d6 scripts/sysgen: Fix indentation inconsistency
Building samples or running sanitycheck script fails with
the following error using python 3:
Using /home/xekarfwtos/projects/zephyr as source for kernel
GEN     ./Makefile
CHK     include/generated/version.h
HOSTCC  scripts/basic/fixdep
HOSTCC  scripts/gen_idt/version.o
HOSTCC  scripts/gen_idt/gen_idt.o
HOSTLD  scripts/gen_idt/gen_idt
HOSTCC  scripts/gen_offset_header/gen_offset_header.o
HOSTLD  scripts/gen_offset_header/gen_offset_header
CHK     misc/generated/configs.c
CHK     include/generated/offsets.h
CHK     misc/generated/sysgen/prj.mdef
UPD     misc/generated/sysgen/prj.mdef
File "/home/xekarfwtos/projects/zephyr/scripts/sysgen", line 687
  kernel_main_c_out("K_MSGQ_DEFINE(_k_fifo_obj_%s, %s, %s);\n" %
				                               ^
TabError: inconsistent use of tabs and spaces in indentation

This patch fixes the indentation inconsistency allowing building
using python 3.

Change-Id: I51bda9452e7ff97fe9f07544927d76ce981700d1
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-10-03 20:33:28 +00:00
Andy Ross 0f227848b9 link: Add section size validity checker
There are demons hiding in binutils with regard to the size of the
data section that needs to be copied in XIP platforms.  It's easy to
mess up and get a mismatch between the linker data output and the
runtime addresses.  Add a cheap check to discover this early when it
occurs.

Jira: ZEP-955

Change-Id: If1c61fe8712221c6450b5b89f5f8af006b41b3fe
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2016-10-01 01:41:51 +00:00
Jaakko Hannikainen 54c90bcbd5 tests: Add gcov support
If the -C flag is given to sanitycheck, generate gcov files for unit
tests and render them with lcov.

Signed-off-by: Jaakko Hannikainen <jaakko.hannikainen@intel.com>
Change-Id: Ic25eae6a3cfc2c45595bd6aa235df2c483aaf6ec
2016-09-30 21:17:42 +00:00
Jaakko Hannikainen ca505f8452 ztest: Add native building support
This commit allows building tests using the ztest framework without
including Zephyr. This can be used to enable unit testing single
functions, even static ones.

Origin: Original

Change-Id: Ib7e84f4bd9bbbf158b9a19edaf6540f28e47259f
Signed-off-by: Jaakko Hannikainen <jaakko.hannikainen@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-30 21:17:39 +00:00
Amit Kucheria 9b5a4647e0 boards: Rename the nRF52 Nitrogen to 96Boards Nitrogen
Point to a new wiki page for the documentation. The old page can be removed
once this patch is committed.

Change-Id: I2b031bfffe10ec24c41c58d0754f2b14d95f5e53
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
2016-09-30 17:13:39 +00:00
Andrew Boie 4dd1ca2c1a x86: add _init_irq_gate and use it in gen_idt
Change-Id: Id655e5c42ca82e48c5e6d80dcb1c7db8d207eb25
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-09-24 01:23:18 +00:00
Dmitriy Korovkin 3c426888a1 unified: Implement memory pools
Due to the memory pool structure only static declaration of
memory pool is possible.

Change-Id: I4797ed88fd2ac3b7812ff26e552e1745611c4575
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-09-20 22:04:46 +00:00
Andrew Boie 757dae5b7d x86: introduce new segmentation.h header
This header has a bunch of data structure definitions and macros useful
for manipulating segment descriptors on X86. The old IDT_ENTRY defintion
is removed in favor of the new 'struct segment_descriptor' which can be
used for all segment descriptor types and not just IRQ gates.

We also add some inline helper functions for examining segment registers,
descriptor tables, and doing far jumps/calls.

Change-Id: I640879073afa9765d2a214c3fb3c3305fef94b5e
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-09-20 20:46:45 +00:00
Inaky Perez-Gonzalez 00d0e4631b build: use 'vercomp' without relying on it being in PATH
Not every environment has $ZEPHYR_BASE/scripts/ in the PATH, which can
cause conflicts (eg: the test environment doesn't define it to
simplify the build instructions).

Using vercomp as $ZEPHYR_BASE/scripts/vercomp, we remove this
requirement.

Change-Id: I8c390f905907f42d1ba2b4d1378e188705164e13
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-09-15 23:59:15 -07:00
Anas Nashif 5363d14a9e boards: rename Quark SE Devboard to Quark SE C1000
This board now has an official name and will be available soon:

http://www.intel.com/content/www/us/en/embedded/products/quark/mcu/se-soc/overview.html

Jira: ZEP-758
Change-Id: Ia16d33722308cf81471321c3063bdc75055a4d50
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-16 03:10:31 +00:00
Anas Nashif 5e4b62c35c boards: rename Quark SE Devboard to Quark SE C1000 (Sensor Subsystem)
Jira: ZEP-758
Change-Id: I8ee5a2f9e4a6ecbd15214e59321bf27a502ef6ee
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-16 03:10:30 +00:00
Anas Nashif 806ac751d4 sdk: zephyr: check for minimum required version of SDK
Error out when old SDK versions are being used.

Jira: ZEP-584
Change-Id: If3515f38cc75d8a378614ef77d8946ba2d9ab28d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-15 21:17:02 +00:00
Tomasz Bursztyka a6cf6038e3 gpio: Remove obsolete API 1.0 callback mechanism
In 1.0 you could set only one callback on the whole gpio controller. It
was impossible for another sub-system to add another callback, without
overwritting an existing one.

Such API has been obsolete for a long time and no one is using it
anymore. Thus removing it entirely.

Change-Id: I6a17fd99373dc6cef1fa2ebb421e992412d5015e
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-09-14 10:51:09 +00:00
Benjamin Walsh 456c6daa9f unified: initial unified kernel implementation
Summary of what this includes:

    initialization:

    Copy from nano_init.c, with the following changes:

    - the main thread is the continuation of the init thread, but an idle
      thread is created as well

    - _main() initializes threads in groups and starts the EXE group

    - the ready queues are initialized

    - the main thread is marked as non-essential once the system init is
      done

    - a weak main() symbol is provided if the application does not provide a
      main() function

    scheduler:

    Not an exhaustive list, but basically provide primitives for:

    - adding/removing a thread to/from a wait queue
    - adding/removing a thread to/from the ready queue
    - marking thread as ready
    - locking/unlocking the scheduler
      - instead of locking interrupts
    - getting/setting thread priority
      - checking what state (coop/preempt) a thread is currenlty running in
    - rescheduling threads
    - finding what thread is the next to run
    - yielding/sleeping/aborting sleep
    - finding the current thread

    threads:

    - Add operationns on threads, such as creating and starting them.

    standardized handling of kernel object return codes:

    - Kernel objects now cause _Swap() to return the following values:
         0      => operation successful
        -EAGAIN => operation timed out
        -Exxxxx => operation failed for another reason

    - The thread's swap_data field can be used to return any additional
    information required to complete the operation, such as the actual
    result of a successful operation.

    timeouts:

    - same as nano timeouts, renamed to simply 'timeouts'
    - the kernel is still tick-based, but objects take timeout values in
      ms for forward compatibility with a tickless kernel.

    semaphores:

      - Port of the nanokernel semaphores, which have the same basic behaviour
      as the microkernel ones. Semaphore groups are not yet implemented.

      - These semaphores are enhanced in that they accept an initial count and a
      count limit. This allows configuring them as binary semaphores, and also
      provisioning them without having to "give" the semaphore multiple times
      before using them.

    mutexes:

    - Straight port of the microkernel mutexes. An init function is added to
    allow defining them at runtime.

    pipes:

    - straight port

    timers:

    - amalgamation of nano and micro timers, with all functionalities
      intact.

    events:

    - re-implementation, using semaphores and workqueues.

    mailboxes:

    - straight port

    message queues:

    - straight port of  microkernel FIFOs

    memory maps:

    - straight port

    workqueues:

    - Basically, have all APIs follow the k_ naming rule, and use the _timeout
    subsystem from the unified kernel directory, and not the _nano_timeout
    one.

    stacks:

    - Port of the nanokernel stacks. They can now have multiple threads
    pending on them and threads can wait with a timeout.

    LIFOs:

    - Straight port of the nanokernel LIFOs.

    FIFOs:

    - Straight port of the nanokernel FIFOs.

Work by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
         Peter Mitsis <peter.mitsis@windriver.com>
         Allan Stephens <allan.stephens@windriver.com>
         Benjamin Walsh <benjamin.walsh@windriver.com>

Change-Id: Id3cadb3694484ab2ca467889cfb029be3cd3a7d6
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
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
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
Vinicius Costa Gomes 37a9a454a4 scripts: Port get_maintainer.pl to Zephyr
Zephyr has for some time the MAINTAINERS file, now we can use it to
programatically display who should be added as reviewer when proposing
a new patch.

Origin: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/scripts/get_maintainer.pl

Change-Id: Ib71aa25e60f230c4c7cd0724c63118f8ec72b229
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-09-12 00:24:13 +00:00
Carles Cufi 5a271f913c build: Use __CYGWIN__ to detect Cygwin
The old __CYGWIN32__ does not work with the 64-bit version
of Cygiwn. Using __CYGWIN__ instead allows us to build
gen_idt.c under 64-bit Cygwin.

Change-Id: I6590767153e929764f0b448f74bb8e3f2e593a6a
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-09-07 12:58:55 +00:00
Carles Cufi d29576b365 kconfig: Specify ncurses explicitely
On OS X (macOS), "make menuconfig" fails with missing
linker symbols. By specifying the "-l" linker options
with the menu, panel and ncurses libraries directly if
the autodetection fails, it builds and links properly.
Note that this might denote a problem with
"check-lxdialog.sh".

Change-Id: Ib2721646cc01c3e977911d8e6d0c8303dcedbc58
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-09-07 12:58:29 +00:00
Andrew Boie ba61200a8f sanitycheck: allow extra arguments to be passed to the build
In some cases, particularly when developing experimental features, it is
useful to be able to pass parameters to 'make' globally for all
sanity checks.

Change-Id: I19eddf222a74064cf6f22ec641fa6b4ff72992e7
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-09-06 22:44:20 +00:00
Tyler Baker 53dffd61aa add ARM GCC embedded toolchain to the list of supported toolchains
The Zephyr documentation states that the ARM GCC embedded toolchain is
supported for ARM platforms so lets add a reference to allow sanitycheck
to build with this configuration. This patch fixes 4b554baa87
("sanitycheck: support for multiple toolchain").

Change-Id: I5578a3c78432219e2ba4d7393899d54c818c5c17
Signed-off-by: Tyler Baker <tyler.baker@linaro.org>
2016-09-06 21:38:38 +00:00
Andrew Boie c545e19a00 x86: remove dynamic interrupts and exceptions
Change-Id: I7e9756e9a0735a7d8257ee2142d5759e883e12cc
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-09-06 18:35:24 +00:00
Andrew Boie 05e3d7f893 sanitycheck: complain loudly about missing platforms
If defconfig files exist under boards/ that don't correspond to
the set of platforms defined in the .ini files under
scripts/sanity_chk/arches, complain about this. We should be at
least compiling all our supported platforms in CI runs.

At the moment it flags 5 boards. Future patches should either add
these boards to the appropriate arch .ini files or remove them
from the kernel.

Change-Id: Id825d6c6bd32089d9f1bead11bc0765685e3771a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-09-06 16:32:03 +00:00
Andrew Boie 7d432bbd0a microkernel: remove deprecated task IRQs
Change-Id: I02264a587b77ae597133b9c52b342b8e5520a131
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-09-06 16:15:59 +00:00
Carles Cufi 8081fd3cf8 kconfig: Use HOST_OS environment variable in Makefile
Since the root Makefile already provides a HOST_OS
environment variable that is exported by using uname,
make use of it in the Kconfig Makefile.

Change-Id: I13655a5295bbcd9f2fdfa8b6309634c1ab143f70
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-09-06 15:15:02 +00:00
Javier B Perez 4b554baa87 sanitycheck: support for multiple toolchain
Added support for multiple toolchain usage.
Every arch contains a list of supported toolchain.
Each board can override the supported toolchain list.
If the board is not supported in the current toolchain,
will be discarded.

The current toolchain is defined by ZEPHYR_GCC_VARIANT.
Added support for toolchain ISSM and ZEPHYR.

Change-Id: I31e9b39ba01f6e9bdc4557702428cd09e05f492a
Jira: ZEP-592
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-08-30 21:44:24 +00:00
Javier B Perez 7941454b70 sanitycheck: filter: add support to use env variables
Added support in the sanitycheck to use env variable
value in the filter.

Change-Id: I76388dc04557dcd31e651d23ae8edf96a8fe2474
Jira: ZEP-592
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-08-29 14:43:01 +00:00
Anas Nashif 93d47e6925 sanitychecks: update release data
Change-Id: I47c519532d8a5be401c04c3175e3f606fcf005f3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-08-26 17:12:15 -04:00
Andrew Boie 26f37bab4c build: xtools: fix 'make qemu'
Brew places QEMU in /usr/local/bin.

Change-Id: I6de8bb93e85e0ded9d471972596d38800615b793
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-26 02:04:37 +00:00
David B. Kinder 8e4275298c grub: Tweak build_grub.sh for proxy issues
Using git clone with git: protocol requires proxy settings
that can be a problem that doesn't happen with http: protocol

Change-Id: I4c02289f5c15494c31d4cca0849bf3093b602125
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2016-08-23 13:20:52 +00:00
Andrew Boie 88af1573f2 sanitycheck: arc.ini: add em_starterkit to sanity runs
The per-platform blocks were just specifying defaults and didn't
need to exist.

Change-Id: I9f4c7db4cd16417d5a2c172c3f850f7758dcbd00
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-12 09:36:29 -07:00
Genaro Saucedo Tejada 2968b3644c sanity: non utf-8 characters are tolerated
Sanity check script was not handling non utf-8 characters as a result
it crashed and didn't kill qemu and test used to hang.

Now tests fail upon untranslatable bytes.

JIRA: ZEP-673

Change-Id: I885a185e0481083501fce15cd51412bfdd26a7d7
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-08-10 14:31:57 +00:00
Ricardo Salveti 26b9140b9f sanitycheck: add nrf52_nitrogen and nrf52_pca10040
Enable build tests for the nRF52 Nitrogen and nRF52 DK platforms.

Change-Id: Id099167c38a49aa8d9a8a8cb0ed71a9a938e2a46
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
2016-08-05 20:59:02 +00:00
Andrew Boie 4760753ab0 Revert "microkernel: remove deprecated task IRQs"
This reverts commit d73a9bb9c6.
The patch was intended for 1.6.0 release.

Change-Id: Id42058b746a3d2a54e4b1a2983eb58bd10b1ed40
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-05 20:37:25 +00:00
Andrew Boie d73a9bb9c6 microkernel: remove deprecated task IRQs
Change-Id: I06393c8ee0e864105cd0183c92e453638679fe81
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-05 16:55:42 +00:00
Paul Sokolovsky 38e3e0b812 Makefile.toolchain.zephyr: Test CONFIG_TOOLCHAIN_VARIANT robustly.
Current code tests treats "" (quotes included) as an empty value for that
varible (as coming from Kconfig). However, that file also used to
integrate with build systems for 3rd-party components, e.g. as examplified
by samples/static_lib, and in that case it will be just an empty string.
So, first strip surrounding quotes, then test for empty string.

samples/static_lib: Update for recent Makefile.toolchain.zephyr changes.

Makefile.toolchain.zephyr is 2-pass now, so needs to be included twice.
ARCH needs to be defined *before* including it. Otherwise, just used
CROSS_COMPILE and TOOLCHAIN_CFLAGS set by it.

Change-Id: I56e963d0d107c77390395682d60400cf6ca62337
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2016-08-04 18:31:12 +00:00
Andrew Boie b6612f459b altera_max10: default to UFM flashing
Flashing issues have been resolved. The build system support for
flashing and debugging has been changed back to UFM scenario.
XIP and reset vector no longer disabled. Wiki documentation updated.

Change-Id: Iffe326485c20808dabc1e19e0b18b7b60a83d797
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-28 22:25:48 +00:00
Andrew Boie 12244a3a8e sanitycheck: allow deprecated APIs
sanitycheck is set up to error out on any compiler warnings.
However in the case of deprecated APIs, we may feel compelled
to still test them while they remain in-tree. Don't fail the
build if deprecated APIs are used during sanity runs.

Change-Id: Ic3196896689706d308117e693ab720713d67d698
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-28 21:48:23 +00:00
Kumar Gala 0bf30b0b9d toolchain.gccarmemb: Cleanup Makefile
Simplify setting of CROSS_COMPILE to just a single line.

Change-Id: I6bb00b404b23011e93897c7cb4a882f2f043c973
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-07-28 14:08:49 +00:00
Juro Bystricky f25ac092b9 Makefile: Restructure for multilibs
Several Zephyr SDK toolchains support multilibs.
Instead of hard-coding locations of the libraries, the proper/cleanest way
is to query the GCC compiler for the locations of libgcc and libc.
However, in order to do this, we need to ensure a certain order of
initialization in the Makefile:

1. Determine CROSS_COMPILE.
   We cannot determine LIB_INCLUDE_DIR, TOOLCHAIN_CFLAGS yet, as we don't
   know the KBUILD_CFLAGS yet.

2. Calculate KBUILD_CFLAGS using CROSS_COMPILE
   KBUILD_CFLAGS often need the compiler to validate options, i.e:
   KBUILD_CFLAGS += $(call cc-option,-mabi=aapcs -mthumb -mcpu=cortex-m0)
   However,  LIB_INCLUDE_DIR, TOOLCHAIN_CFLAGS should not be needed for this

3. Finally, using CROSS_COMPILE and KBUILD_CFLAGS determine LIB_INCLUDE_DIR,
   TOOLCHAIN_CFLAGS by querying GCC using -print-libgcc-file-name and
   -print-multi-directory command line options.

This change should only affect Zephyr SDK toolchains, all other toolchains
are expected to function as before.

Change-Id: I27b460d46fe65d05fcb8bafb51cd6b3deba275ed
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-07-27 17:15:56 +00:00
Andrew Boie 0d03e32036 gen_idt: add -d switch for extra debug info
Previously, gen_idt's code had to be modified to get this information.
We now print it by default when building with V=1

Change-Id: I31bd6c5b851d6280ebcedaab97bd02b8331a2f24
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-27 14:42:27 +00:00
Sonia Leon Bautista 616e96242b scripts: Check all CONFIG_* in the code are defined into a Kconfig file
checkConfig script scans all '*.c', '*.h' and '*.S' looking for all
kconfig items used into the Zephyr Code and validates if they are
defined into any '*.kconfig' file.

to execute script use:
*to run with default values:
	$ checkconfig.py
*to run and get complete log of all symbols used:
	$ checkconfig.py -c
*to run from a diferent subdirectory, not zephyr base, like
 drivers/grove
	$ checkconfig.py -s drivers/grove
*to run and exclude some directories for verification:
	$checkconfig.py -e drivers

*to get more help about how to run script:
	$checkconfig.py --help

Change-Id: Ia8ddda8b560305eb73224c55645729a40fcb5863
Signed-off-by: Sonia Leon Bautista <sonia.leon.bautista@intel.com>
2016-07-22 23:27:08 +00:00
Andrew Boie 56dded4435 qemu_nios2: run sanity checks with the emulator
Requires SDK 0.8.1

Change-Id: I2384508897bcd9f7a3d19962853f642c4ba815f4
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-21 16:32:19 +00:00
Jesus Sanchez-Palencia 288f6cc889 build: Improve usage of the ISSM toolchain
With this fix now we can use the ISSM standlone toolchain [1] through
ZEPHYR_GCC_VARIANT=issm and ISSM_INSTALLATION_PATH=/path/to/toolchain
variables only, without the need of setting IA_VERSION and ARC_VERSION
always. These are always the same for a given toolchain release.

This is also a way for us to document the currently supported (and
tested) toolchain version.

Tested on Linux only.

[1]
https://software.intel.com/en-us/articles/issm-toolchain-only-download

Change-Id: I6fba8ea9564b2080bd73b627bc7150863401f18d
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
2016-07-21 02:48:03 +00:00
Kumar Gala 1c0bcc8cc5 toolchain.gccarmemb: Simplify setting of libgcc include path
Utilize the gcc -print-libgcc-file-name to determine the path to
libgcc.a.  Using this also resolve issues if we are building with
floating point and the various ABIs to pickup the right lib.

We can also simply a few Makefiles and remove the need to export
_CROSS_COMPILE_arm_isa.

Change-Id: I293394c921c18fa4984173ba51825d6f9a333697
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-07-21 02:42:56 +00:00
Andrew Boie 5512105562 sanitycheck: add -R to build all tests with assertions
Some tests individually enable assertions; this forces them on
for all tests. Intended for use with daily builds. Disregard
footprint or benchmark data with this enabled.

Change-Id: I7a0822432d5cab7f3ab0767faf214fde536cd68e
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-20 23:41:05 +00:00
Andrew Boie 50131a3d0e altera_max10: support 'make flash' and 'make debug'
For both of these, we send the .elf binary over the JTAG and it gets
written directly into SRAM. The CPU boots the image from the entry
point (__start).

This does not provision the kernel onto device's User Flash Memory
(UFM). Implementation of this is still in progress see ZEP-273.

Change-Id: Iae8188a21e4a3eecfda0f4f0bb220c0607d719cb
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-12 18:09:57 +00:00
Allan Stephens c002401295 sysgen: Cosmetic cleanup of memory pool generation code
Does renaming of variables and comments to conform to the
"block set" and "quad-block" terminology now used by the kernel's
memory pool code. (Note: This renaming also includes names of
some variables generated by sysgen.)

Change-Id: I8e04cb1ee9ca83daddb487b477da7dd2e1004fd8
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 23:04:41 +00:00
Allan Stephens c0fd08e82d kernel: Rename private memory pool types
Revises the names of 2 types to make them better reflect the
data structures they represent, namely:

- block set: a collection of memory pool blocks of a given size
- quad-block: four contiguous memory pool blocks of a given size

Change-Id: I3e424586e97157eea185fba6836e2e89d10d9cd6
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 23:04:39 +00:00
Allan Stephens 569d08a940 kernel: Eliminate unused memory pool structure field
Eliminates the memory pool field indicating the size of the
pool's memory buffer, since it isn't used anywhere.
(Anyway, it could be computed by multiplying the maximum
block size by the number of maximum-sized blocks.)

Change-Id: Ia11554bdc2b246a1ba0ea33f05c5e6ce6a32ca13
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 23:04:39 +00:00
Allan Stephens f31b9a377d sysgen: Enhance comments describing generation of memory pools
Change-Id: Ie4a52e110075854dfac2a9e2c32fc8ae8b9e287e
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 20:31:32 +00:00
Allan Stephens 06dc3090d5 kernel: Eliminate unused memory pool structure field
Eliminates memory pool field associated with a capability that was
never implemented. (This field was initialized, but never subsequently
referenced.)

Change-Id: I58cf8c4bb846a66b4c8754654ffc3ff55abcff7f
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 20:31:32 +00:00
Andrew Boie 3316e4c6fc gen_offset_header: don't force 32-bit build
It's not clear why this was forced in the first place.

Change-Id: I95c5e21ac0861a7b224ac9715bc5691c97922fe4
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-08 20:31:02 +00:00
Andrew Boie 9557f0306c gen_idt: don't force 32-bit build
We no longer assume pointer sizes are the same between host and
target, and use stdint defintions to size things.

Change-Id: Ie4dc41c60d62931fdb3d1764ade01c16a64d0b54
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-08 20:31:02 +00:00
Kumar Gala fc867fde11 RFC: fix to build issue with subdirs
Pushing this to see what fails as its a similar fix to the one Flavio
pushed.  Yet in local building with sanitytest not seeing any issues

Change-Id: If42c13b0c1827fe89fb332ac6c40a14a76553330
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-07-08 17:09:05 +00:00
Inaky Perez-Gonzalez 0fb7abfea5 build: script to filter known issues
This is is a proposal to have a system to filter the output of the
build (compilation, documentation, sanity check and runtime tests)
that eliminates known issues so that whoever sees the output of the
tree can note new issues being added without having to dive on
existing, known ones.

Most common user of this will be the continuous integration system, to
decide what is shown to gerrit as feedback to the user who submitted a
change.

The rationale behind having it in the tree is that if somebody submits
code that introduces a false positive (due to tool limitations) or as
an accepted (normally minor) issue to be fixed later, it can also
submit a "filter" for it without breaking CI.

For example, consider the documentation workaround in include/uart.h
(that will be reverted when this is done):

  diff --git a/include/uart.h b/include/uart.h
  index a30b211..178bd5e 100644
  --- a/include/uart.h
  +++ b/include/uart.h
  @@ -97,7 +97,7 @@ typedef void (*uart_irq_config_func_t)(struct device *port);
    * @param sys_clk_freq System clock frequency in Hz
    */
   struct uart_device_config {
  -       union __unnamed_workaround__ {
  +       union {
                  uint32_t port;
                  uint8_t *base;
                  uint32_t regs;

This introduces a harmless warning in the documentation compilation
process due to a limitation in the tools that will be fixed in future
releases. In the meantime, as they accumulate, it makes more difficult
for people to know if *they* introduced any other warnings (or
errors). The configuration in .known-issues/doc/uart.conf matches that
warning and filters it out (and only that), with enough regex glue to work
around subtle context changes (like line numbers).

The implementation is a Python script that can take the build output
and remove what is being told to ignore by a list of configuration
files, each of which contains a list of single/multiline Python
regular expressions.

Addition of said exceptions is caught by CI: it will trigger a
maintainer being included as a reviewer because the as directed by the
entry for the .known-issues in the MAINTAINERS file.

Change-Id: I7939e0726f2c505481592c3a7f5f40fa3e9c62fd
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-07-01 21:53:44 +00:00
Andrew Boie 0a8a101e6e nios2: enable microkernel sanity checks
All tests are building now.

Change-Id: I96a94733a96a92df445c46add0de94319fbca3a5
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-30 20:56:16 +00:00
Andrew Boie 148924827d sanitycheck: build for qemu_nios2 target
Change-Id: Ibb1c831a49440b0273316fad2f15b7dbe2002d50
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-29 00:08:05 +00:00
Javier B Perez 908926ce36 gen_offset_header: resources leak in pTable
Fixed resources leak in pTable when the lseek command
fails.

Change-Id: I414276399b0d0ca3dee0c18d307ccc2035d66198
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-06-24 20:46:13 +00:00
Javier B Perez 5eecd88011 checkpatch: kconfig: warn about spaces instead of tabs
checkpatch warns about kconfig lines that contains spaces
instead of tabs.

Change-Id: I60aa74072ce424f21db64a7df0804d7d4cbe315b
Jira: ZEP-427
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-06-21 19:50:59 +00:00
Andrew Boie c6d560d198 sanitycheck: build for altera_max10 board
Change-Id: I28084082dcf0401fbafc54bb514aa3cacf7ab8e8
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-10 15:22:42 +00:00
Andrew Boie 3b9302158c nios2: set up common linker script for XIP and non-XIP
We will require 6 variables to be defined by SOC-specific
linker script; these values in turn can be pulled from
defines in layout.h.

To help position code correctly we define two new ELF sections
for this arch, 'reset' and 'exceptions'.

Change-Id: Idffbd53895945b7d0ec0aac281e5bf7c85b4b2c2
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-10 15:22:41 +00:00
Andrew Boie 9280e71ea4 nios2: add flashing/debug scripts
For the moment, NIOS2_CPU_SOF must be set with the path to the
CPU configuration. We are checking with Altera on whether we
can directly check in the binary to the source tree.

These scripts depend on tools provided by the Altera Quartus
Prime Lite Edition. This is available for free but requires
registration on Altera's website to obtain.

Change-Id: Ia6cb6c9e43c3e141807a887cb25c47b370a7d8e9
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-10 15:22:40 +00:00
Kumar Gala 52c987e941 toolchain.gccarmemb: Add include path for newlib headers
We need to expose the path to the newlib headers that are part of the
ARM embedded gcc at ${GCCARMEMB_TOOLCHAIN_PATH}/arm-none-eabi/include
otherwise we get build errors like when trying to use newlib:

lib/libc/newlib/libc-hooks.c:17:19: fatal error: errno.h: No such file or directory

Change-Id: Iedce526d23e54e54b9cefdfa6ca176fe12ed8090
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-06-09 16:22:28 +00:00
Anas Nashif 659ff5002f sanitycheck: update the footprint data
Change-Id: I6686e46a5f3c5649fc1781119f388feb8179b853
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-06-03 12:09:26 -04:00
Andrew Boie 7a87f9f500 expr_parser: support ':' operator
Similar to '==' but compiles the RHS into a regular expression
and attempts to match whatever is in the environment against it.

Change-Id: I7a03452ef88d067b62661d14dc6f42273de436fa
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-02 23:10:07 +00:00
Andrew Boie 99c0f64b34 expr_parser: fix concurrent use issues
Change-Id: Ic9ef5d42f4348ada5c418a36118660e79a1a689b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-02 23:10:07 +00:00
Andrew Boie 5aaf5f1c6f expr_parser: support single-quoted strings
Change-Id: I00af87ac3ebd1d63ceba0bb2c9dcf17f56aa8177
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-02 23:10:07 +00:00
Anas Nashif 89205da16e checkpatch: catch changes to MAINTAINERS file
Change-Id: Iceb85f6e9fb3c66f89383f4d159d3752639356b1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-31 19:09:14 +00:00
Carles Cufi a3a8828af3 scripts: Add the ISA to the path of included libraries
for GCC ARM Embedded

When compiling and linking Zephyr with GCC ARM Embedded,
the path to the libraries to be linked needs to be provided
explicitely for the correct variant to be linked in.

JIRA: ZEP-377
Change-Id: I745aa45c7dde12f1cc5c8ea4380b904e086ed94d
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-05-27 01:38:22 +00:00
Anas Nashif 6361be24bc scripts: add a script to report RAM/ROM usage
Still WIP. Give statistics on memory/flash usage.

Run:
 make BOARD=<board> ram_report
 or
 make BOARD=<board> rom_report

Change-Id: I6b0aee09b89275e12f1cde863d2c0f5b8dfd0409
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-26 15:19:15 +00:00
Anas Nashif de8bc78a5e arc: support microkernel on ARC
Microkernel on ARC works fine, was missing some declarations in the
linker file.
Also enable testing of microkernel with ARC and disable tests where
ARC is not supported yet.

Jira: ZEP-396
Change-Id: I2ac7b8dc0bea22f5d2e24832d9e3afad8df9f580
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-25 22:14:18 -04:00
Anas Nashif 92a12a19ae checkpatch: add option for excluding directories
when importing code from external sources, we do not want to fail
on checkpatch and want to run full sanity checks.

Using --exclude <dir> we should be able to exclude a list of well
defined locations in the tree that carry sources from other projects
with other styles.

Change-Id: I7d321e85eed6bc37d5c6879ae88e21d20028a433
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-23 16:05:42 +00:00
Sakari Poussa d3f625b60e toolchain/xtools: enhance include search path to sysroot
For xtools, add sysroot also to include search path.

Change-Id: I72d37c54eb7f3693d3a207a35802b29b150c84f1
Signed-off-by: Sakari Poussa <sakari.poussa@intel.com>
2016-05-17 20:09:50 +00:00
Juan Manuel Cruz d9b192e5d5 build: Fixes an issue with file permissions on windows
Jira: ZEP-177
Change-Id: Idf6ca12d6cad9467c63fc4ddb8a716b47ec9ad33
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-05-14 15:55:04 +00:00
Juan Manuel Cruz 5516bcaa72 build: Add MinGW dependencies in makefile
Jira: ZEP-177
Change-Id: I5c67b9ed6c279b2b59afd4cd0351df5f0d030533
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-05-14 15:55:03 +00:00
Vlad Dogaru 1cbfbe8426 checkpatch: Remove Change-Id warning
There seems to be no way to configure it, so I've just removed the code.

Change-Id: I35341e8afc0bdfa8b953b833cfb0eecf05b81c16
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
2016-05-05 11:24:06 +00:00
Andrew Boie 3ea7892410 sanitycheck: allow for more expressive filtering in testcase.ini
The old 'config_whitelist' directive in testcase.ini has been removed.
We use the new expr_parser module to parse a 'filter' directive which
is a boolean expression. This gives a great deal more flexibility
in how tests can be filtered.

To keep the tree bisectable, use of config_whitelist in testcase.ini
converted to the new expression language.

Change-Id: I0617319818c5559c0f0569d2fa73d09b681cac51
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-05-04 22:57:39 +00:00
Andrew Boie b4efd548f9 expr_parser.py: simple expression language
Sanitycheck will use this to allow for much more expressive
conditions when filtering test cases based on defconfig values.

Origin: Original code
Change-Id: Icb650a2aa383699e4f2e18f66e853279c02b50e5
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-05-04 22:57:39 +00:00
Arkadiusz Lichwa b670ddaeec scripts/sysgen: Fix indentation inconsistency
scripts/kconfig/conf --silentoldconfig Kconfig
  Using /home/<user>/zephyr.git as source for kernel
  GEN     ./Makefile
  CHK     include/generated/version.h
  UPD     include/generated/version.h
  HOSTCC  scripts/gen_idt/gen_idt.o
  HOSTLD  scripts/gen_idt/gen_idt
  CHK     misc/generated/configs.c
  UPD     misc/generated/configs.c
  CHK     include/generated/offsets.h
  UPD     include/generated/offsets.h
  CHK     misc/generated/sysgen/prj.mdef
  UPD     misc/generated/sysgen/prj.mdef
  File "/home/<user>/zephyr.git/scripts/sysgen", line 461
    kernel_main_c_out("extern int %s(int event);\n"% (event[1]))
                                                               ^
TabError: inconsistent use of tabs and spaces in indentation
/home/<user>/zephyr.git/./Kbuild:51: recipe for target 'misc/generated/sysgen/kernel_main.c' failed
make[3]: *** [misc/generated/sysgen/kernel_main.c] Error 1
/home/<user>/zephyr.git/Makefile:904: recipe for target 'prepare' failed
make[2]: *** [prepare] Error 2
make[2]: Leaving directory '/home/<user>/zephyr.git/tests/bluetooth/shell/outdir'
Makefile:169: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory '/home/<user>/zephyr.git'
/home/<user>/zephyr.git/Makefile.inc:63: recipe for target 'all' failed
make: *** [all] Error 2
make: Leaving directory '/home/<user>/zephyr.git/tests/bluetooth/shell'

Change-Id: Id6dbf7ef1c0b95a68cf4265465a0124c16e6f971
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-05-04 22:51:56 +00:00
Daniel Leung aed8ef4d4c microkernel: events: fix undefined function error
The handler of the microkernel events are not declared properly.
This causes the public event objects to complain about
undefined functions. Fix this by declaring the function
before using it.

JIRA: ZEP-85
Change-Id: I68afe777bad66e010c92e637806a48911b2f52f4
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-05-04 15:16:55 +00:00
Anas Nashif 3905ff4482 update sanitycheck footprint data for the release
Change-Id: I32d8fbf94191d2f1c48cd1d514ed679dfa288a11
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-02 20:50:45 -04:00
Juan Manuel Cruz a0ed1ff1dc build: add arc support to issm toolchain
Jira: ZEP-186
Change-Id: Ib58aaba3020d8db18130f7d73a394a79c972272a
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-05-03 00:02:41 +00:00
Juan Manuel Cruz 2170ca79ff build: support icx llvm compiler
Change-Id: I0bcc1f2e0ea93830e61fb3eaf8b523b7c4e1c301
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-05-03 00:02:40 +00:00
Andrew Boie b2a343dcb0 Makefile.toolchain.zephyr: add nios2 arch
Directory layout per SDK 0.8 structure. Using toplevel libs for
now.

Change-Id: I7852a9def09fb0a5f0a6e496249d2ebb86720d8f
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-27 21:40:18 +00:00
Anas Nashif ce836e2c69 toolchain: move iamcu output format/arch to SoC
Instead of defining the output format in the toolchain environment
setup, define this per SoC that supports the ABI.

This will allow us to directly referencing an installed toolchain
without the need for declaring ZEPHYR_GCC_VARIANT

Change-Id: Icd1a7a21acbf075a51854fb2ebb3ef06788ce9b5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-25 17:01:48 +00:00
Juan Manuel Cruz 0e40db8a3b build: fixes issue in windows Kconfig support
It allows to silently ignore non-existent files.
When using wildcards in Kconfig source files
(e.g. source folder/*/Kconfig), it is possible to refer files
that does not exist. In the previous example, it is possible
that Kconfig files do not exist in one of the folder's
subfolders and it is not a requirement for the file to exist
in each one of the subfolders.

Additionally, it fixes an issue for wildcards in the file name.
If the name contains a wildcard, Kconfig should iterate
over each file included in the wildcard
(e.g source folder/myKconfig.*)

Jira: ZEP-177
Change-Id: I5aa192ca1e2df83461b12a86fe29a98cd95c4256
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-04-23 11:27:11 +00:00
Tomasz Bursztyka fea1c49ba2 gpio: Improve the public API to handle multi callbacks
Many sub-systems might require to set a callback on different pins.
Thus enabling it via changing the API.

It is also possible to retrieve private-data in the callback handler
using CONTAINER_OF() macro (include/misc/util.h).

Former API is still available, and is emulated through the new one.
Using both should not be a problem as it's using new API calls.
However, it's now better to start using the new API.

Change-Id: Id16594202905976cc524775d1cd3592b54a84514
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-22 22:15:12 -04:00
Yannis Damigos 2b8d3626c6 sanitycheck: Add olimexino_stm32 board to sanitycheck
Adds olimexino_stm32 board to sanitycheck.

Change-Id: Icd0e5025bc7a348c7a1a4d18d10d2d1e3a9817bd
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-04-20 22:29:02 +00:00
Anas Nashif 0c8564cacb checkpatch: warn on COMPLEX_MACRO and MULTISTATEMENT_MACRO_USE_DO_WHILE
generates lots of false postives, so make it warn only.

Change-Id: I0b2fedc564c29bff32f7c48702a9ad54a969650b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-19 01:14:39 +00:00
Daniel Leung 00525c2acf sanitycheck: align output for easier visual comparison
() The test names are getting longer so adds more padding.
() Aligns the numerical size numbers for easier visual
   comparison when scrolling in shell.

Change-Id: Id218a641e9d5dffb77bf813ffbd828c48d14020f
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-04-12 12:00:47 +00:00
Anas Nashif 11ee55a6cc openocd: make openocd variables overridable from env
Some boards require a newer version of openocd, this will
allow overriding the default version that comes with the SDK.

Change-Id: I70113182c3a2c8610e3b36542c6057ff3f0df547
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-12 12:00:05 +00:00
cacu 124feb27c5 build: Add a toolchain file for the GCC ARM Embedded toolchain
Change-Id: Iea501d30297123955fd699eb7d53e642949b6af7
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-04-12 11:59:38 +00:00
Andrew Boie 27025e1988 x86.ini: increase arduino_101 priority
The ordering of the list of platforms is in priority order,
as the sanitycheck --platform-limit option chooses the first
N platforms in this list when doing a run. Move arduino_101 to
second position. qemu_x86_iamcu is still top priority as it
can execute code as part of the tests.

Change-Id: I989d91c66a0a741ce8eebe6279ee4512c33eb5e9
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-08 21:37:59 +00:00
Andrew Boie 14ac902633 sanitycheck: fix test names to be same as before
Add the last path information in the testcase root to the
test name, so that there is much less of chance of name
collisions and the reports come out with the same names
as before.

Change-Id: I75ed6ee96251058dd2547e57be31db3c2517a497
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-08 13:31:53 -07:00
Andrew Boie 3d348715d8 sanitycheck: be smarter about scanning for test cases
A recent tree change moved testcases to both the tests/ and
samples/ directory. The default testcase root was just made
the root of the Zephyr tree, which could lead to potentially
long scan times as every single directory in-tree was checked.
For example, it could be very time-consuming to scan everything
under the sanity-out/ dir if -n is used and --all was used in
a previous run.

Now we allow multiple testcase roots to be supplied on the
command line, and by default only scan under tests/ and
samples/.

Change-Id: I8dac747835b87801474e08c236913e04db64f87b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-08 20:09:18 +00:00
Daniel Leung 7f8501090c sanitycheck: add ability to use arbitrary report for comparison
This adds the ability for sanitycheck to use arbitrary report file
for size comparison. This is useful when optimizing binary size.
For example, a report can be generated with master head, and used
as base for comparison.

Change-Id: Id8c61146c498ba62c4cc77a9ef7d390c0fb11487
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-04-08 20:09:11 +00:00
Daniel Leung 6b17007b56 sanitycheck: parallelize binary size calculations
Instead of running nm/objdump and parsing the results one testcase
at a time, do these in parallel to speed up sanity check a bit.

The sanitycheck now requires at least Python 3.2 to run because of
the usage of concurrent.futures.

This reduces build time (--all -b) from 4:30 to 3:08 on 24C/48T
Xeon-E5.

Change-Id: I8e7c1efb2f473c7f2b65658f8ed9a101ed091eea
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-04-08 14:50:20 +00:00
Daniel Leung 1bdc6f8b22 sanitycheck: fix initlevel section being mentioned twice
The "initlevel" section is being metioned twice. It does not affect
the final size calculation, but just remove it just for reader's
sanity.

Change-Id: I0e7d6e82c730631d2c83ca09dde0f675805840f3
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-04-07 00:56:41 +00:00
Anas Nashif 297c920dc7 sanitychecks: update footprint numbers
Change-Id: I66c71f7322e1529d7b5bfda5b29eeb078b13daf1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-02 08:45:16 -04:00
Maciek Borzecki 24f008bd65 sanitycheck: add nucleo_f103rb abd stm32_mini_a15
Enable build tests for Nucleo-F103RB and STM32 MINI A15 platforms.

Change-Id: I26ccdb6edd537f5dfc9c0120e5a6d4ee1ed63dbb
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
2016-04-01 13:12:56 +00:00
Anas Nashif e444363cb9 sanity: add quark_se_devboard to tested boards
Change-Id: I82cefb1baaa0c7174cebcd35c527fec3d133241e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-30 11:04:36 +00:00
Andrew Boie 64f7f3da8d compare_footprint: Python 3 compatibility
The script will now run under either Python 2 or Python 3.

Change-Id: Ia7e6647b2331ff9edfbdec7b7357439f7095a3bc
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-29 11:06:01 +00:00
Daniel Leung 8df10d4584 kconfig: untangle ordering and dependencies
There are two major issues with the kconfig:

() Some of the config options have incorrect dependencies inside help
   under menuconfig. For example, CONFIG_GPIO depends on BOARD_GALILEO.

() Since the SoC and board specific kconfig files are parsed first,
   the help screen would say, for example, CONFIG_SPI is defined at
   arch/arm/soc/fsl_frdm_k64f/Kconfig. This is incorrect because
   the actual config is defined in drivers/spi/Kconfig.

These cause great confusion to users of menuconfig/xconfig.

To fix these, the SoC and board defaults are now to be parsed last.

Note that the position swapping of defaults in this patch is due to
the fact the the default parsed last will be used.

And, spi_test is broken due to the fact that it requires
CONFIG_SPI_INTEL_PORT_1, but never enables it anywhere. This is
bypassed for now.

Origin: refactored and edited from existing files
Change-Id: I2a4b1ae5be4d27e68c960aa47d91ef350f2d500f
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-26 20:36:32 -04:00
Daniel Leung c6390d559f kconfig: prefer default values that are defined later
This is in preparation to move SoC and board kconfig defaults
to be parsed later.

Change-Id: If24bdf310dac7034da63f34c0e2add173fe75844
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-26 20:36:32 -04:00
Daniel Leung 4babac063c kconfig: add a debug option to print defaults in menuconfig
This adds a debug option to print defaults and their conditions
inside config description under menuconfig/xconfig. This aids in
debugging of kconfig creation.

Change-Id: Ie651435f6b2115dac1bd3a6f7a1b3c2df3c9b0ed
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-26 20:36:32 -04:00
Andrew Boie e57a1e5622 sanitycheck: don't require arch.ini blocks for every platform
If the arch ini file doesn't have a specific block for the platform,
just assume all defaults.

Change-Id: Id6ab1ede8936bdd6006a5c4fd2f9a4f6aaf42478
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-23 15:35:38 +00:00
Andrew Boie 821d832f6d sanitycheck: allow N platforms per arch to be run
It is an unfortunate fact of life that our CI machines are often
severly underpowered virtual machines that take quite some time
to run sanitycheck --all. The only other option was to just use
the default test case filtering semantics which chose one platform
per arch to test.

Now it is possible to specify N platforms per arch with the new
--platform-limit option, allowing greater flexibility on how many
tests will be run.

The counter-intuitive use of '--platform all' or '--platform default'
is no longer supported as these use-cases are covered by other
command line options.

Change-Id: I45b0050df52e1a22e75534a3876d89e3c77698c9
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-23 15:35:38 +00:00
Andrew Boie ca094b1691 sanitycheck: enable qemu_x86_iamcu and prefer it over qemu_x86
Rationale for defaulting to IAMCU variant is that our most
interesting x86 boards use this calling convention. --all
will test both.

Change-Id: Idaddfec51a74ae85691d348adeeb88a8528060ea
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-12 02:24:51 +00:00
Andrew Boie e79c960dd8 HACK: qemu: change e_machine for IAMCU binaries
For some strange reason IAMCU sets e_machine to 0x06 which causes
QEMU to freak out. This is just x86 code with a different C
calling convention, hack it back to 0x03 (EM_386) before running
under the emulator.

Change-Id: Ia5d51b771cad41f3013eb3d6a17912c8909c9bac
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-12 02:24:46 +00:00
Juan Manuel Cruz 08ed2fc106 debug: adds object tracing capability to microkernel events
Change-Id: I227fd996fa4046efe48b7383a60d3ac01ec9f946
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-03-11 22:13:04 +00:00
Juan Manuel Cruz caa17577ef debug: kernel's object tracing api
Restructure the kernel's object tracing implementation
to provide a public API that allows debug tools to use
the debug hooks easier and allows kernel developers
to extend the kernel's object tracing scope and include
new kernel objects easier.

The API provides the trace list abstraction to keep track
of different types of kernel objects. The API contains
a simple single-linked list implementation that allows
to save space and simplifies the access to the data for
debug tools such as gdb.

Change-Id: Ic4d393d584576f67f2c5b706e61bae08869debba
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-03-11 12:00:07 +00:00
Jithu Joseph 9e45411a59 memory_pool_heap: malloc/free access over a heap memory pool
Specifying  HEAP_SIZE keyword in an app's MDEF file, results in
creating a new memory pool, which can be accessed using the
task_malloc() and task_free() APIs, which have the usual malloc/free
like semantics.

Expected format in MDEF file
HEAP_SIZE    <value>

Change-Id: I0569cffeecf8a2c23c20c7b359256123ece91982
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
2016-03-10 23:19:59 +00:00
Anas Nashif b2b9cdddc6 sanitycheck: updated footprint numbers
Change-Id: If73457fac32edf1b2e1b4192c6f266a050bbb6be
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-05 06:57:32 -05:00
Andrew Boie 4900aecc8e gen_idt: correctly warn on duplicate IRQ connections
Now if you try to call IRQ_CONNECT() multiple times on the same
IRQ line it will correcly fail the build, as intended.

Change-Id: Ia629ae3dd009bd3a2e1dbd9797dc2b723b02d234
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-03 10:24:25 +00:00
Andrew Boie 8f0211dcf3 sanitycheck: fail on footprint analysis of stripped ELFs
These don't have necessary symbol information to determine if the
kernel is XIP or not. Fail instead of giving bogus data.

Change-Id: I87f6eeb5983f5275929e5b8d448a054b83e23d8f
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-03 10:24:06 +00:00
Andrew Boie 08ce5a5da7 sanitycheck: use Python 3
Python 2 isn't supported anymore and doesn't get fixes/updates.
For the long-term maintenance health of sanitycheck, convert to
use Python 3 interpreter, which mostly involved changes to how
strings are handled.

Change-Id: Ic42f5b2328001f04d876fd650986c4433968a76b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-24 17:10:39 +00:00
Andrew Boie 411a97c5d0 sanitycheck: correctly treat linker warnings as errors
Change-Id: I2fc82fe83d91121d2228251d9fba8a61ba33b63e
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-24 17:08:56 +00:00
Anas Nashif e7ee08338b checkpatch: fix SPACE false positive
Fix issue where a space is required after a comma:

-:245: ERROR:SPACING: space required after that ',' (ctx:VxB)
+	SECTION_PROLOGUE(_NOINIT_DMA_SECTION_NAME, (NOLOAD OPTIONAL),)

Now we will ignore such errors if the comma is followed by a ).

Change-Id: Ib38161cd11e650764c319ba373a1f7c1a6d80df6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-22 19:11:41 +00:00
Anas Nashif 76b0913a33 checkpatch: update checkpatch to latest from upstream
Update to commit 6b10df4257367dd0ead49f88df473972c00a8b5c from the Linux
kernel, relevant changes since last update:

 - checkpatch: fix a number of COMPLEX_MACRO false positives
 - checkpatch: improve macros with flow control test
 - checkpatch: warn when casting constants to c90 int or longer types
 - checkpatch: improve the unnecessary initialisers tests
 - checkpatch: improve tests for fixes:, long lines and stack dumps in commit log

Change-Id: Ic4f8d925cd7c076e18eb2f2841913be61239aac2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-22 19:11:23 +00:00
Anas Nashif 1e57226ae6 boards: remove obsolete CTB board
This board is not supported and not available for general public.
Use the Quark SE CRB/Devboard instead.

Change-Id: Id0f8c08bbacb812ef00fe9502b4acecf4f31ffd7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-17 17:07:08 +00:00
Anas Nashif 1b6140cc92 sanitychecks: update releas data after restructuring
We have moved tests around, update the files to get accurate footprint
changes per test case.

Change-Id: I563acef4665cb0ab6d3e7e01050a3a49f98b8b9d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-12 22:41:46 +00:00
Dan Kalowsky 50d24833b0 correcting issues identified by coverity
Change-Id: I0bec297b2db36ddd70d754c90ab8396e0890d2ca
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-12 15:48:48 +00:00
Juan Manuel Cruz 99198e794a kconfig: adapt kconfig to work with mingw
MinGW have small conventions differences in the
call of some APIs. The following differences are
addressed:
- mkdir method parameters
- printf format for 64 bit integers
- utsname structure
- glob library

MinGW does not provide glob library.
This patch adapts the code to avoid this library when
building for MinGW on windows systems.
The new routines allow windows to support wildcards
(*, ?) on Kconfig paths.

zconf.lex.c_shipped is the file that the build system
compiles by default. If the user defines the
REGENERATE_PARSES environment variable for the build,
then zconf.lex.c_shipped is generated from the file
zconf.l. Both files are provided in the patch
to keep coherency with the REGENERATE_PARSES option.

Change-Id: I5b6ad24ead0521913ab6ea9da93551edcd2dc66b
Signed-off-by: Louise Mendoza <yonattan.a.louise.mendoza@intel.com>
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-02-12 03:04:13 +00:00
Anas Nashif a7c4aa2e8a sanitychecks: add new keyword 'kernel' to testcase.ini
Specify the kernel being tested instead of relying on parsing
Makefile for KERNEL_TYPE.

This is needed for testcases that build for multiple kernels.

Change-Id: Ic4df2fa66eee4cd498955aee2b0da80a99d35e30
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 02:23:26 +00:00
Anas Nashif d93cb67109 scan for testcases in root to cover samples and tests
We have test cases in both samples and tests directories,
so cover both by scannining the root directory.

Change-Id: I5258d11b23ced2cc4fc88af4d40269310442dc9f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 02:23:00 +00:00
Peter Mitsis 32151afbda arm build: Select correct library version
The build system now pulls in the correct intrinsics libraries
when building for Cortex-M CPUs.

Change-Id: I55ed249cdeb04de8843ad4cdc0099e7031e368b0
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-11 01:13:49 +00:00
Andrew Boie 6bb087c511 sanitycheck: add testcase.ini field for slow tests
Some tests take a very long time to complete, add a directive in
testcase.ini to mark them as such. Unless --enable-slow is passed
on the command line, these tests are not executed, only compiled.

app_kernel and test_sha256 marked as slow test cases. It appears
test_sha256 was being skipped earlier due to platform_whitelist line
which has been removed; the test should be able to run on all
microkernel-supporting boards. Same with test_aes, which completes
very quickly and is not marked as 'slow'.

Change-Id: I39ec8212f3fa10122ff786c10b6659d22bae64e3
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-10 22:12:55 +00:00
Daniel Leung f42664554e sanitycheck: enable build tests for Arduino Due
This enables sanitycheck to build for Arduino Due.

Note that there is no on-board bluetooth so bluetooth tests
are skipped.

Change-Id: I4f564e68ec65f01b7b33a32f6d0d7749290c0e5b
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-10 01:35:33 +00:00
Andrew Boie 9fc3afc339 x86: rebase priority levels
Having priority levels 0 and 1 reserved on x86 due to implementation
details on how the CPU uses the vector table is confusing to users,
and makes it unnecessarily difficult to share drivers between arches.

Now on x86, priority levels 0 and 1 are available. Semantically, all
priority levels have had 2 subtracted from them.

It is no longer necessary to specify a priority level when the
vector itself is specified. If an IDT entry has a specific vector
associated with it, any priority argument is simply ignored.

In gen_idt, some simplifications have been made:
- The printed representation of a generated entry now fits on one line
- Some checks being done in validate_priority() were redundant, as
  generate_interrupt_vector_bitmap() also ensures that there are
  sufficient free vectors within a priority level.

Change-Id: I26669d8ee0a53f48fbc2283490a8c42d8b1daf8e
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-08 21:45:07 -05:00
Javier B Perez 108aaf89ec compare footprint: fixed script to run in bash shell only
When you run the script in another console, no bash, the script
won't be able to run the sanitycheck due to the source.

Change-Id: I89d1f0a4e0ae9f8b0bf0cea77e3752c5a1012840
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-02-08 09:19:19 -06:00
Anas Nashif b14104f81a sanitycheck: update footprint data for release
Change-Id: I1c9a1a18c04ca449a7cc398c5c6487979270e11e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:33 -05:00
Louise Mendoza 9f39a8aee9 build: fix fixdep warning.
The data type returned by sizeof in windows is different to Linux.
This commit cast the value to the largest type to avoid a warning
when compiling on MinGW and Linux.

Change-Id: I4ce50f0b62dd614b1d180adea5aa2679032643e0
Signed-off-by: Louise Mendoza <yonattan.a.louise.mendoza@intel.com>
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:25:31 -05:00
Anas Nashif a49762ccce add debug/debugserver support
Change-Id: I114994cb092870cd57b8e43b197d56ab8ca7db20
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:30 -05:00
Anas Nashif 54634d6a43 add support for debugserver
Change-Id: Ib22d9c06ba7816c3b870973d16e1c25229f31e1f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:30 -05:00
Anas Nashif c0ddcb7a49 Revert "Change the try-run option as disable by default."
This reverts commit e3c2477c52f792ec972f9715ac9a810e52bc9929.

This was done for windows build support. We can disable this for
windows individually instead of disabling it for everyone.

Change-Id: I8bd322b024c0471f89e83a41589c03783c0f9893
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:30 -05:00
Louise Mendoza 8905bdb49f build: add support for mingw32 zephyr toolchain
The toolchain provided by Yocto has a specific path location.
The linux toolchain home directory after the installation is
sysroot/i686-pokysdk-linux meanwhile the mingw toolchain home
directory is sysroot/i686-pokysdk-mingw32

Change-Id: I2241a996897539c2c630c6e391f5125b51385b8e
Signed-off-by: Louise Mendoza <yonattan.a.louise.mendoza@intel.com>
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:25:30 -05:00
Anas Nashif 416525849a toolchain: add support for external libc on arm/arc
Both ARM and ARC did not have the right include path defined.

Change-Id: I8322b49ffa1830ef7b06cddef686ceb83a85fdfa
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:29 -05:00
Anas Nashif 51be9a50a4 Add flash support for boards using latest SDK
Using the latest SDK (0.7.2) you can flash directly using make
by specifying the board, for example

make BOARD=arduino_101 flash

This will build and flash the generated binary to the board.

Change-Id: I90254abd69874efbb449ef318079958980c23074
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:29 -05:00
Andrew Boie 2ee9aca31a irq: size _irq_to_interrupt_vector_table
Most systems have far less than 256 IRQ lines available, so
save some bytes in ROM by making this a config option.

On systems with MVIC, omit the table entirely as the mapping
is fixed.

The build cmd_gen_idt is slightly easier to read and will fail
immediately if any of the commands in the sequence error out.

Change-Id: I411f114557591e5cd96b618e6f79f97e8bedadf0
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:25 -05:00
Anas Nashif e3401c9496 toolchain: remove yocto variant, now using zephyr variant
Change-Id: I976f1e47a4fa80030878da1568dc71289bbd8e0f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:23 -05:00
Peter Mitsis 8e35cc8eb4 build: Add C++ support
Adds C++ support to the build system.

Change-Id: Ice1e57a13598e7a48b0bf3298fc318f4ce012ee6
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:23 -05:00
Peter Mitsis a74d5d63f1 test c++: Recognize init_array as a valid section
Updates the sanitycheck script to identify the "init_array" section
as a valid section in the image.

Change-Id: I55c20909d3734e68e8ec319e1abde94da93665a1
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:22 -05:00
Anas Nashif 06e78de681 build: do not use link-zephyr
Use makefile targets to build and link final binary. This removes
dependency on a shell script which is not portable and imporves
dependency tracking when building.

Change-Id: Ib75f162cdb1dde35ccaf980658bfe70daaf581b6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:15 -05:00
Anas Nashif 3bdae61cac build: remove unused linux related code
- Modules are not a feature of the Zephyr kernel.
- genksyms removed, not used by zephyr
- bin2c remove, not used in zephyr

Change-Id: Ic8f0e786530dcf410b07d6c5cc47f1087000d528
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:15 -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 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
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
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 4cc935d4f0 build: update xtools configurations
Update the crosstool-ng .config files to build the most recent
gcc compiler (5.2.0) and update the configuration of the xtools
variant to use this compiler.

Change-Id: I8c895943a9db8637abf294da36df35040ae7527f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:13 -05:00
Anas Nashif 0b18055b4c rename fsl_frdm_k64f -> frdm_k64f
Shorten the name and remove the vendor prefix. No need to add
vendor to board names.

Change-Id: I68d441121c4034276706da63d7e5420ddf317149
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:13 -05:00
Louise Mendoza 264617c83d Adapt fixdep to works with MinGW
MinGW does not provide mman nor arpa/inet.h library.
This patch modify fixdep to work with windows without
using those library.

Change-Id: I3908735d0d989b165f2adb70b21f4cd41c8e15a6
Signed-off-by: Louise Mendoza <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:25:12 -05:00
Louise Mendoza 2386328e7e Adapt gen_offset_header to work with MinGW.
This patch change the custom macro WINDOWS for the macros
provided by the compiler to determine if it is being build
on Windows or Linux to use the correct flags for opening files.

Change-Id: I7278439767e93754eaae831b6f234b48c3ac8eac
Signed-off-by: Louise Mendoza <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:25:12 -05:00
Daniel Leung efeb9b6534 update tests due to recent board files shuffle
() Adds board arduino_101, arduino_101_sss to sanity check.
   This will build the tests against these two new boards
   to catch issues.
() Updates existing sample apps to be arduino_101_sss instead of
   quark_se_ss, due to renaming of boards.

Change-Id: Ic512728d2ce581539bc3ae4c9f6524d5bf01b296
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:25:12 -05:00
Peter Mitsis d6aeec249c rebranding: Remove stray references to VxMicro
Change-Id: I489dcd1a9ee8b8e502907543f284dc46220e5127
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:12 -05:00
Anas Nashif dcf046c72d rename basic_atom with minnowboard
Use a real board name that can run this kernel instead of a generic
name. Basic functionality exits on this board with Zephyr.

Setup of the board is mostly similar to what we have in galileo (EFI
based)

Change-Id: Ic8554f26dcac0dbbbb6d35d863482f6207dc63c5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:11 -05:00
Anas Nashif 1cfc5b3f6f Move defconfig files to the board directory
This commit also renames boards and makes naming consistent between
board name and defconfig files.

quark_d2000_reference -> quark_d2000_crb
quark_se_test_sss -> quark_se_sss_ctb
quark_se_test -> quark_se_ctb

Change-Id: Ibe6a5102edb987fe1d6ce32c8c392a87d45d6951
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:11 -05:00
Anas Nashif c740608ce5 Use BOARD instead of PLATFORM_CONFIG
Change-Id: I14db0087cd705df0db8a911071bc3949b5c79314
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:11 -05:00
Anas Nashif 013e6167a8 build: switch to board based configurations
Define boards based on platforms/SoCs and define them under boards/.
Also unify the naming of all platform, SoC and board files and use
platform.h for platforms and board.h for boards.

Change-Id: Icfeb96479ab5800aca98c80a79bdc3cecd645314
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:11 -05:00
Anas Nashif fdb1daf786 kconfig: add board configurations
First step for adding the new board layer. Create configurations for the
various boards we support on x86 under boards with the new Kconfig variables
defining them.

The board selection is optional, that means you will be able to run

 make menuconfig

and create your own .config and select any SoC.

Change-Id: If08e88e9675d13f0f0501ef6750b9424b15f5dc8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:10 -05:00
Louise Mendoza 988e9eda1f Change the try-run option as disable by default.
When an app fail to run, windows show a pop-up with the errors.
To avoid this pop-up we disable this feature by default

Change-Id: If21f3aaf37555052874ee8e29310e955124d2cb0
Signed-off-by: Louise Mendoza <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:25:10 -05:00
Javier B Perez Hernandez f55fefe3d0 compare footprint: added error counter and error message for sanity.
Added error log when base or current commit cannot be built.
Removed exit(1) when there are deltas, deltas should not be consider as errors.

Change-Id: I182edab83be14f642086818a9df0be96d8d4ae09
Signed-off-by: Javier B Perez Hernandez <javier.b.perez.hernandez@linux.intel.com>
2016-02-05 20:25:06 -05:00
Anas Nashif 3a87dae54d sanitize use of ARCH/SRCARCH
We now only use ARCH and avoid duplication of the same definition.

Change-Id: Ia61059b906a2ebc31e703412bead948997975d58
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:04 -05:00
Anas Nashif 801874d71f build: remove more unused linux code
Change-Id: Iac7472e6cdf002c850947375db7072f9a0d29e58
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:04 -05:00
Anas Nashif 275ca60b08 Fixed file description and applied doxygen style
Removed old style file description and documnetation and apply
doxygen synatx.

Change-Id: I3ac9f06d4f574bf3c79c6f6044cec3a7e2f6e4c8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:58 -05:00
Javier B Perez Hernandez 89d619b5b2 footprint compare: script to build and compare footprint apps
Added a new script to compare footprint apps and report
RAM or ROM changes in images. Also works without a git tree.

Usage:
./scripts/compare_footprint -h
./scripts/compare_footprint -b 1280bec
./scripts/compare_footprint -c 96acd07

Change-Id: Ib5d212eefe50c0d4650291265d6260604f9cd8c9
Signed-off-by: Javier B Perez Hernandez <javier.b.perez.hernandez@linux.intel.com>
2016-02-05 20:24:57 -05:00
Anas Nashif 621b5b18d8 sanity: update footprint numbers
Change-Id: Icc28e5562b114bcaa6a36effa3f3c75fce9af5c4
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:57 -05:00
Sergio Rodriguez 2e2ad8166e qemu: Creation of QEMU specific platforms
Setting up new platforms to handle emulation, and make them the only
ones able to run on QEMU from the Makefile "qemu" target to avoid
confusion with other platforms. We have now platform qemu_x86 and
platform qemu_cortex_m3, also modification to the sanity checks to have
qemu support only on those platforms

Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
Change-Id: I9291918a1d58fea4f37750ada78234628f9a5d98
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:56 -05:00
Anas Nashif bbe94000e4 quark_se_ss: rename platform and remove arc suffix
This platform if actually a subsystem of the Quark SE SoC and is
not standalone. Use a more descriptive name and remove the architecture
from the platform name.

Change-Id: I16b1ab8dd668441683b07fc4512c219924463441
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:54 -05:00
Anas Nashif 5115fb57ad quark_se: rename platform and remove x86 suffix
Change-Id: I19ac3a4c6081720736c6fbf16b649ccf6ae60e2f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:54 -05:00
Anas Nashif c47769bd56 kconfig: move all defconfig fragments to configs/
When building for a certain platform, we have no idea
what architecture we are building for.

We used to specify the architecture alongside the board or platform
name and this was used to find the defconfig in arch/<arch>/configs.

By putting all board configurations we support in one place we do
not have to specify the architecture, just the configuration name.

Change-Id: Ib7e9f63b9a8051714dc207f583fd26ef620497d8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:53 -05:00
Anas Nashif 24da31f7fa kbuild: support makefile wildcards
Change-Id: I7482899718da02975949c362045b4f09e117c27b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:52 -05:00
Anas Nashif 6e23ff44ef kconfig: support wildcards
This allows using wildcards with kconfig files so there is no need
to include individual files within a well define tree structure.

For example, you add

source "drivers/*/Kconfig"

and all Kconfig files under drivers/ will be sourced and the order in
menuconfig will be based on the wildcard processing, not in any particular
order.

The main advantage here is that drivers and platforms become drop-ins, a platform
or a driver can be added by just placing it in the right place without having to
change system Kconfig files or Makefiles (Makefiles will be supported in other change).

Change-Id: Id223ba10e6f48b4c48435e9ea37885162ce55e7c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:52 -05:00
Yonattan Louise 2ccaed8720 Adapt fixdep to support Windows.
Text files on windows are be created with a different format
for line endings. This commit improves the host tool 'fixdep' to
support files with the windows-style line endings.

Change-Id: I1d120790c5cbb1f1e7df6761821bc7e01c99b988
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:24:52 -05:00
Yonattan Louise b8a0d15784 gen_idt: Change the custom host identifier macro.
In order to keep the code compatibility with Linux and Windows, the flag
O_BINARY is defined as zero when we are compiling in a Linux host. But
when compiling in a Windows host, we have to use the definition of the
flag provided by the host's includes. Currently, there is a custom macro
to identify if the host is a Windows host. This commit change that custom
macro for the macros that compilers provide to avoid defining a new one.

Change-Id: Ifeeab17c68d07039bd5b4a80c8263d338e6448ce
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:24:52 -05:00
Anas Nashif 0c22192c3f quark se: add sensor subsystem platform to sanity
Run sanity for this platform

Change-Id: Ic317c63d720a420d3d02e382e17742dec8d08e07
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:49 -05:00
Anas Nashif c34da1576c sanity: add Quark D2000 and Quark SE
Change-Id: I06494a5a0a3697b6ce9224f7f5c1a86052898b9d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:49 -05:00
Anas Nashif 8ea9d02cdf sanity: add extra arguments when creating defconfigs
When config_whitelist is used in a testcase that has extra
arguments, those were not set correctly and the test case build would
fail in some cases.

Change-Id: Idb8a4f07d29beefe62de932afa7cc0986e8dd1d4
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:43 -05:00
Anas Nashif f80bc35d58 toolchain: update iamcu toolchain version
the iamcu toolchain is based on 5.2.1, update the variable so we
can point to the right path of headers/libraries.

Change-Id: Ia1634efc6fb6a37eb3456d9b7bd3c30e03c40b4e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:42 -05:00
Anas Nashif 98c50de9ff checkpatch: Allow space before [ in the case of inline asm
This allows the customary syntax for declaring named arguments,
such as:

asm ("mov %[out],%[in]" : [out] "=r" (x) : [in] "r" (y));

Since :[ is comple-error-inducingly invalid syntax in other cases,
this won't create unintentional leniency for normal uses of [

Originally from https://lkml.org/lkml/2010/11/16/145 by Dave Martin

Change-Id: Iead3fdb147ba2f6cbd108f19dd348bb72a7e6b6f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:42 -05:00
Anas Nashif 6c625c925f kbuild: remove unused and unsupported GCOV_KERNEL
CONFIG_GCOV_KERNEL comes from Linux, we do not use this feature
in Zephyr.

Change-Id: Ibef77ac4b26f2831b2fbba25e2a4d72899d75974
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:41 -05:00
Anas Nashif 4115d68ef9 link: remove unsupported features
Removing unsupported features that we inherited from Linux kbuild

Change-Id: I7cf19f913b0a7ba6195d2cb9c04b426144bdebb9
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:41 -05:00
Anas Nashif c0078cfb9b Remove linux features in build process that we do not support
Lots of code that is not being used by Zephyr but makes debugging and find
issues related to zephyr very difficult.

Change-Id: If8f6515d68f64b03cc881a9c3cde48c0451fe3b5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:41 -05:00
Anas Nashif 672cb6ba25 Update sanity test results
Run sanitycheck with --release option to generate the numbers for
this release.
This will reset the footprint numbers so that warnings are based on
the latest release numbers.

Change-Id: Ibad9ed4120cd47109eec7a234e70af5b12a2a630
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:37 -05:00
Dirk Brandewie 08cf2157f3 build: Add tags.sh to enable tagging targets
Add tags.sh from the Linux tree.  This file is used by the tags, TAGS,
cscope and gtags targets in the toplevel makefile.

Change-Id: I9b0845dab26dc9b15731888b3d713dd3950eb1d8
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:24:36 -05:00
Anas Nashif 2dba160235 update sanitycheck data
Change-Id: I3cc7337fe2b69ea81ecad355f3af8f38987fec23
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:36 -05:00
Andrew Boie 829c056260 sanitycheck: show absolute size deltas
Change-Id: I0de8446b32ca2def2baceab4fa837a022c82db84
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:24:36 -05:00
Anas Nashif 2bd99bcbdf sanitychecks: add skip keyword for skipping tests unconditionally
In case we want to skip a test for whatever reason without having to change
the other filters or deleting the ini file.

Change-Id: I8af527b1c56b8a2f395cb9ca336162233f150c2e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:35 -05:00
Daniel Leung 949e97aecf sysgen: fix copy-and-paste errors and more empty lines
While adding private object supports, there were lots of
copy and paste. This results in lines writing to kernel_main.c
while it should be writing to sysgen.h. So update those lines
to write to sysgen.h instead, and add more new lines there
so sysgen.h is easier to read.

Change-Id: I38496b58d6dc4ed8a50eab4e09ac7bff8c59026f
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:35 -05:00
Daniel Leung 851c6f8f60 microkernel: introduce private event objects
This patch enables defining microkernel events within source code.
This is similar to other private kernel object patches.

The test has been modified a little bit due to the fact that
the event ID is now a memory address, instead of numeric ID.

Change-Id: Ie3c8d4f4e459d9c631e50bb242cf7a05ca8ea82c
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:35 -05:00
Anas Nashif 8b45f4e50b sysgen: generate sysgen.h instead of zephyr.h
use zephyr.h as the main include in applications, no need to have nano/micro
includes in applications and samples.
Inclusion of the proper kernel headers is be handled in the zephyr.h based
on the configured and used kernel.

Change-Id: If5275cef5d2ad1f475dfb39102cb71cfe5630f6c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:35 -05:00
Peter Mitsis 47888a31db Update static IDT generation to use IRQ priority
Updates the 'gen_idt' tool to generate a mapping of IRQ numbers to
interrupt vector IDs, thereby allowing the IRQ priority to be utilized
when statically connecting an interrupt.

Change-Id: I2e54ceb65145682820dfbd8ca1ee6ec68d71ce1a
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:34 -05:00
Peter Mitsis b2746c9b86 gen_idt: add unspecified macros
Adds the following macros to improve code quality.
   UNSPECIFIED_INT_VECTOR
   UNSPECIFIED_PRIORITY
   UNSPECIFIED_IRQ

Change-Id: Ia51becd39ce9cf07d8a26c15e62f3e3d5673b951
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:34 -05:00
Anas Nashif eab9ee1fbe sanity: update sanity check data
Change-Id: I05816609e9364c7ae5126d87597d703158eed4be
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:34 -05:00
Yonattan Louise 86ea4e6827 OS Awareness: Add microkernel object tracing.
Add a list for each kind of microkernel object. Add the register of
the public objects to the tracing lists in the dynamic initialization
function of sysgen.

Change-Id: I8c413812e4db0f443c9dd3a5501e0096270dc70e
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:24:32 -05:00
Anas Nashif db13998741 toolchain: change section macro to support external c libraries
rename the sections macro to avoid conflicts with the same
macro being defined in sys/cdefs.h of an external libc.

Change-Id: I4d9e060eeff788ca4112c0ad3e98f0bea135f145
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:29 -05:00
Anas Nashif 360682b5b5 toolchain: extend iamcu variant to support provided libc
Change-Id: I2c6681a4ea3a4c8bc2367a5e9d6baeabc5a0dd90
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:29 -05:00
Anas Nashif cbfb62c93d checkpatch: Update to latest version from the Linux kernel
Lots of enhancements and bug fixes but primarily it fixes an issue
where checkpatch was reporting errors in lines that have not changed.

Change-Id: If141a294b92cbabd4ad8978a40168abb062aebfb
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:29 -05:00
Javier B Perez Hernandez f7fffae8aa Change BSD-3 licenses to Apache 2
Change all the Intel and Wind River code license from BSD-3 to Apache 2.

Change-Id: Id8be2c1c161a06ea8a0b9f38e17660e11dbb384b
Signed-off-by: Javier B Perez Hernandez <javier.b.perez.hernandez@linux.intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:24:29 -05:00
Peter Mitsis 5705d06874 x86: Properly initialize _interrupt_vectors_allocated[] bitmap
Updates the 'gen_idt' tool to generate a bitmap of (statically) allocated
interrupt vectors that is linked into the final image in a manner similar to
the static IDT. The kernel then uses this bitmap when dynamically connecting
an interrupt vector, thereby preventing the dynamic irq connections
from clobbering the static irq connections.

Change-Id: I0a8f488408dad4912736865179f32f63ff1ca98f
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:28 -05:00
Peter Mitsis 56fa1a98d0 x86: Update generation of static IDT
Adds two new fields to the ISR_LIST structure (irq and priority) to allow
the decoupling of the vector ID and priority from the IRQ number at some
future time.

As a result of the addition of these two new fields, the gen_idt tool is
modified to both process these new fields as well as validate them.

Change-Id: I343dac68d99c78168a25b19784140f85d5db7578
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:28 -05:00
Peter Mitsis 3dc247825c Refactor gen_idt
Refactor gen_idt tool to detect more errors as well as be both more clear and
easily expanded.

Change-Id: I035a0666871733cc670f64302a1e85be455550ee
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:28 -05:00
Peter Mitsis ad76795063 gen_idt: Fix issues found by checkpatch
Change-Id: Ib486d8453c16c093dd188cd9e84c1eb2282ab746
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:28 -05:00
Peter Mitsis b8780c7813 gen_idt: Update file description section
Change-Id: Ice0c88228f5d79404277502f68594db91058344b
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:28 -05:00
Anas Nashif 6f8d628d77 re-enable compile time option checking and make it conditional
When building a sinle application, use the compiler option checking
macro, disable macro if running sanity checks to speed up build
time.

Change-Id: I63b17f4bd9fdff9030f1b2550ec8b05ee0bc2df2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:28 -05:00
Anas Nashif 2cf0df018d sanity: build testcase defconfigs for config_whitelist
Originally, the config_whitelist was done on the platform level
ignoring any config options in the testcase. This change generates
the defconfig for all relevant testcases that have config_whitelist
and applies filters based on the testcase defconfig.
If we have many testcases using config_whitelist it might be a bit
slower, but it is more accurate.

Change-Id: Ie1e871e85f05196d04419d6cf9a87f9927bfbfd1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:28 -05:00
Anas Nashif 30d1387c5c sanity: add platform/arch exclude functionality
Change-Id: I8af20c04ba8b0872d5196aa166d2479bfa048275
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:28 -05:00
Andrew Boie 9882dcd3d2 sanitycheck: look for misaligned XIP VMA/LMA addresses
XIP is currently implemented in Zephyr by copying only the RW
sections from flash into RAM. For these sections, if the VMA spacing
is different than the LMA spacing the sections in RAM will not be
at the right addresses. Warn about this situation.

Change-Id: I59a55fc27703103e37a7f0bbc34f236047621e0e
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:24:27 -05:00
Andrew Boie 73b4ee69b7 sanitycheck: binary size calculation improvements
- Several recently added binary sections were not being taken
  into consideration, unknown sections now trigger test case
  failure
- Use same VMA/LMA terminology that objdump uses and show both
  addresses

Change-Id: I641eef64aaed6612f62e5aa092f66baaa2797c70
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:24:27 -05:00
Anas Nashif b7881fecfa checkpatch: remove comment about MAINTAINERS file
Zephyr does not have a MAINTAINERS files, so remove the comment
about checking the file when reporting false positives to avoid
confusion.

Change-Id: I915dba009902a68d5e621603d22b7df57d84a1b1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:23 -05:00
Anas Nashif 38c0d1884a sdk: create a new variant for zephyr based on yocto
Introduce a new variant for the Zephyr SDK, do not call it
Yocto SDK anymore.

Keeping the yocto variant for now to avoid breaking developer
setup.

Change-Id: I545693eb4be4cec910096ca2ba7e3f38803b4c8d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:23 -05:00
Anas Nashif 9dbbf2c809 sanity: update baseline for sanity reports
Change-Id: I3f3e527ce783244f789d31f56aa6113c959194c3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:22 -05:00
Juan Manuel Cruz 7fe3dc4510 build: help message config targets update
This commit removes *config targets that does not apply to
the system or that are not implemented

Change-Id: Ib7739fda4085562fbe7d14491b7de9f354d0dc7d
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:24:22 -05:00
Andrew Boie 5d4eb7812b sanitycheck: fix issues if alternate binary name is used
Fixes an issue if CONFIG_KERNEL_BIN_NAME is customized.
There isn't a mechanism to parse the project defconfig, but
as there should be exactly one .elf artifact in the outdir
just glob it.

Change-Id: Ib3d517006dd13ef6e3e10ea3a8e975c287344d56
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:24:22 -05:00
Allan Stephens ddaebc15b3 kernel: Eliminate use of main() in microkernel
Revises microkernel initialization code by incorporating the existing
_k_kernel_init() and main() routines into _main(). This optimizes kernel
initialization a bit, and allows application code to use main()
if desired -- for example, as the entry point to an application task.
The change also eliminates the need for sysgen to generate a routine
whose content is always the same.

This change preserves the existing order of operations done during
kernel initialization, and leaves further improvements for later.

Change-Id: Ie03d8a6f38f8a311f398667ed977fd8478719d70
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:24:21 -05:00
Javier B Perez Hernandez 9ff8875a6c toolchain yocto: Update makefile to use SDK 0.6
Updated bin references in Makefile.toolchain.yocto
with new versions of gcc and locations.

Change-Id: I12e623ebfdf1863b58865fcd7f1eb7413b0f236f
Signed-off-by: Javier B Perez Hernandez <javier.b.perez.hernandez@linux.intel.com>
2016-02-05 20:24:19 -05:00
Alexandre dAlton 3bef343493 linker: add whole-archive flag to app lib
Change-Id: I167b67bb227718d18bc383c4562cccaa915ed22b
Signed-off-by: Alexandre d'Alton <alexandre.d'alton@intel.com>
Signed-off-by: Alexandre d'Alton <alexandre.dalton@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:04 -05:00
Anas Nashif 0073eecba9 merge_config: look for *.config files in app root
Change-Id: Ie0fa2b8ea4560402ce7f07851a2de066924ec8be
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:59 -05:00
Masahiro Yamada 32e1ecb827 kbuild: add generic mergeconfig target, %.config
"scripts/kconfig/merge_config.sh && make oldconfig" works well
enough for merging local config fragments, but Kbuild currently has
the entry points only for "kvmconfig" and "tinyconfig".

This commit provides the generic target for mergeconfig, so we can
manage our own config fragments easily:
put "foo.config" in arch/$(SRCARCH)/configs/ or kernel/configs/,
and then run "make foo.config".

Now "make kvmconfig" is just a shorthand of "make kvm_guest.config".
Likewise, "make tinyconfig" is equivalent to
"make allnoconfig tiny.config".

Change-Id: I9ea4fd21ac46b42c2b6d87ee7eeeff67768bc375
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:59 -05:00
Masahiro Yamada 830c9fbc5c kbuild: mergeconfig: remove redundant $(objtree)
Kbuild always runs in $(objtree).  Actually, $(objtree) is always
set to "." by the top-level Makefile.

We can omit "-O $(objtree)" and "$(objtree)/".

Change-Id: I17eea62cc3b85957572f9f9eb5207caa1a91f881
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:59 -05:00
Masahiro Yamada 61c6277e86 kbuild: mergeconfig: fix "jobserver unavailable" warning
If "make kvmconfig" is run with "-j" option, a warning message,
"jobserver unavailable: using -j1.  Add `+' to parent make rule.",
is displayed.

  $ make -s defconfig
  *** Default configuration is based on 'x86_64_defconfig'
  #
  # configuration written to .config
  #
  $ make -j8 kvmconfig
  Using ./.config as base
  Merging ./arch/x86/configs/kvm_guest.config
    [ snip ]
  #
  # merged configuration written to ./.config (needs make)
  #
  make[2]: warning: jobserver unavailable: using -j1.  Add `+' to
  parent make rule.
  scripts/kconfig/conf --oldconfig Kconfig
    [ snip ]
  #
  # configuration written to .config
  #

Change-Id: Icda8d75af0bb50612cb020874649593c2ed0154f
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:59 -05:00
Masahiro Yamada 8f298d3fe1 merge_config.sh: rename MAKE to RUNMAKE
The variable "MAKE" is used to store the command name that has
invoked the Makefile.  (Actually, it is already set to "make"
if you run this script from a Makefile.)

In this script, however, it is used to determine if Make should be
run or not.  It is not what we usually expect.

Change-Id: I6891ecfc5003b4494d72878fa0da00a6ab452b21
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:59 -05:00
Sam Bobroff 224fa9455c merge_config.sh: exit on missing input files
Add a check for the existence of input files and exit (with failure)
if they are missing.

Without this additional check, missing files produce error messages
but still result in an output file being generated and a successful
exit code.

Change-Id: I8609e00ce99b491dcb1d41e64106a6829dc1fb41
Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:59 -05:00
Masahiro Yamada 15e1669e48 kbuild: mergeconfig: move an error check to merge_config.sh
Currently, "make tinyconfig" does not work with "-j" option.

  $ make mrproper
  $ make -j8 tinyconfig
    HOSTCC  scripts/basic/fixdep
    HOSTCC  scripts/kconfig/conf.o
    SHIPPED scripts/kconfig/zconf.tab.c
    SHIPPED scripts/kconfig/zconf.lex.c
    SHIPPED scripts/kconfig/zconf.hash.c
    HOSTCC  scripts/kconfig/zconf.tab.o
    HOSTLD  scripts/kconfig/conf
  scripts/kconfig/conf --allnoconfig Kconfig
  #
  # configuration written to .config
  #
  scripts/kconfig/Makefile:122: *** You need an existing .config
  for this target.  Stop.
  make: *** [tinyconfig] Error 2

As shown above, "allnoconfig" has created the .config file before
mergeconfig is called, but Make still raises a false alarm because
of some sort of race condition.

We can fix this issue by moving the error check to the shell script.

Anyway, scripts/kconfig/merge_config.sh always requires an existing
.config as a base file.  It is reasonable to check its existence in
the shell script.

Change-Id: I4c6b26bf3b19c5d5b19ed43ee6b553f7a5944c21
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:59 -05:00
Masahiro Yamada 1540777fe4 kconfig: fix a misspelling in scripts/kconfig/merge_config.sh
Change-Id: I5fdbe712db8e15031c8c214c0d4378f8508d03da
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:59 -05:00
Olof Johansson 40cd34e5de merge_config.sh: Display usage if given too few arguments
Two or more arguments are always expected. Show usage and exit if
given less.

Change-Id: I1e503495f34eab3f181238a1aa877a4aee3b7e5e
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:59 -05:00
Daniel Leung 8253b90cfc microkernel: add task pointer list
Due to similar padding issue as pipe, the list of task object
may not be used directly. As mentioned before, some compiler/linker
may pad the large struct. For example, compiling under gcc and
march=i686 pads the struct to 32-byte alignment (march=atom to
64-byte alignment). This causes issue with sizeof() and pointer
arithmetic because they have no idea about the padding.
When the stars align in a certain way, these task structs may be
corrupted. So add a task pointer list and use it for task
manipulation. The task list remains as it is beneficial to group
them together to take advantage of cache locality.

Change-Id: I0e86bfe05742040f4540d7854c1ac14e76162776
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:58 -05:00
Anas Nashif 8976762df8 arc: rename generic platform to generic_arc
The generic name is too generic and when it appears on its
own, for example nano_generic_defconfig, it is not
visible what the file is about, so call it generic_arc the same
way the Kconfig platform is called.

Change-Id: Icf737f305d84142dad4f52fd26a5c7481f9fc5be
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:58 -05:00
Dirk Brandewie e5844a41d5 sanitycheck: add arc architecture
Add ARC to the list of architectures sanitycheck will build against.

Change-Id: Ibf1aa3a167a7a53a59b40bde4442d16f7d7b9611
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:15:58 -05:00
Benjamin Walsh 0f5607a211 microkernel: rename _k_init_node() to _k_init_dynamic()
It was badly named: this routine initializes what cannot be done
statically, i.e. what has to be done dynamically.

We also do not have concepts of "node" anymore since the kernel is
single-node only.

Change-Id: Idde3183ca01ca3f70c5ae0e948734a965582ded8
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:36 -05:00
Anas Nashif 4df6dfe040 sanity: update test footprint data
Change-Id: I7f6e2ef8264077aa2a976bfce393a61bdc7ec99b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:35 -05:00
Andrew Boie b391e66edf sanitycheck: fix -O with relative paths
Change-Id: If4bcfb20113344bd62bcf33ccc594ac9b7c7a7e1
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:15:34 -05:00
Andrew Boie 4ef16c5314 sanitycheck: properly report defconfig build errors
Change-Id: I9122f9c1d8232caa110dd6459c5f7cf2a079e36b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:15:33 -05:00
Anas Nashif cec625afc4 Move sysgen hooks and file generation to top-level Kbuild
Change-Id: Icb06c0e041e08863947c7b31d843771c3f2c6a0c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:33 -05:00
Anas Nashif e927a459cd build offsets in-place and not in include/generated
We have been building offsets.o in the include directory, this
is wrong.

Change-Id: I22e785413158117e1cdfa8353bd7f4d022fae0ac
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:33 -05:00
Anas Nashif e3ac0907df Move scripts/Makefile.<arch>preparch to arch/<arch>
Follow the model of the Linux kernel for adding arch
specific CFLAGS by using the Makefile and Kbuild combination
in the arch/<arch> directory.

This will also allow adding architecture specific targets and is
easy to maintain when alongside the architecture.

Change-Id: If51a78e8845baa71d9090c4a4f49fcd013354840
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:33 -05:00
Anas Nashif fde80d7ead cleanup makefiles and remove duplication
Makefile.inc duplicates many of the existing targets in Makefile.
Instead of duplication, pass all none local targets to Makefile
and implement only those needed locally.

Change-Id: I1e923dd398a138543fa676ab67570b630c75d7ea
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:32 -05:00
Anas Nashif e4fe55c8e8 add script to build grub for galileo
This script will download and build grub.efi which can
be used on galileo for booting Zephyr.

Change-Id: Iba8777ae3868befa3bcd3972813779dbecd9c947
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:31 -05:00
Anas Nashif 9b9ab3767a make sed happy on OSX when invoked with -i
Change-Id: I6180aedf11ec68e9698e48c612d202e39eaa3adf
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:31 -05:00
Anas Nashif bd2274813d use gen_offset_header to generate offsets.h
Using nm and sed works fine on Linux, however when moving to other
platforms, nm and sed do not work the same way and might have
different behaviour. This reduces dependency on host tools and brings
back the code for generating the offsets.h directly using a built
utility that is portable.

Change-Id: I13db1c16cbed12e366fd41d151886bbcbf419548
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:31 -05:00
Anas Nashif 9927108ab7 sanity: update footprint data for release
Change-Id: I4542e55953a99cf00796ee6300779af6c8457e8a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:28 -05:00
Benjamin Walsh bed144b179 microkernel: rename k_proc to k_task
k_proc was a legacy leftover that does not make any sense, since there
is no concept of a "process" in the system. Rather, that data structure
refers to a 'task control block', i.e. the representation of a task
execution context from the microkernel's point-of-view (not to confuse
with the 'struct ccs', the representation of a thread execution context,
from the nanokernel's point-of-view).

Change-Id: Ic29db565af023be629ce740bbcb652ece7dc359f
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:27 -05:00
Anas Nashif 05875f062d toolchain: support toolchain variants
This commit enables the use of special toolchains other than
the default. Some architectures have specialized cross-compilers
within the same SDK that need to be enabled for specific platforms
of an architecture.

For example, for Intel MCUs, we have an optimized toolchain that
needs to be used for specific platforms under x86.

Change-Id: I7e25603dd66ed3ec4e019c72483c76a32b3bbdde
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:25 -05:00
Anas Nashif b2f5c48755 remove shared/ and create files directly
The files idtEnt.h and segselect.h in shared are linked from
the source tree for no good reason adding and extra top level
directory that might be confusing.

The shared/ here means shared between host and target, this is
not longer necessary in our build system.

Change-Id: Id9665e10de7a1d290888d9069be3db9f4330d284
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:25 -05:00
Andrew Boie bbd670c9fc sanitycheck: add -z option for 'truesize' functionality
The sizing code was merged with the sanitycheck script. A new
-z option has been added to simply measure and report sizes
to stdout instead of running any tests.

Change-Id: I1450e3b08e3bd0030d2df00190da884621962d01
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:15:24 -05:00
Andrew Boie ea7928f642 sanitycheck: add --all-deltas option
This shows all changes in size, good or bad. Useful for testing
size optimizations.

Change-Id: I47124b64f7d751120af666a4b7c7efd4bbed4ac8
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:15:24 -05:00
Peter Mitsis 92d1810def Fix typo: occured -> occurred
Change-Id: I40150719135108f18834a35db1c5be7ca4c5c9b2
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:15:21 -05:00
Anas Nashif a8259afed8 allow linking of external application libraries
This will allow building of external components and linking
them at the end of the build process to the main kernel.

add a Makefile.app to the project directory with the required
targets, for example

Makefile.app:

KBUILD_ZEPHYR_APP := /tmp/libapp.a

/tmp/libapp.a:
	@touch /tmp/libapp.a

Change-Id: If2ba6b3ee59023acc5f85c5701b65c4d096d5059
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:21 -05:00
Anas Nashif 8cdd210798 move qemu patch to script/patches
Change-Id: Ib1c85f476901db7164305236e88f157434ebfda1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:21 -05:00
Anas Nashif 7312837c5f mdef: allow mdef file to be at custom location
Right now mdef file of an app can only be hosted in the
application root or under the same tree. This patch
allows hosting the file at custom location outside the
application tree.

Change-Id: I5ffdacb00d29d754d0fdd826c8f190f5a7968905
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:21 -05:00
Andrew Boie 2041d5b227 remove old sanity check mechanism
Change-Id: I754c4db10844d346277e8f47ba99db3c0cd6bc79
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:15:20 -05:00
Anas Nashif 427cdd36ec sanity: add new line when emitting an error
Change-Id: I4075dbe3706b45e926e9ab4d0f620fe262aaa705
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:19 -05:00
Daniel Leung 971eb0ef44 samples/microkernel: add test for private memory maps
This adds unit test for microkernel private memory maps.
The code piggybacks to the public memory map test (by
including the same source file), so any updates to
the test will be applied to both.

Note that the prj.mdef are different for both tests, since
the private memory maps test move the memory maps inside
source code. So, both mdef files will need to be updated at
the same time.

Change-Id: Ia7f65f55b61d9fb0d42ba58d63662e914d69194e
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung 0abe07a0cd microkernel: introduce support for private memory maps
This enable defining memory maps in source code in addition to
defining in MDEF files. This introduces the macro
DEFINE_MEM_MAP(mem_map_name, ...). The memory maps created this
way are the same, in functionality, as those defined in MDEF
files. They can be manipulated by the standard microkernel
memory map APIs.

Define the memory map using:

  DEFINE_MEM_MAP(mem_map1, blocks, block_size);

and "mem_map1" can be used, for example:

  task_mem_map_alloc(mem_map1, ...);

or,

  task_mem_map_free(mem_map1, ...);

etc.

To use the memory map defined in another source file, simply add:

extern const kmemory_map_t mem_map1;

to the desired C or header file.

Change-Id: I9c551b90f9d0a95f961fd8ec1c5278c2ea44312d
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung 201aa8c708 microkernel: put memory map pointers into its own binary section
The _k_mem_map_list was a static array generated by sysgen,
where it containing all pre-defined memory maps from MDEF file.
To support private memory map objects (aka, defining them within
source files), the list has to accommodate memory maps that
are not only processed through sysgen, but also those defined
within source files.

This is done by creating a new section in binary, and all memory
map pointers go into this section. By doing this, the list
can still be manipulated as an array.

Change-Id: I1f3414b72f685fef4b99850749178661f14d9345
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung a77808462e Redefine microkernel memory map object identifier type
The opaque memory map object id type is now a pointer to
the associated memory map structure, rather than an index
into the microkernel's array of memory map structures.

This change is a pre-requisite to support for private
memory map objects, which are defined in source code.

Change-Id: I82ecb59eeed00efa54f781f775710c92ff9c9fc9
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung 8eec65c742 samples/microkernel: add test for private pipes
This adds unit test for microkernel private pipes.
The code piggybacks to the public pipe test (by
including the same source file), so any updates to
the test will be applied to both.

Note that the prj.mdef are different for both tests, since
the private pipes test move the pipes inside source
code. So, both mdef files will need to be updated at
the same time.

Change-Id: I6fdb5eab7c3a1d6f4b72c26a3620cee0188b07a5
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung b5517ab61c microkernel: introduce support for private pipes
This enable defining pipes in source code in addition to
defining in MDEF files. This introduces the macro
DEFINE_PIPE(pipe_name, ...). The pipes created this
way are the same, in functionality, as those defined in MDEF
files. They can be manipulated by the standard microkernel
pipe APIs.

Define the pipe using:

  DEFINE_PIPE(pipe1, size);

and "pipe1" can be used, for example:

  task_pipe_put(pipe1, ...);

or,

  task_pipe_get(pipe1, ...);

etc.

To use the pipe defined in another source file, simply add:

extern const kpipe_t pipe1;

to the desired C or header file.

Change-Id: Iae8e04706359bc18aae51acc75df3e3d26388882
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung 815d64522f microkernel: put pipe pointer list into its own binary section
The _k_pipe_list was a static array generated by sysgen,
where it containing all pre-defined pipes from MDEF file.
To support private pipe objects (aka, defining pipes within
source files), the pipe list has to accommodate pipes that
are not only processed through sysgen, but also those defined
within source files.

This is done by creating a new section in binary, and all pipe
pointers go into this section. By doing this, the pipe list
can still be manipulated as an array. The reason behind
putting the pointers to pipe, instead of the pipe objects
themselves, is that some compiler/linker may pad the large pipe
struct. For example, compiling under gcc and march=i686 pads
the struct to 32-byte alignment (march=atom to 64-byte alignment).
This causes issue with sizeof() and pointer arithmetic because
they have no idea about the padding. So use pointers here to
prevent padding.

Change-Id: I6d3b75614c4d8760c037a5c26746410d4e4b17cb
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung 2285976f03 microkernel: redefine pipe object identifier type
The opaque pipe object id type is now a pointer to
the associated pipe structure, rather than an index
into the microkernel's array of pipe structures.

This change is a pre-requisite to support for private
pipes, which are defined in source code.

This also moves the required struct into more visible
headers such that private pipes can be declared.
Renaming the struct is also being done to conform to
naming convention for private kernel objects.
Since a couple structs have to be moved anyway, so
do the moving and renaming here too (contrary to what
have been done in the past, with separated patches).

Change-Id: Ibb6ec7f62745a81439ae3ea2616688b757439843
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung 62077917b6 samples/microkernel: add test for private tasks
This adds unit test for microkernel private tasks.
The code piggybacks to the public task test (by
including the same source file), so any updates to
the test will be applied to both.

Note that the prj.mdef are different for both tests, since
the private tasks test move the tasks inside source
code. So, both mdef files will need to be updated at
the same time.

Change-Id: I2890f70be460c0e45208ce03d6e7897d2662f6f0
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung 75e5427e15 microkernel: put _k_task_list into its own binary section
The _k_task_list was a static array generated by sysgen,
where it containing all pre-defined tasks from MDEF file.
To support private task objects (aka, defining tasks within
source files), the task list has to accommodate tasks that
are not only processed through sysgen, but also those defined
within source files.

This is done by creating a new section in binary, and all task
objects go into this section. By doing this, the task list
can still be manipulated as an array, which is required for
task group operation.

Change-Id: I799d6967567079498bc414e0cb809e8af856b53e
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung 1367a98e9e Redefine microkernel task object identifier type
The opaque task object id type is now a pointer to
the associated task structure, rather than an index
into the microkernel's array of task structures.

This change is a pre-requisite to support for private
task objects, which are defined in source code.

Change-Id: Idb53ea7f8a8a5b7e6477a74273930b08fc77dcfe
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung f6369abf4d samples/microkernel: add test for private mailboxes
This adds unit test for microkernel private mailboxes.
The code piggybacks to the public mailbox test (by
including the same source files), so any updates to
the test will be applied to both.

Note that the prj.mdef are different for both tests, since
the private mailboxes test move the mailboxes inside source
code. So, both mdef files will need to be updated at
the same time.

Change-Id: I52ccc5931b1abfd3ae3d654f888d4a019268bba0
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung 39887c4358 microkernel: introduce support for private mailboxes
This enable defining mailboxes in source code in addition to
defining in MDEF files. This introduces the macro
DEFINE_MAILBOX(mailbox_name). The mailboxes created this
way are the same, in functionality, as those defined in MDEF
files. They can be manipulated by the standard microkernel
mailbox APIs.

Define the mailbox using:

  DEFINE_MAILBOX(mailbox1);

and "mailbox1" can be used, for example:

  task_mbox_put(mailbox1, &msg);

or,

  task_mbox_get(mailbox1, &msg);

etc.

To use the mailbox defined in another source file, simply add:

extern const kmox_t mailbox1;

to the desired C or header file.

Change-Id: I32d4194af740f96fc8df8c6cd3144a0c9accb4ec
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung 105e723faa microkernel: Rename struct mbx_struct to _k_mbox_struct
This is in preparation to enable private mailbox support.
The struct needs to be moved into more visible header
so private mailboxes can be declared. This also renames
according to naming convention to be private kernel
objects.

Change-Id: Ibd75497e726efd447d27f3bfd0b4695ed1695693
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung 09387cc9dd Redefine microkernel mailbox object identifier type
The opaque mailbox object id type is now a pointer to
the associated mailbox structure, rather than an index
into the microkernel's array of mailbox structures.

This change is a pre-requisite to support for private
mailboxes, which are defined in source code.

Change-Id: Ide832eee2a0762e601847ad07afba380bd79ed8b
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung 5d934a3786 samples/microkernel: add test for private FIFOs
This adds unit test for microkernel private FIFOs.
The code piggybacks to the public FIFOs tests (by
including the same source file), so any updates to
the test will be applied to both.

Note that the prj.mdef are different for both tests, since
the private FIFOs test move some of the FIFOs
inside source code.

Change-Id: I4130ac540b10a31cd30f37890e9cc389af73e89b
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung e510742d43 microkernel: introduce support for private FIFOs
This enable defining FIFOs in source code in addition to
defining in MDEF files. This introduces the macro
DEFINE_FIFO(fifo_name). The FIFOs created this
way are the same, in functionality, as those defined in MDEF
files. They can be manipulated by the standard microkernel
FIFO APIs.

Define the FIFO using:

  DEFINE_FIFO(fifo1, depth, width);

and "fifo1" can be used, for example:

  task_fifo_put(fifo1);

or,

  task_fifo_get(fifo1);

etc.

To use the FIFO defined in another source file, simply add:

extern const kfifo_t fifo1;

to the desired C or header file.

Change-Id: I29667c4cfdcd0e6d189358478acf1a6149ecb826
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung e27b5c9abf microkernel: Rename struct que_struct to _k_fifo_struct
This is in preparation to enable private FIFO support.
The struct needs to be moved into more visible header
so private FIFOs can be declared. This also renames
according to naming convention to be private kernel
objects.

Change-Id: I9b90ddccbaf01ff8c7e2ef03c926d0328dd7ec39
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung ef242d3291 Redefine microkernel FIFO object identifier type
The opaque FIFO object id type is now a pointer to
the associated FIFO structure, rather than an index
into the microkernel's array of FIFO structures.

This change is a pre-requisite to support for private
FIFOs, which are defined in source code.

Change-Id: Ieb1343d6d5dd1b747063603457d47fab2710f557
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung 8232067646 samples/microkernel: add test for private semaphores
This adds unit test for microkernel private semaphores.
The code piggybacks to the public semaphores tests (by
including the same source files), so any updates to
the test will be applied to both.

Note that the prj.mdef are different for both tests, since
the private semaphores test move some of the semaphores
inside source code.

Change-Id: Ic318bf6808514c5d335a46cb3e88ebf6000f4c3e
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung a0224842bc microkernel: introduce support for private semaphores
This enable defining semaphores in source code in addition to
defining in MDEF files. This introduces the macro
DEFINE_SEMAPHORE(semaphore_name). The semaphores created this
way are the same, in functionality, as those defined in MDEF
files. They can be manipulated by the standard microkernel
semaphore APIs.

Define the semaphore using:

  DEFINE_SEMAPHORE(sem1);

and "sem1" can be used, for example:

  task_sem_give(sem1);

or,

  task_sem_take(sem1);

etc.

To use the semaphore defined in another source file, simply add:

extern const ksem_t sem11;

to the desired C or header file.

Change-Id: Ia9c128648f7a26fc776eeb8f6fcc4158b1712a97
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung 1036aee613 microkernel: Rename struct sem_struct to _k_sem_struct
This is in preparation to enable private semaphore support.
The struct needs to be moved into more visible header
so private semaphores can be declared. This also renames
according to naming convention to be private kernel
objects.

Change-Id: I84ac7d580404ac5e1753c1bd446d38993fd23310
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Daniel Leung 013666c964 Redefine microkernel semaphore object identifier type
The opaque semaphore object id type is now a pointer to
the associated semaphore structure, rather than an index
into the microkernel's array of semaphore structures.

This change is a pre-requisite to support for private
semaphores, which are defined in source code.

Change-Id: I3821360be35237bfe3bf090efce84f99e335d309
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:18 -05:00
Allan Stephens eddae0e0f2 sysgen: Don't generate mutex object id variables
It is no longer necessary to generate variables containing the
object id each public mutex. This capability was once needed to
allow kernel code to reference mutexes generated by the build
system (i.e. pseudo-private mutexes); however, the existence of
private mutexes renders this obsolete.

Change-Id: I594be31268c9a336ae2a43d48c1b32dbf3d7cde0
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:15:18 -05:00
Daniel Leung 811c838ff1 microkernel: introduce support for private mutexes
This enable defining mutexes in source code in addition to
defining in MDEF files. This introduces the macro
DEFINE_MUTEX(mutex_name). The mutexes created this way are
the same, in functionality, as those defined in MDEF files.
They can be manipulated by the standard microkernel
mutex APIs.

Sample usage:

    DEFINE_MUTEX(mutex1);

    void one_function(void)
    {
        task_mutex_lock_wait(mutex1);
        ...
        task_mutex_unlock(mutex1);
    }

To use the mutex defined in another source file, simply add:

    extern const kmutex_t mutex1;

to the desired C or header file.

[ DL: This is a slightly modified version of similar patch
      by Allan Stephens available at
      https://oic-review.01.org/gerrit/3255 ]

Change-Id: Ib9cd8193eaf849a8aad1d217912759324ee8818e
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:14:46 -05:00
Daniel Leung 43eed86737 microkernel: Rename struct mutex_struct to _k_mutex_struct
This is in preparation to enable private mutex support.
The struct needs to be moved into more visible header
so private mutexes can be declared. This also renames
according to naming convention to be private kernel
objects.

Change-Id: Ifccb60a837b44e443be0b091c2df4f06373718fe
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:14:46 -05:00
Allan Stephens ffd802250e Redefine microkernel mutex object identifier type
The opaque mutex object id type is now a pointer to the associated
mutex structure, rather than an index into the microkernel's
array of mutex structures.

This change is a pre-requisite to support for private mutexes
(i.e. mutexes not defined using a project's MDEF file).

[DL: fix some whitespace issues.]

Change-Id: Ida419f1674df245f51a36d28ca7d4631239f1edd
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:14:46 -05:00
Daniel Leung 74c8852d05 microkernel: remove kernel service dispatch table
This change removes the internal number-to-function mapping
of microkernel services. Instead, function pointers are used
to specify which service to use.

This is in preparation for private kernel objects. Before this,
only kernel objects that are defined in MDEF files would have
corresponding functions included in the final binary, via sysgen
by populating an array of number-to-function mapping. This
causes an issue when a certain type of objects are all defined
with source code, and never in MDEF file. The corresponding
mapping would be deleted, and the functions are never included
in the binary. For example, if no mutexes are defined in MDEF
file, the _k_mutex_*() functions would not be included.

With this change, any usage of private kernel objects will hint
to the linker that those functions are needed, and should not be
removed from final binary.

Change-Id: If48864abcd6471bcb7964ec00fe668bcabe3239b
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:14:46 -05:00
Peter Mitsis 739489f337 Kconfig: Rework PLATFORM_QUARK to become PLATFORM_IA32_PCI
1. The new name aligns with the 'arch/x86/platforms/ia32_pci' platform
   directory.
2. A shorter prompt works better with menuconfig.
3. Removes IOAPIC selection as HPET_TIMER selection makes it implicit.
4. Removes LINK_AUX_COMPILER_LIBS selection as it does not exist.
5. Removes CPU_MINUTEIA selection to permit CPU_ATOM as a valid choice.

Change-Id: I55694d2594a103f4f5ca233c279df0556ff1327f
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:45 -05:00
Andrew Boie d1b3d54a94 sanitycheck: treat warnings as errors
This policy was in place for the old sanity checks, was simply
overlooked.

Change-Id: Id021a669b35622f9e9cba23b4417c5d0b7afc15c
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:14:45 -05:00
Anas Nashif eb1fdf5741 Add debug option to Kconfig to enable debugging
This only disables optimizations for now, we should
be able to select more debug options from here.

it changes KBUILD_CFLAGS from  -Os to -O0.

Change-Id: I84515356f8af006b724d706c0647a671db54a6b5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:45 -05:00
Andrew Boie ae9e7f7bca sanitycheck: default to cleaning outdir
-C/--clean is now -n/--no-clean. Made this change since the build system
can't always do incremental rebuild correctly depending on what was
changed (such as Make variables).

Change-Id: I199e505693479184b2f197ddb584ade5eca1704a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:14:45 -05:00
Andrew Boie 4b18247749 sanitycheck: print elapsed time
Change-Id: I5e18edaf9074f0166582fc51da81bb8978c9038b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:14:44 -05:00
Dmitriy Korovkin 8b0271dd2c Adapt HPET driver to work with QEMU
Qemu implements HPET so that it is connected to IRQ 2, which makes
necessary to use it in legacy emulation mode.

Add legacy emulation mode to HPET driver.

Change the way the HPET driver is initialized. QEMU requires that
the mode (one shot or periodic) gets set prior loading comparator
value.

Add debugging mode to HPET driver to ease the next port.

Change-Id: I668325d5968451585519a08b6c41863cf6e37f88
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-02-05 20:14:42 -05:00
Andrew Boie 6acbe63aea initial commit for next-gen sanity checks
The online help ./scripts/sanitycheck --help describes usage.
Most users will simply want to run with no arguments.

Change-Id: Icedbbfc22599a64a6e3dbbb808ff3276db06f2e0
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:14:42 -05:00
Andrew Boie 6fbbcbac22 build: don't use FORCE in deps for sysgen
We only want to rebuild this if the MDEF file has been touched.
Otherwise, zephyr.h gets rebuilt with every build, causing
unnecessary rebuilds of application source.

Change-Id: If128da48c9688f043c467f6b163ec6cb3e1d952c
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:14:42 -05:00
Anas Nashif f45e4aa9a1 Support ARC architecture with kbuild
Change-Id: Ic0b884e3760d5957986208ea7b19653c06eda072
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:41 -05:00
Peter Mitsis b4e1f7154a sanity: Replace obsolete BSP_FLAG with PLATFORM_FLAG
The bluetooth regression script now refers to PLATFORM_FLAG instead of the
obsolete BSP_FLAG variable.

Change-Id: I8cafc01b66004c7bdd76c03d3f3b6aeba134565d
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:39 -05:00
Peter Mitsis 9d63adf3ea Renames supported platform configurations
Renames supported platform configurations to conform to new platform
configuration naming scheme.

Example usage with PLATFORM_CONFIG:
    make PLATFORM_CONFIG=basic_cortex_m3
    make PLATFORM_CONFIG=basic_atom
    make PLATFORM_CONFIG=basic_minuteia
    make PLATFORM_CONFIG=galileo

  xxx_ti_lm3s6965_defconfig           -> xxx_basic_cortex_m3_defconfig
  xxx_generic_pc_atom_n28xx_defconfig -> xxx_basic_atom_defconfig
  xxx_generic_pc_minuteia_defconfig   -> xxx_basic_minuteia_defconfig
  xxx_quark_defconfig                 -> xxx_galileo_defconfig

Change-Id: I696eb8b9ad9a72d7a72efbe1341ce23500335764
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:39 -05:00
Anas Nashif 9aeb08213f toolchain: add support for iamcu toolchain
See
https://groups.google.com/forum/#!topic/ia32-abi/cn7TM6J_TIg

for more details.

• Support IA32 without FPU.
• Minimum ISA: Pentium ISA without x87 FPU instructions.
• Don't allow mixing i386 object files with Intel MCU object files.
• Support floating point with software emulation:
     a. Long double is the same as double.
     b. Use __float80 for 80-bit double.
• Minimize memory footprint:
     a. Code size
     b. Data size
     c. Stack size

Here is the draft of Intel MCU psABI.   The differences from IA32
 psABI are

1. The minimum instruction set is Intel Pentium ISA minus instructions
for x87 floating point unit.
2. There are no x87 floating point registers.
3. There are no vector registers.
4. Segment registers are optional.
5. Support for TLS relocations are optional.
6. Scalar types larger than 4 bytes are aligned to 4 bytes.
7. There are no vector types.
8. _Decimal32, _Decimal64, and _Decimal128 types are optional.
9. long double type is the same as double.
10. float, double and long double types are passed and returned in
 general purpose registers.
11. _Decimal32 and _Decimal64 types are passed in general purpose
registers.
12. Aggregate types no larger than 8 bytes are passed and returned
in general purpose registers.
13. Stack is 4-byte aligned.
14. The auxiliary vector support is optional.
15. Register %edx has undefined value at process entry.
16. New ELF machine code: EM_IAMCU.
17. New predefined C/C++ pre-processor symbols: __iamcu and __iamcu__

Change-Id: I6a0c45ad22d8f710b6f37a041aaa2fc1bf0b1c39
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:38 -05:00
Andrew Boie 84fed36539 Kbuild: Introduce QEMU_PIPE option
If set, 'make qemu' will direct its console output to a named pipe and
disable the interactive monitor. Intended for use with the new sanity
check system which will parallelize test execution.

Change-Id: I902f77c02ed3f210891ff13147afea890e64d9c1
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:14:38 -05:00
Peter Mitsis 519351ee92 Use PLATFORM_CONFIG to specify configuration
Uses PLATFORM_CONFIG to specify the configuration file instead of
KBUILD_DEFCONFIG.  This name is more intuitive to Zephyr users and
it is not tied to kbuild.

Example usage:
    make PLATFORM_CONFIG=generic_pc_atom_n28xx
    make PLATFORM_CONFIG=generic_pc_minuteia
    make PLATFORM_CONFIG=quark
    make PLATFORM_CONFIG=ti_lm3s6965
    make PLATFORM_CONFIG=fsl_frdm_k64f

Change-Id: I177608942c3e77c2f152743c862aad1d460c0e33
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:38 -05:00
Peter Mitsis c141aaae37 arch/x86: Remove pentium4 Kconfig options
Removes CONFIG_CPU_PENTIUM4 and CONFIG_PLATFORM_PENTIUM4 as Zephyr does not
support the Pentium4.

Change-Id: Ieb1970894eda184f4c33d03e3563fb08f861ec6c
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:38 -05:00
Peter Mitsis e147071219 sanity: out-of-tree_chk: minuteia -> atom_n28xx
Replaces the default executable target (generic_pc_minuteia) with
generic_pc_atom_n28xx.  This ensures that sanity testing can evaluate
two different x86 processors just as it did before generic_pc_pentium4
was removed.

Change-Id: Iad439d8465811e9e45f02e9516ce3e6d65d7c1ed
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:38 -05:00
Peter Mitsis 4f1cc4e168 sanity: Mark atom_n28xx as an executable target
Marks the generic_pc_atom_28xx platform configuration as a default executable
target.  This is desirable as the removal of generic_pc_pentium4 removed an
executable target from the sanity test suite.

Change-Id: Ic990a003ff23367199164dfcc434c033d78abaac
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:38 -05:00
Peter Mitsis 7b363ebe70 sanity: Remove generic_pc_pentium4
Removes the generic_pc_pentium4 platform configuration from the sanity tests
as the pentium4 is not considered an essential target for Zephyr.

Change-Id: I804ad44c4157f40a501ae56b928b57b2003d2415
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:38 -05:00
Peter Mitsis a7644b86a5 Rename CONFIG_BSP_xxx to CONFIG_PLATFORM_xxx
Updates Kconfig option names as part of transforming BSPs to platforms.

Change-Id: If397bcac8b058e5700e82c3cabbfe64588316d1d
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:37 -05:00
Peter Mitsis 03ab32a66a Microkernel timer uses new driver initialization
Update microkernel systems to use the new driver initialization model on the
timer driver.

Change-Id: Ida9ef2a395d0dddf4104d490d78b13b11ea3c347
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:37 -05:00
Peter Mitsis 6e95fe0356 Update _sys_clock_driver_init() interface
Prepares the _sys_clock_driver_init() routine to interface with the new driver
model.  To this end, it must accept a pointer to a device structure and return
an integer.

Change-Id: I3c600ce1efb49c0864aae7b09663ca40d6289372
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:37 -05:00
Allan Stephens 098e9dc68f SysGen: remove support for USERDRIVER
The USERDRIVER line is currently unused, and recent driver
initialization enhancements have rendered it obsolete.

Change-Id: If14089a52871a8891223156fde99b3fc9b650b10
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:33 -05:00
Peter Mitsis b2744f396c SysGen: remove processing of TIMERDRIVER
The TIMERDRIVER line is no longer used.

Change-Id: Ibe068793fe644be39916e508d26e0c0a98cff739
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:33 -05:00
Peter Mitsis 8efb4b570b Remove config1p.mdef references from build system
Since SysGen generates the code to invoke _sys_clock_driver_init(), the build
system no longer needs anything from the config1p.mdef files.

Change-Id: Id22615ff137c9d146ccc5c3777a75b2d3bfee73a
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:33 -05:00
Peter Mitsis 95b6f7509b Hoist _sys_clock_driver_init out of config1p.mdef
SysGen generates code to invoke _sys_clock_driver_init() when
CONFIG_SYS_CLOCK_EXISTS is defined thereby reducing the number
items the user must remember to configure.

Change-Id: I6f6909378c8a865a6ef50a99179800d58be5dd68
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:33 -05:00
Anas Nashif f367f071b6 doxygen: add @brief and capitalize
Remove function name from comment and add @brief instead.
Also capitilize first letter.

Change-Id: Ib708b49bf02e5bc89b0066637a55874e659637e0
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:33 -05:00
Peter Mitsis 8768257789 Rename internal K_ChMovedAck() routine
This private API now follows Zephyr OS naming conventions.

Change-Id: Ic8b1d4673862263d90d240e749a272d01a53679e
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:28 -05:00
Peter Mitsis 48dd7e2908 Rename internal K_ChSendxxx() routines
These private APIs now follow Zephyr OS naming conventions.

Change-Id: Ia11a082e46456d12a3d6af7dfb2f34c29c137cb2
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:28 -05:00
Peter Mitsis 6a4c85aff9 Rename internal K_ChRecvxxx() routines
These private APIs now follow Zephyr OS naming conventions.

Change-Id: I63815013be2d3b01463563d17f05aac28b27ce04
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:28 -05:00
Peter Mitsis e65534c877 maintainer-checkpatch.bash: ignore gerrit ID
Updates maintain-checkpatch.bash to ignore the gerrit ID in the commit log.
This helps reduce the noise/false positives when using the tool.

Change-Id: I2d6f3c501abd1ffd541fb8d0fdf7cbc7f37830b6
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:27 -05:00
Peter Mitsis 1ffabeaf3d Rename BSP_DIR to PLATFORM
Updates references to CONFIG_BSP_DIR to CONFIG_PLATFORM as part of the
BSP -> platform clean up.

Note that despite the renaming, the usage of the config option remains
unchanged.

Change-Id: I2846c3f761cf09871019c0855bf1824ae03e6b3c
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:27 -05:00
Peter Mitsis 340d8d2442 Base x86 ISA optimization on CPU not BSP
Fixes Makefile.x86.preparch so that the ISA optimization passed to the compiler
is based on the CPU rather than the BSP.

Change-Id: I78e4ad10fbc3d25a20367ccd3c4df39ffbfa8380
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:27 -05:00
Anas Nashif 37b50b62ce Use value of CONFIG_IDT_NUM_VECTORS when creating static idt
Restore original behaviour from before moving to kbuild

Change-Id: I299ad25cf39378b2537e0791cce65f077c5d1c08
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:27 -05:00
Anas Nashif ac47c45ca0 Rename Zephyr OS into Zephyr Kernel
We are a kernel, not an OS.

Change-Id: Ib987e3e511e1bdbed6293ab5e15e598bff00b09b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:26 -05:00
Allan Stephens 7da1dd860b Rename microkernel's kernel_struct.h to micro_private_types.h
The new name better reflects that this file contains private
microkernel APIs (types, structs, etc.) that are used by various
kernel subsystems.

Change-Id: I7a89be893455b3daaf30baa40a0ec8e0cde7cc36
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:26 -05:00
Allan Stephens a0148a8544 Rename sysgen.py to sysgen
Gets rid of the Python file extension, since the fact the code is
written in this language could conceivably change someday (and
doesn't really need to be advertised to anyone invoking it).

Change-Id: I0d01a89fd25e4a0f033099a4bcea674bc302c658
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:25 -05:00
Peter Mitsis 3e6c31207b Rename option CPU_CORTEXM4 to CPU_CORTEX_M4
Makes name more consistent with CPU_CORTEX_M3_M4 option.

Change-Id: I6f0a14322b7774df54a3459f91cd3acf07819b04
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:25 -05:00
Peter Mitsis a9941af3ee Rename option CPU_CORTEXM3 to CPU_CORTEX_M3
Makes name more consistent with CPU_CORTEX_M3_M4 option.

Change-Id: I0b89a50a5c0b728167cd76219d25ddf98243c0dd
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:25 -05:00
Anas Nashif 27603f4801 Revert "Kbuild: Tools build at TIMO_BASE directory."
This reverts commit 23da104f0dc8c6c4a768a727b564272c084aa79b.

Conflicts:
	Makefile
	Makefile.inc

Change-Id: Ia8f2efe3cd37e82c04c304f04c46d787d2265dde

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:24 -05:00
Anas Nashif 0180a63d62 Revert "Kconfig stop creating empty header files."
This reverts commit 5e56c21dfae2e08253820f7fcad1e96be009ca89.

Change-Id: Ie4e0c2afe27937206230e5574c41e5a4a4c3d616
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:24 -05:00
Anas Nashif fda70d2130 Revert "Kconfig: Create dependency header files in outpur directory."
This reverts commit ecf5bd8048b683f119e867e85c1693955694b33d.

Change-Id: I51717ad96f312be1f116534f6b79d599bf0e5b4e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:24 -05:00
Szymon Janc d90ce68d9d Bluetooth: Add central and tester samples to bt_regression
This allows to easily checks if all samples builds with supported
configurations. Also tester application is (unlike other samples)
build with all Bluetooth debugs enabled.

Change-Id: Ia151b97d14c75b0509243e2c1dc8d26211f70e83
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
2016-02-05 20:14:23 -05:00
Andrei Emeltchenko a6e47f7c40 Bluetooth: Add beacon app build test to bt_regression
Add build test for beacon app for following targets: pentium4 and
ti_lm3s6965.

Change-Id: I4b8949b4f21d3554465bbf8c229462c026db5e29
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:14:23 -05:00
Anas Nashif a502618b41 sanity: allow setting of tmp dir for out-of-tree
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>
2016-02-05 20:14:23 -05:00
Anas Nashif b766bfef89 sanity: add support for arc platforms
Change-Id: I363f387f07bace937544c3447b0614ab4a943f61
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:22 -05:00
Juan Manuel Cruz eee6787269 Kbuild: Clean target fix.
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>
2016-02-05 20:14:22 -05:00
Juan Manuel Cruz 1eb89a9b3a Kconfig: Create dependency header files in outpur directory.
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>
2016-02-05 20:14:22 -05:00
Peter Mitsis 5e29f52883 sanity: Enable out-of-tree sanity check
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>
2016-02-05 20:14:21 -05:00
Peter Mitsis d902e9e514 sanity: Key off platform instead of BSP
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>
2016-02-05 20:14:21 -05:00
Peter Mitsis 53d81ebeef sanity: Remove the -s option from sanity_chk
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>
2016-02-05 20:14:21 -05:00
Peter Mitsis 02432ca5e7 sanity: Use KBUILD_DEFCONFIG to specify target info
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>
2016-02-05 20:14:21 -05:00
Peter Mitsis 5d8c23a254 sanity: Update sanity scripts to use data files
Completes the separation of data from the sanity scripts.

Change-Id: Icc7a4922d5f108ca54d2c2f08b192259b07b3a0e
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:21 -05:00
Peter Mitsis a62a41c86a sanity: Add data files for use by sanity checks
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>
2016-02-05 20:14:21 -05:00
Peter Mitsis 6a1287ba07 sanity: change strings stored in $PRJ_TYPE
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>
2016-02-05 20:14:21 -05:00
Peter Mitsis 820a62dc7d sanity: Move Bluetooth regression script
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>
2016-02-05 20:14:21 -05:00
Peter Mitsis 99c55ba2fe sanity: Remove common-klibs_chk
KLIB_DIR builds are a relic from the previous build system.

Change-Id: I382db45f0a21786e1b7c50c9a881c82feb2c7481
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:21 -05:00
Juan Manuel Cruz 308f1586d6 Kbuild: Assembly code extension.
This commit set back .S as the assembly code extension for Kbuild.

Change-Id: Ib0119876bd0bed6617bbfbad2ca6a44e172ab042
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:20 -05:00
Arkadiusz Lichwa d7e239c6c2 Python: Tweak with python3 compatibility
Fixes sysgen's python code errors generated during build.
On python2 environment it's ok but *not* on python3.

Change-Id: I4a042c5d5203e546b65540f7020ae75677d102f8
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-05 20:14:20 -05:00
Allan Stephens 9e675cf581 Rename private microkernel APIs
The following APIs now use an approved Zephyr OS prefix:

_pipe_init
_mem_map_init
_mem_pools_init (also loses plural aspect)
init_node
init_drivers
kernel_init
kernel_idle

Change-Id: Ic380c56b09cb870d44c51fd12c6c0e0a13e9b4e3
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Allan Stephens f9b2c757db Rename K_ticker() to _k_ticker()
This API now uses an approved Zephyr OS prefix.

Change-Id: Ia16829d908da9bfaa82f82da47b583a0004cae7d
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Allan Stephens c718f32a49 Eliminate remainder of sanity check support for obsolete -T option
There is no longer any need to retain any support for this option
as a "do nothing" for backwards compatibility reasons.

Change-Id: I4b8fa727f80effdcc3fd92007fc9c50654291175
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:19 -05:00
Anas Nashif 652309470c Rename tinymountain -> zephyr
Remove excessive use of zephyr and use a more generic
terminology where possible.

Change-Id: Ida8916765dbe824f63d7a4cedba60b35d14aee55
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:16 -05:00
Anas Nashif b8823770d2 Rename TIMO -> ZEPHYR
Change-Id: Id44a129e275fb0cfe1fce6ec2a03c2d86ffe3995
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:16 -05:00
Anas Nashif 54ac4484d7 Rename VXMICRO_ARCH and VXMICRO
Change-Id: I6f3858de98333ec466aa876c5f2887faa8e276e2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:16 -05:00
Anas Nashif 274622ea69 Rename VXMICRO_ARCH_arm -> CONFIG_ARM
Change-Id: I32b2e39781825504e7936b3df0c864988650c35c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:16 -05:00
Anas Nashif 191fc279ce Rename VXMICRO_ARCH_x86 -> CONFIG_X86_32
Change-Id: Ie1bcfebce1db838ea994cb3626396ea032225830
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:16 -05:00
Peter Mitsis 61eff496e0 kbuild: link using ${LD} instead of ${CC}
Not all GCC toolchains generate a fully linked image (non-relocatable) when
using ${CC} for linking.

Change-Id: Id99501b6510cd6eeb87f245a6273fcebd6d36cde
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:16 -05:00
Peter Mitsis fb624c9d54 kbuild: Add libgcc.a directory to xtools search path
Informs the 'xtools' toolchain where to look for the libgcc.a library when
linking.

Change-Id: Ic990f1522dd8ddc9c5baf1366505e49929130969
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:16 -05:00
Peter Mitsis 28846dbf82 kbuild: Specify -march when using ARM cortex-m3/m4
Some compilers default to a value for -march that is incompatible with the
specified -mcpu setting.

Change-Id: Id94fc6666efe86ab511cf2320bf07b2eb70d72ce
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:16 -05:00
Peter Mitsis cbf6d5b470 kbuild: Update xtools toolchain default versions
Aligns the default version of the xtools toolchain to that specified by the
x86.config and arm.config files under 'scripts/cross_compiler'.

Change-Id: Ib05766871a85de98c5ead19e15d740073f2f42cf
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:16 -05:00
Anas Nashif 53bee67642 Remove unused files from scripts/
Mostly files related to kernel modules and scripts used
in old build system.

Change-Id: I12dfe4c976b0f6f933b519bd7eb96148f689535d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:16 -05:00
Anas Nashif e06da7bd65 Remove packaging dependencies
Change-Id: Ife53df325c1ddad26299c6c6075338d2225f49b0
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:16 -05:00
Anas Nashif 79635e002a Remove depmod and dependencies
Change-Id: I70325e049fbde1a965b9d845683cb7799fa54382
Signed-off-by: Anas Nashif <anas.nashif@intel.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 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 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 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 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
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
Juan Manuel Cruz 4ef2d598cc Kbuild: Adding bin and strip generation.
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>
2016-02-05 20:14:14 -05:00
Anas Nashif 5aaef9c981 re-add -Werror to sanity checks
Change-Id: I115ee95e33e0c9bc09c2b8626a25a3c71bebd0b0
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:14 -05:00
Peter Mitsis 2bf5fc44f1 Initialize idle task's stack related fields in sysgen
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>
2016-02-05 20:14:13 -05:00
Peter Mitsis b4e7a4fdbe Apply __stack tag to align kernel defined task/fiber stacks
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>
2016-02-05 20:14:13 -05:00
Peter Mitsis db8a41c90d Replace use of __attribute__((packed)) with __packed
The __attribute__ keyword is toolchain specific.

Change-Id: Ia3c0ff54d778785679c864704f8db6a3ba898948
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:13 -05:00
Peter Mitsis b5c2342a4e Update checkpatch scripts to use TIMO_BASE
The use of VXMICRO_BASE has been supplanted by TIMO_BASE.

Change-Id: I905232a8d87145afb2f8df30b5f9056ec72ce045
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:13 -05:00
Allan Stephens e54a6c4b68 Eliminate separate include files for generating absolute symbols
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>
2016-02-05 20:14:13 -05:00
Allan Stephens 4b105f459d Eliminate testing of secure string library code
Test project is no longer needed, since the associated library
is now scheduled for removal.

Change-Id: I843018e647c4bdc82c785ae21dbfa9de608c0d50
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:12 -05:00
Dmitriy Korovkin b08727ed2d Add random number API test
Change-Id: I810705c84609ca3497cc1d2dd7a2f7706f140815
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-02-05 20:14:12 -05:00
Dirk Brandewie f25f9b37ea kbuild: Remove compilation tool command line validation
To support multiple versions of the compilation tools GCC etal the
original Kbuild would execute the tool to ascertain if the argument
being added to command line was compatible with the version of the
tool installed on the system.  This causes significant overhead and is
not required since we specify the minimum version of the tools
required for the build.

Change-Id: I23d811bee9e89bf7549449c679adbfa02efd94de
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:14:12 -05:00
Andrei Emeltchenko f9360e8069 make: Fix qemu flags for ARM architecture
Fixes missing qemu flag and when adding Bluetooth -serial switch it
became the first UART.

Change-Id: I85f4bf236383a288f2935f6455141fa7b18c3ac8
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:14:12 -05:00
Anas Nashif f1c7c178cf Use qemu from toolchain if available
Use patches qemu binary provided by the Yocto SDK.

Change-Id: I5edc2338f45fdd0d953d8d34bea648d0d18d8bf8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:12 -05:00
Anas Nashif 8e9d8ebfd2 Remove nodes naming when using sysgen
Change-Id: I8914c25ad18d3c294f398f98efca04c3ac371f44
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:12 -05:00
Anas Nashif 6082c0989d Remove Makefile.modpost and .ko building
Change-Id: Iac29d5cac1efbc894cbe036fab8bff865d1cec96
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:12 -05:00
Juan Manuel Cruz 4d7f954896 Kbuild: Tools build at TIMO_BASE directory.
This commit allows the tools build to be executed at TIMO_BASE
directory insted of being executed at the PROJECT_BASE.
This allows the sanity checks to run faster because there is no
need to recompile the tools with every test.

Change-Id: I9e9ac78695db884b44e2693029e9ea6ed96b21c8
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:10 -05:00
Anas Nashif e3d4ce5eaf Add missing -Wl,--end-group and always use __start
Change-Id: I1b98114f3ca851f580a581d1707f349215405643
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:10 -05:00
Anas Nashif 73b3d99692 bluetooth: do not run sanity on quark
Change-Id: I8bb50a350b5344772afa86c80f766a910d07407e

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:10 -05:00
Anas Nashif 1b670ab7ae Kbuild: fix yocto toolchain settings for ARC
Change-Id: Ib075242c43738eee1cace219ac5a02e66c566ace
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:10 -05:00
Anas Nashif 02085a3fda Kbuild: make merge_config less verbose
Change-Id: I1102f383db23fad18364f09eff6128391980637a

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:10 -05:00
Anas Nashif 3d95ca0530 Kbuild: use sed to generate offsets.h
Change-Id: Ib90ee51b5a3da8f7541d002ee70945ca907c7e06
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:10 -05:00
Anas Nashif cdf88a7848 Kbuild: Do not generate modules.order
Change-Id: Ie7609bb4917d6f80ac19ddbe286a06cd85c91ca1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:10 -05:00
Juan Manuel Cruz 988236f2b9 Kbuild: Output files at outdir directory.
This commit enables the outdir directory.
Kbuild output files will be generated at the outdir directory
inside the project directory.

Change-Id: Icec04aca1753326c9d50dea20c71850c1d8c3dd0
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:10 -05:00
Anas Nashif 02369f05e1 VXMICRO_BASE->TIMO_BASE
Change-Id: Id39cce43084caa9f4448be3552028212f3ae4e78
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:10 -05:00
Juan Manuel Cruz cdc3bab8ad Kbuild: Dash compatibility.
This commit adds changes to the shell scripts to add
compatibility with bash and dash shells.

Change-Id: I7831eba24afca2211cd58aab996dee13a02207f3
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:10 -05:00
Anas Nashif e439f510f8 Kbuild: link against libc only for newlib
Right now we are building minimal libc as an archive (lib.a)
and do not need to link against -lc -lm in that case.
Link against libc/libm only when using an external libc.

Change-Id: I1af0eaf5c059bd5f0c8c16cda28114c6dc10b156
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:09 -05:00
Anas Nashif b424acc272 Kbuild: do not copy libc.a
Change-Id: I096209ca29142f47975a0068267062fc44f82913
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:09 -05:00
Anas Nashif 19f0ff2756 Kbuild: enable toolchain newlib library instead of minimal libc
This options allows us to link against newlib instead of the
integrated minimal c library.

Change-Id: I20990354d74c08f2f6348f0aeea452b8f0f4c8e9
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:09 -05:00
Anas Nashif 369cf08e29 Kbuild: Support toolchain auxiliary libraries per variant
This allows a toolchain to define the auxiliary libraries in
scripts/Makefile.toolchain.{variant} with more flexibility.

Change-Id: Iaae9c7613ddcbcc8376b7e756aa4b675db680737
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:09 -05:00
Anas Nashif faa7109e0d sysgen: VXMICRO_BASE -> TIMO_BASE
Change-Id: Iba207c6aad90058352bdbb51dfeac22c56ad304c

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:09 -05:00
Anas Nashif cede6c794d fix path to truesize
Change-Id: I2465735a0c389e8afe24430bf9bf7c21dc8008a2

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:09 -05:00
Juan Manuel Cruz 0c47e4fbe7 Kbuild: LDLIBS_TOOLCHAIN adds toolchain static libraries.
This commit adds the variable LDLIBS_TOOLCHAIN that, by default,
add the gcc static library to the link command.
This variable can be overriden as an environmental variable or as a make
parameter to allow the use of different toolchains different from gcc.

Change-Id: Id9d6c8621a7dc8feebdf377c115564701fb7652b
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:09 -05:00
Anas Nashif 0467c632cb Kbuild: Error when toolchain path is not set
Change-Id: I53c74f8bbafe5438ff6b01eb21d2d54b1b34702a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:08 -05:00
Anas Nashif 282828f4a7 Kbuild: set ARCH when building qemu targets
Change-Id: Ia9ab35f46d02698664e5719c7d842e8b65c53eb5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:08 -05:00
Anas Nashif aa7ec61cb5 Kbuild: Replace awk with python for generating offsets.h
awk is causing issues on the ci infrastructure, some
options used here are not supported on ci hosts.

Change-Id: Iabd5dd37b6464e093d3f91188128ef85a9fc6df5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:08 -05:00
Anas Nashif fc1e6b5b44 fixed LIB_INCLUDE for arm
Change-Id: I3f08f7b10b50c24ce1a15ec086c4355fa7a479c8

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:08 -05:00
Anas Nashif aca245d96f Kbuild: Add support for multiple toolchains
To use this, export the following:

export VXMICRO_GCC_VARIANT=yocto # for yocto
export VXMICRO_GCC_VARIANT=xtools # for crosstool-ng

export YOCTO_SDK_INSTALL_DIR=/opt/poky-tm/1.8
or
export XTOOLS_TOOLCHAIN_PATH=/opt/crosstool-ng

Change-Id: I9cd6062ecc32047d1582aad46209f4232e0e31f6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:08 -05:00
Juan Manuel Cruz 86dfd37817 Kbuild: REVERT the removal of bluetooth tests.
This commit reverts the removal of bluetooth tests.

Change-Id: Id84bb6b61da1fd8b617059be2b1617a6dacf2af9
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:08 -05:00
Juan Manuel Cruz 62cf77c569 Kbuild: Create directories for lib-y files during a O option.
This commit allows the following:

lib-y will create external directories, when building with
the O=<external/directory>option.

Originally in Kbuild, only obj-y dependencies were subject to
directory creation when builded in an external directory.

This change allow Kbuild to completely build in external
directories, including libc.a.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: If6c2bc77b2c00ce199df87a08f86e366f929ac08
2016-02-05 20:14:08 -05:00
Juan Manuel Cruz de1cec29d6 Kbuild: Build minimal libc as a static library.
This commit changes the way libc is built.
Instead of building a hierarchy of objects linked into the
microkernel, libc minimal is built as a static library and
linked against the microkernel binary.
The location of the libc is configurable with the variable
KLIBC_DIR. This gives the flexibility to build against a
different libc other than minimal.

Change-Id: I9c0b6a684a9f3b407861aa387727c45eceb269c4
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:08 -05:00
Anas Nashif 679c440b54 Sanity: Run make with ARCH variable set
Change-Id: Ifc751c7f66972fb549996883c6351a86b05aa614
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:08 -05:00
Anas Nashif f7c13d2a74 [REVERT ME]: disable klib tests
Change-Id: I22fe3883f8fd02eb4d2fbf1a1ddc593e39f8af1a

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:08 -05:00
Anas Nashif 7f4f4a32f2 Kbuild: use qemu target when testing
Change-Id: I4218ea99498da980c259b68181ae56183c853fde

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:08 -05:00
Anas Nashif 0ff11b33b9 [REVERT ME] Sanity: Disable bluetooth tests
Change-Id: Ice7e93e1f229f3256e42ce9a8b480d6fb2a3fcfa

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:08 -05:00
Anas Nashif d06c20eb58 VXMICRO_BASE -> TIMO_BASE
Change-Id: I35650b2f4ff8e90217a9c38e0251e8c8b9e29049

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:08 -05:00
Anas Nashif 71f8e91666 Sanity: make the script work with Kbuild
Make the script work with the first set of testcases.
Works continues as we fix more samples.

Change-Id: I48b77781fc162971a1ef83bed32c02c2b08f81d7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:08 -05:00
Anas Nashif 10516620d7 move scripts to scripts/
Change-Id: Ie48f3e9e92ee696dc68fad31d41b55c5bea82e93
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:07 -05:00
Juan Manuel Cruz 6e1a4ef6fd Kbuild: Adding gcc library to the linker scheme.
This commit adds the gcc library to the linker process
of Kbuild.

Change-Id: Ic237dedc7b28dae020e4778c9b373ac650e31bad
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:07 -05:00
Juan Manuel Cruz 52836ec3a8 Kbuild: GenIdt auto build.
This commit includes the genIdt tool as part of the kconfig
basic tools. Now the genIdt tool is built automatically as
part of the whole kernel project.

Change-Id: I45110a7c564c59d7a6684d868ccc377cbd6ef1c4
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:07 -05:00
Anas Nashif 144e8ce330 renamed include file absSym.h -> abs_sym.h
Change-Id: I8500ee9d63b0048486e49268de3680fd6a3e1ef3

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:06 -05:00
Juan Manuel Cruz 892857cd2c Kbuild: VPFile can be selected from outside the working directory.
This commit allows to select a VPFile outside the working directory.
This change is needed for sanity checks.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Ia6f1e334c0a5274c4029197e5f64aaa4c236f9f0
2016-02-05 20:14:06 -05:00
Anas Nashif c31a8cca66 remove linux firmware Makefile
Change-Id: I9bbefb5696864e9567d91190ef388e4cb4e730d3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:06 -05:00
Juan Manuel Cruz 6e666cf28a Kbuild: Removes the SECTION_GARBAGE_COLLECTION ksymbol.
This commit removes from the Kconfig system the
SECTION_GARBAGE_COLLECTION kconfig symbols and sets the
SECTION_GC_FLAG flag permanently on the compilation options.

Change-Id: Iec070613d85afa697c62d6cbc54cc146cffcab27
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:06 -05:00
Juan Manuel Cruz 71c7083ae0 Kbuild: iSSE_FP_MATH flag fix.
This commit fixes the issue that the iSSE_FP_MATH flags was
not being added during the build process.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I0702e8b317fde1858e90145efaa470146ad5a416
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz 06b41d1ace KBuild: ALIGN_STACK_FLAG fix.
This commit fixes the issue that ALIGN_STACK_FLAG was not being
added to the build process.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Iced7700b51da4c5b04181affca2f2ca090987371
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz fbc5956ade Kbuild: ISA_FLAG Fix
This commit fixes the issue that ISA_FLAG was not being
added during the build process.

Change-Id: I780c8dbae8912ee8e159827cb24a5700432898d2
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:05 -05:00
Anas Nashif 88131c8176 Make sure we start with a new *.lnk file
Start with a new linker file every time we run make. Otherwise
we fail.

Change-Id: I3abe9c203dcfe8710e6c4946662959bfeb6a6bc9
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz e7de0f65b4 Kbuild: QEMU target.
This commit adds support for the qemu target.
This target will generate the kernel binary and will
launch a qemu instance running the binary.
Currently, only the x86 generic pc and the arm tilm3s6965
BSPs are supported with emulation.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I9e71d3ce2fba98572830475a2e15e3fceb0216b4
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz 1c8f5a75e7 Kbuild: Standard output file names.
This commit changes the name of the output files.
The output names tinymountain.* have been changed to
microkernel.* and nanokernel.*.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Ia73daa35bb8e44972065af3a217bf87335169dac
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz 622e273d08 Kbuild: Sysgen support for NUM_TASK_PRIORITIES
This commit add support to the Kbuild system for the
NUM_TASK_PRIORITIES Kconfig symbol and the corresponding sysgen
parameter.

Change-Id: I6b035437c86d62f72c25d696d18182a7b0448e8f
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz 90abf06e7f Kbuild cortex processor link option.
This commit allows the Kbuild system to specify the
Cortex processor as a toolchain link parameter by
reading the kconfig configuration options.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I29296fb255810b6bc5e14637c9000e054ac5deb2
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz 808e5c4ba0 Fixes to Kbuild to build on ARM architecture.
This commit fixes issues to allow build on ARM architecture.
- It fixes the include paths in Makefiles.
- It fixes the include path for the offsets.c compilation.
- It fixes the linker command. This changes is needed because gcc
  ARM cross-compiler does not accept an AT() command without
  specifing an address explicitly. This corner case appears
  on ARM architectures when XIP is disabled.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Ief8b53c4cc154abba7b7827121ec5a56f62b7b26
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz 2e3e28c3ed Kconfig KERNEL_DIR symbol removal.
This commit removes the Kconfig symbol KERNEL_DIR.
The symbols was no longer needed because sysgen is only
used on microkernel architectures and the value of
KERNEL_DIR is always "ukernel", therefore it is redundant.

Change-Id: I5e38dd431c5b6f7586e8b25aea330632e96f581f
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz 7ac851afef Kbuild. Remove linux name references.
This commit substitutes references to the linux string in variable
names.

It changes the LINUX prefix and uses the TIMO prefix (short for
tiny mountain)

It changes the vmlinux prefix for tinymountain prefix.

It preserves linux references found in licenses, comments giving
credits and from scripts that are not supported by the current build
system yet, like rpm generation.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Id17d8d12161f00e2a2ff38f218cdb6c5afd169c0
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz 0d01f5bedc Adding Kbuild linking process.
This commit is adding the linking process.
  -Creates linker command files.
  -Creates IDT tables.
  -Creates final ELF file.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I3ce92868b00957fdc24a361cc419e3548f475cc3
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz a0b5466540 Adding Kbuild CFLAGS.
This commit adds all Kbuild CFLAGS to build the kernel binary.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Ia4ca1b71b4e68c4515c428147a8814ca983bb541
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz ba741fedd7 Root Makefile adaptation.
This commit organizes the different directories listed in the
root Makefile. Each directory hold a root Makefile describing
libraries and object bundles that will be linked together as
the kernel binary.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I4af16114598ad985dfb4faac68e82dc73b1b6cc5
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz 94b78c1276 Creation of offsets.h header file.
This commit adds the target to generate the offsets.h header.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I6222f7478ade33f5ca130eea8637cb454b67eaab
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz e1bb210bf3 Creation of configs.c file.
This commit adds the target to generate the configs.c source file.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Ia068a20c3b76c78f5bdd041f6e19daabd2107a5a
2016-02-05 20:14:04 -05:00
Juan Manuel Cruz 9b0854bd84 Creation of target for sysgen execution.
This commit adds the target to execute sysgen.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I31f2e896274fa5ddfe6c10b4ccfb07ff6704c130
2016-02-05 20:14:04 -05:00
Juan Manuel Cruz e33ede376e Creation of prj.vpf file.
This commit adds the target to generate the configuration file prj.vpf.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I407b304d33fe27daf92e6049377930cca484fde5
2016-02-05 20:14:04 -05:00
Allan Stephens 267753d967 Streamline public pipe APIs
1) Now invokes pipe routines directly, without the use of function
   pointers.
2) Eliminates unreferenced _DEVICE_CHANNEL symbol.

Change-Id: I6e26476265ed8f33febb5a06c9d03daf7147ee5e
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:00 -05:00
Peter Mitsis 1c313b6f89 Remove references to ICC
Keys off variations of "ICC" to remove references to the Intel C Compiler as
it is not supported.

Change-Id: I09f67880b39839982ed1c450e564c274440628a5
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:00 -05:00
Allan Stephens a02396098d Eliminate exposure of non-public microkernel structures
Renames the include file defining non-public microkernel structures
from k_struct.h to kernel_structures.h, and relocates it to the
microkernel's non-public include file directory. This means that
applications and drivers including the microkernel's public APIs,
using microkernel.h, can no longer access non-public information.

Note: This change also eliminates some redundant #includes by the
microkernel's own subsystems, since the inclusion of minik.h brings
in the vast majority of public and non-public APIs.

Change-Id: Ic7d9ec1ebb8a124ccd0aaad98b50e16c197ffa00
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:00 -05:00
Allan Stephens ec391c363c Relocate misplaced items in main microkernel API include file
1) Eliminates declaration of variables that are already being
   included by a microkernel subsystem include file.
2) Eliminates duplicate declaration of timer_driver().
3) Moves definition of well-known events to the event-specific
   include file.
4) Moves declaration of a task-related routine to the task-specific
   include file.
5) Moves declarations that are only needed by kernel_main.c
   to kernel_main.h.

Change-Id: I6f387915a5ce208879482522586b977118f657e7
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:00 -05:00
Benjamin Walsh d8d273cbff sanity_chk: test x86 platforms other than pentium4
Only pentium4 was tested with the default sanity_chk, since it was
listed as the default platform on every test.

The ARM platforms were already taking a different approach: if the test
is runnable, build and run it for the QEMU platform (ti_lm3s6965):
otherwise, build it for the real board (fsl_frdm_k64f), since running on
that board is not currently automated.

Do something similar for x86 platforms: when runnable, use either
pentium4 or minuteia on QEMU; this gives coverage to minuteia. Also, for
a couple of build-only tests, build one for quark and one for atom.

Change-Id: I2f80a835d8f9b6df020bc8a2ed966e6d47c51e2e
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:00 -05:00
Allan Stephens 02bf1c1eb1 Eliminate obsolete symbols from generated vxmicro.h
These symbols are no longer part of the microkernel's public API.

Change-Id: I0dfa32af02cfa71fb31997b9bcdac60208d93888
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:59 -05:00
Allan Stephens c54ce8fc16 Eliminate unnecessary include in generated kernel_main.c
The generated file now takes advantage of the fact that including
vxmicro.h automatically includes the microkernel's public APIs.

Change-Id: I17879b8f209c67ad159405aca16770af8e099fb0
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:59 -05:00
Allan Stephens ae626642c7 Eliminate generated microkernel_objects.h file
Sysgen no longer needs to generate two different include files
containing the various definitions available to applications.

Note: This consolidation also eliminates the generation of
an obsoleted symbol of the form NODEx.

Change-Id: Idf28efba95193037d04603498e9e956638027ed9
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:59 -05:00
Allan Stephens ede54c8df3 Eliminate unneeded task entry points from generated vxmicro.h
Now declares task entry points in the generated kernel_main.c,
which is the only place that needs to know about them.

Change-Id: Ifa2ebf64ced26e71387d6fd8350893205d6961a0
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:59 -05:00
Allan Stephens ed29b076ea Eliminate unneeded non-public APIs from generated vxmicro.h
There is no longer a reason to expose information about the
internels of the microkernel's event subsystem to application
files.

Note: The one sample project that tests event processing now
explicitly declares any non-public event APIs in requires.

Change-Id: I4c3f85a7b0bc485713c21424a923102b4f400ced
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:59 -05:00
Allan Stephens d3126ff88b Cosmetic changes to sysgen
Corrects PEP8 coding standard violations.

Change-Id: I12cb7df84f5ff3f90027db657ef088a12ab5bd03
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:59 -05:00
Peter Mitsis 6273c15e7c Rewrite truesize tool to use python
Using 'python' instead of 'gawk' for the 'truesize' has several advantages:
  - more people understand python than gawk
  - python script is easier to maintain
  - lessens the number of tools on which the product depends

Change-Id: If6780b530e28867d89939e09b81b153a960004b2
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:13:58 -05:00
Andrei Emeltchenko f8df842dd5 Bluetooth: Add compile test for nanokernel shell app
Bluetooth regression and system regression would run compile test
for shell app.

Change-Id: I029772483e7aa9ac0717db760d8de1f6be3371b5
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:13:57 -05:00
Andrei Emeltchenko 9bfda983d8 Bluetooth: Add arm targets for init sample
Add new targets for sanity_chk script: fsl_frdm_k64f and ti_lm3s6965,
this would add compile tests for mentioned BSPs in sanity check
script.

Change-Id: I556f8e3a5048d2a58ab09b10197e0cc6fb3c8765
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:13:56 -05:00
Andrei Emeltchenko 0ec0ea297d Bluetooth: Add arm targets for microkernel sanity test
Add ti_lm3s6965 and fsl_frdm_k64f targets for bluetooth test.

Change-Id: Ibbe8ebbab72abb02505f47a82c904f0e9460e812
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:13:56 -05:00
Andrei Emeltchenko 81a97132de Bluetooth: Add arm targets for nanokernel sanity test
Add ti_lm3s6965 and fsl_frdm_k64f targets for bluetooth test.

Change-Id: I054c9500511fe40969127445444f85f3fe85902c
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:13:56 -05:00
Allan Stephens f2be9ae6c1 Cosmetic change to sysgen
Corrects a PEP8 coding standard violation.

Change-Id: Ifcdb2ac8d57dd90d74c2f72e94a774c894935a17
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:55 -05:00
Allan Stephens 8f66024f57 Revise kernel_main.c access to non-public microkernel APIs
Sysgen now copies kernel_main.h into its output directory, so that it
can be easily included by kernel_main.c. This eliminates a kludge
that required kernel_main.c to reference kernel_main.h using a relative
path name.

Change-Id: I24fcfa6b70a44526a80f33619dd68ff0a7f7acc5
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:55 -05:00
Allan Stephens 0507aefbdc Continue limiting exposure of microkernel APIs needed by sysgen
Relocates and renames the include file which declares non-public
APIs needed by sysgen from the directory containing the microkernel's
public API to the directory containing its non-public API.

Note: Need to come up with a more elegant way for generated
kernel_main.c to access kernel_main.h, since the current relative
path approach is kludgy.

Change-Id: I5e4b07038e566f1f161001d676a3b0faa487a480
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:55 -05:00
Allan Stephens fb64710410 Limit exposure of non-public microkernel APIs needed by sysgen
Hides the existence of these routines from the microkernel's main
public API include file, but allows both sysgen and the microkernel
itself to continue accessing them.

Change-Id: Iaf1beff81d045e9df29eb07517793e4b4410f51e
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:55 -05:00
Allan Stephens 56f93e3a21 Eliminate unnecessary K_TIMER type
Since the K_TIMER type is a non-public API used within the micro-
kernel itself, it doesn't provide any real type abstraction benefit
that isn't served equally well by the struct k_timer type it is
based on.

Change-Id: I482d7c0459d5734402be541322ff752dd1a3714a
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:55 -05:00
Allan Stephens fb7f961554 Rename EVENTS to _k_event_list
Brings the name of this non-public microkernel variable into line
with those of analogous variables.

Change-Id: I17dc343faf2dc1ace63b5a3e8164ff08ddd60ebd
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:55 -05:00
Dan Kalowsky fd7109e015 Enabling the libc tests
Currently these tests are disabled in the regression_chk
application.

Change-Id: Ibf53b25a08201db0b50df7dca96f638b419ea4a8
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:55 -05:00
Yonattan Louise 991d16c7ae Rename K_ArgsBlocks to _k_server_command_packets
Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" -o -name "*.arch" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I855f3d468e5752abfe7a3c768c5a613566a697a0
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:54 -05:00
Yonattan Louise 068a98add2 Rename K_TimerBlocks to _k_timer_blocks
Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" -o -name "*.arch" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Ia753f8415b656e3b819a9cdb1eb24d02b750f9d2
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:54 -05:00
Benjamin Walsh b4484a7816 nano_lifo: allow multiple fibers to pend
The nanokernel LIFOs could only have one fiber pending on one of
them concurrently. If a second fiber wanted to take a contested
LIFO, if would kick the pending fiber out of the wait 'container',
but would not put it in back in the ready queue with an error.  Instead,
it would, for all intents and purposes, remove it from the scheduling
mechanism of the nanokernel: the fiber would be 'lost' at that point.

The nanokernel LIFOs now make use of the fiber pend queue, and thus
allow multiple fibers to pend concurrently.

sysgen is updated since the microkernel initializes statically two
LIFOs, one for the command packets and one for the timer packets, and
the LIFO data structure has changed.

The nano_timers use the LIFOs and look at their internals, so they are
updated as well.

Change-Id: I250a610fcdee9d32172c88d38e6c3cfd5b437d15
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:53 -05:00
Allan Stephens 2b39dde39c Relocate definition of microkernel server's stack area
The microkernel server's stack area can be defined by the kernel
library itself, without relying on sysgen to do it.

Change-Id: I9359946ce9ca9138970db4e264fd25d8b92034c6
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:52 -05:00
Allan Stephens 2a7151ac9f Rename _k_node_workload_get() to _k_workload_get()
Shorten API name by removing extraneous wording.

Change-Id: Iff67c4d7e82b7093e3d4d8a7ce61a3011e0ff517
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:52 -05:00
Allan Stephens e3d5ec6d7a Removing _k_this_node
Since the microkernel now supports only a single processor, there
is no longer a need for a means to identify it.

Change-Id: If5b2d8e114d8a3bfdd597bc23d70be5e1fa2238c
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:51 -05:00
Dan Kalowsky fe1226713c Renaming InitPipe to _pipe_init
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I4a3755e77038eccbd31f8247cb230052dd3edccf
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:51 -05:00
Andrei Emeltchenko 8f539793ef Bluetooth: Add compile test to sanity_check
Add nanokernel init sample to sanity check compile testing.

Change-Id: Ifef4116a6cc7307f7b17a62d066f33b243a2e6ce
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:13:50 -05:00
Andrei Emeltchenko de1477759c Bluetooth: Add Bluetooth microkernel smoke test
The test registers Bluetooth driver to Bluetooth the subsystem and
runs bt_init() which calls open() callback. We return expected error
to indicate that there is no real Bluetooth device attached.

Change-Id: I39526acbb25e7d4bb322d4511659a40505874592
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:13:50 -05:00
Andrei Emeltchenko 3760dc8709 Bluetooth: Add Bluetooth nanokernel smoke test
The test registers Bluetooth driver to the Bluetooth subsystem and
runs bt_init() which calls open() callback. We return expected error
to indicate that there is no real Bluetooth device attached.

Change-Id: I1b324c82ce8be2ce73f2b41a07135b0bc76eed61
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:13:50 -05:00
Allan Stephens ec7b9fba4a Allow system generator to support tickless kernel
Revises sysgen so that it doesn't generate timer-related variables
or executable code for a tickless microkernel. Also corrects some
misleading comments about dependencies on timers.

Change-Id: I5655e32fcab22d9991f2f8e0f2db9557642b6b54
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:49 -05:00
Allan Stephens 1c32b5d720 Introduce NUM_TASK_PRIORITIES configuration option
Allows the number of task priority levels supported by the micro-
kernel to be configured, rather than fixing this value at 64.
Setting NUM_TASK_PRIORITIES to N provides support for task
priorities 0 (highest priority) through N-1 (lowest priority).
The lowest priority is reserved for the kernel's idle task.

This enhancement allows system designers to significantly reduce
the size of the microkernel's task priority queues by eliminating
unneeded queues. In systems requiring only a few task priorities
over 500 bytes can be saved.

Change-Id: I497aac608a3d548fb1b024068c08a5f494c3d524
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:48 -05:00
Allan Stephens 09ef176ce0 sysgen: Fix PEP8 standards violations
Corrects issues introduced by recent global variable renaming that
resulted in lines exceeding PEP8 guidelines. (Running the command
"pep8 scripts/sysgen.py" once again reports no issues.)

Change-Id: I6dff820bc3529cbffbc930c13e98171140c09a52
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:48 -05:00
Peter Mitsis 4780fbb4bb Remove code coverage code from sanity_chk scripts
Code coverage analysis required Simics (which is not supported).

Change-Id: Ifec09ee5699bcd1ea423eaf544ce060ec1dca04d
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:13:48 -05:00
Dan Kalowsky 3ff1132374 Re-alinging all the comments in sysgen after variable renaming has
made them no longer aligned.

Change-Id: Ia21b7db1f517c6cbe8a5ae501569aefa4d670210
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:48 -05:00
Dan Kalowsky a6f9d1a7b8 Renaming K_mvdreq to _k_movedata_request
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I32e0105c90ef1a7f7326dd43c39c0eb85e173ee3
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:48 -05:00
Dan Kalowsky 9cd404161d Renaming K_nop to _k_nop
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Iefd087790814dbfa10ee942f4f93d955b25f42f1
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:48 -05:00
Dan Kalowsky 33bb451faf Renaming K_workload to _k_node_workload_get
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I6b3d61c9ae7b024bb82356678cc2fc1d433dd3bc
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:48 -05:00
Dan Kalowsky 24ad23d7fb Renaming K_offload to _k_offload_to_fiber
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I0e29bab5dcb7e00a394304a23e4b91e3e7b4cf75
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:48 -05:00
Dan Kalowsky b0d718d116 Renaming K_dealloc to _k_mem_map_dealloc
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ia233946c1c4cce4a9a1b0c72a5f5025e0456441d
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:48 -05:00
Dan Kalowsky 1836e017ce Renaming K_alloc to _k_mem_map_alloc
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ia99f28bd2fa89c0a1d592276bacdcaa679a624dd
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:48 -05:00
Dan Kalowsky 87e125fcb4 Renaming K_event_signal to _k_event_signal
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ie8fecf7de481a6e11879124100362abe010c63a0
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:48 -05:00
Dan Kalowsky 435dad4381 Renaming K_event_test to _k_event_test
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I725ef09143213ef869064ca3b22bc35e4804089d
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky e723e9a943 Renaming K_event_set_handler to _k_event_handler_set
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ia74ced653daf4b4ea139f7316d1a9e5a5ea9a925
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky 672bda57cd Renaming K_queue to _k_fifo_ioctl
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ibbfef7d1a6a26abca56d49733ce54f56ec5336fc
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky fee5db1259 Renaming K_unlock to _k_mutex_unlock
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Iec1871232b52bcc39bfc37d8f02bb4ce74f98ad3
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky 3550116e82 Renaming K_elapse to _k_time_elapse
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ic8106240bff4fbfb9d1bf446d343b3e8631be45c
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky 167e977cbf Renaming K_sleep to _k_task_sleep
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I8c99b555275243772e91248659e340b07d41be98
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky b28fb27e1d Renaming K_wakeup to _k_task_wakeup
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: If11051da4478ef34dddd5661202b7d3486a7fba3
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky 8b4d6a618f Renaming K_stop_timer to _k_timer_stop
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ie765eb9f4b075b66d69e0f35f5f0771df9fd2244
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky e0fab87035 Renaming K_start_timer to _k_timer_start
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I2aca9bffe8ce6f61f9c272fc8ba009ffc94ec21b
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky f23bb63606 Renaming K_dealloc_timer to _k_timer_dealloc
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I3119cb67a64398426ef783c915b865fe02f7127a
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky 7a21cc0d2d Renaming K_alloc_timer to _k_timer_alloc
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Iecf0984c786b48aacc23947b2a033995c3996d09
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky fb0cf2ed7d Renaming K_yield to _k_task_yield
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ie07e38bca912647e49a2c0914001690b7c545f3b
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky 3a9ff35beb Renaming K_set_prio to _k_task_priority_set
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I725126b52c68bbcbc1fe832fa892b67b6a60146a
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky ff37393a07 Renaming K_groupop to _k_task_group_op
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Iff54480375197fc1fad947a8dc98b970e142dcaf
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky cc84ca20d6 Renaming K_taskop to _k_task_op
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Icb28c7393314118d07eeaad2db634f2afe391e02
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky 52de992543 Renaming K_inqsema to _k_sem_inquiry
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I5eef6b5686f4f0bea525f8d3fcbee09a264289da
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky 46478250f1 Renaming K_resetm to _k_sem_group_reset
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I4b7b8a624b8cdd56f0ed95721b58077c7d412d0b
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky d8f5461f2d Renaming K_resets to _k_sem_reset
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I0656956bd43a952592ed0a3ebed7e4b9db5cc556
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky 2ba9c244a3 Renaming K_signals to _k_sem_signal
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I010e56fc6b17337863efeb23ea4b64bd9d09168a
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky 43a23786d9 Renaming K_signalm to _k_sem_group_signal
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Iebde762379bf36c43c802c6ec2febf8cd867171c
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky 30ac0b3007 Renaming K_waitsreq to _k_sem_wait_request
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I9ed961ac9f01ead2ec688febc579874407e3b6db
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky aa0eefb856 Renaming K_waitmany to _k_sem_group_wait_any
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I894597fa00b9364451f6609c1b7c3b550c5c0c32
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky 4ad6fe35ca Renaming K_waitmreq to _k_sem_group_wait_request
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I60d8a5ef34b7a6763f682f517319f81145ba9b1e
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky 32d45baab0 Renaming K_waitsrpl to _k_sem_wait_reply
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ie633b6fb90775e48c59b73da52ba2b1be4ae35d3
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky e941440ae6 Renaming K_waitmrdy to _k_sem_group_ready
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I2e7da030c447a41bb427b8599f97d84f1c1c1774
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:47 -05:00
Dan Kalowsky c822a446a7 Renaming K_waitmtmo to _k_sem_group_wait_timeout
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ie71e119d39a15d223a1c4f9d94f729f84dae1ed9
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky b330543d90 Renaming K_waitmacc to _k_sem_group_wait_accept
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Idfa1822876c05b4416e7e254bec7c27195ed9737
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky 06c2417d4e Renaming K_waitmcan to _k_sem_group_wait_cancel
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ifffa92fb53cafa5c76dd66a5910554226951bffa
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky 34b2c67080 Renaming K_waitmend to _k_sem_group_wait_end
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Id1c504bb09875fba3e75c80810eef3e0b037d125
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky 979b40f77f Renaming K_deqreq to _k_fifo_deque_request
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I7bcf9d9df788caec6d4e4dd29d1c0b58efc87af2
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky 10aaf5aefa Renaming K_deqrpl to _k_fifo_deque_reply
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"


echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ic3f0816ebc4e7df7bfdb90005d774abd748d14af
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky ec121586f0 Renaming K_enqreq to _k_fifo_enque_request
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Iba93e81cd3daec24831c45d31dfd905327e7ec18
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky e0d338a7e9 Renaming K_enqrpl to _k_fifo_enque_reply
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I3d006b76386a4ac8fc82192bf83c028bc66455ed
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky ec1dd85846 Renaming K_lockreq to _k_mutex_lock_request
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I0113be3f432d96857cea651d22ebf9822117101f
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky d3c35c2d40 Renaming K_lockrpl to _k_mutex_lock_reply
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I8aefe976518badd3acbe2b246f695931d94c58ed
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky 2a6e4ed661 Renaming K_RelBlock to _k_mem_pool_block_release
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I7fc8d96a722970d6c5333544f047cd1a6d6690b2
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky b3b8e72dab Renaming K_GetBlock _k_mem_pool_block_get
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Ibbca87c801157ef48996e86f7b4b3a87eab5628a
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky dc703d8f81 Renaming K_gtbltmo to _k_block_get_timeout_handle
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I366189b4cf896020c10dbeed25c7d104a0d106a1
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky 770c5fc42c Renaming K_GetBlock_Waiters to _k_block_waiters_get
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I1a4bdbb5d7248896830ea25d2126b1bb9b918878
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky fe32b0717b Renaming K_Defrag _k_defrag
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Id6215f2aaab918ce13e99909c21f67647cf7229e
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky a536a18693 Renaming InitPools to _mem_pools_init
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I9f3fc202c580d158a18737ff0f16a25952902ae4
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky 8f41d89142 Renaming K_alloctmo to _k_mem_map_alloc_timeout
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I5fa261fc3798fc3f2b1c608fcb74744741ec74f6
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky 12af4313ea Renaming InitMap _mem_map_init
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I0eb8925e53f00b7993374fd8ed3e6ac950dfc1ef
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky 629d73d857 Renaming K_senddata to _k_mbox_send_data
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I6e0edb61dcac091f87c9ffc8fd8bf507ba075367
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky 7651e26d9d Renaming K_recvdata to _k_mbox_receive_data
Updating micro kernel functions to follow a consistent naming convention.
Part of that process is the removal of camelCase naming conventions for the
preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I5f879ff27f8b7d02ab148cb05dd1916a831a51a8
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky 8ad329b09e Renaming K_recvreq to _k_mbox_receive_request
Updating micro kernel functions to follow a consistent naming
convention.  Part of that process is the removal of camelCase
naming conventions for the preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I79b03884f154507aa22c42c3c89136c202c2c9e0
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky 88343e969c Renaming K_recvrpl to _k_mbox_receive_reply
Updating micro kernel functions to follow a consistent naming
convention.  Part of that process is the removal of camelCase
naming conventions for the preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: If7f5e78d6dd5492dbbbcc080c2e822f33eb1c967
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky 9ac922e096 Renaming K_recvack to _k_mbox_receive_ack
Updating micro kernel functions to follow a consistent naming
convention.  Part of that process is the removal of camelCase
naming conventions for the preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I3de0a16879f142ef20830dfc429c989f10c2cd92
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky 5ea892cffc Renaming K_sendreq to _k_mbox_send_request
Updating micro kernel functions to follow a consistent naming
convention.  Part of that process is the removal of camelCase
naming conventions for the preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I628e057f54eb72901c3753b6b8b4849c4cd046c0
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky 35d15ec09a Renaming K_sendrlp to _k_mbox_send_reply
Updating micro kernel functions to follow a consistent naming
convention.  Part of that process is the removal of camelCase
naming conventions for the preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"
find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s -o -iname \*.kconf \) \
       -not \( -path host/src/genIdt -prune \) \   \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I02122837d74c9d7c5c406e644feda6923b5161f2
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky 217de05b4b Renaming K_sendack to _k_mbox_send_ack
Updating micro kernel functions to follow a consistent naming
convention.  Part of that process is the removal of camelCase
naming conventions for the preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: Iccdd40f652f71273830155349a957839be970bd9
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:46 -05:00
Dan Kalowsky e91808154e Renaming K_eventtesttmo to _k_event_test_timeout
Updating micro kernel functions to follow a consistent naming
convention.  Part of that process is the removal of camelCase
naming conventions for the preferred_underscore_method.

Change accomplished with the following script:

#!/bin/bash
echo "Searching for ${1} to replace with ${2}"

echo "Checking C, CPP, H, HPP, and s files..."
find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

echo "Checking KCONF, LST, and PY files..."
find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \
       -not \( -path host/src/genIdt -prune \) \
       -not \( -path host/src/gen_tables -prune \) \
       -print | xargs sed -i "s/"${1}"/"${2}"/g"

Change-Id: I3919b2dda4a37c2c81e070179eae251131b14be4
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-05 20:13:45 -05:00
Yonattan Louise e2be61c15e Rename K_StackSize to _k_server_stack_size
Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I56ee3d3ab6d1254359adcffa4d86c1bf2e20537a
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:44 -05:00
Yonattan Louise 6120750f19 Rename K_max_eventnr to _k_num_events
Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Idcd3b4dfd86b6e835638623fa7b39401cabdee06
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise 91791874e8 Rename K_TimerFree to _k_timer_free
Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I0a807704a81b1faf4b79fe3832830c4994795fe3
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise ece60ad6f5 Rename K_ArgsFree to _k_server_command_packet_free
Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I175a8bcd29e21d64de735fba9a2e2ee2bc57993e
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise 9bbb6e1e7b Rename K_Task to _k_current_task
Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Ic81b4ad7edf476da61ae62df627866e0446714d7
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise f282dbcb1f Rename K_PipeCount to _k_pipe_count
Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I10a1bff593c56cf6703920b9feccd10e32cc65ef
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise d109105597 Rename K_PoolCount to _k_mem_pool_count
Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I413e59e0200c2b8eba1bee79e444b3492de8fb7c
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise 5c3646b5d9 Rename K_MapCount to _k_mem_map_count
Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Ifdfb9042ff4e83f6d7a8430d47c573b85eca9048
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise 86c128d3ba Rename K_PipeList to _k_pipe_list
Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I77d459388aa26eaa52d0f59234d761f3ca7d1496
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise 652796d345 Rename K_PoolList to _k_mem_pool_list
Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: If9b4747ffa6f9dae4cb77717931fed445ae43721
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise e960e23410 Rename K_QueList to _k_fifo_list
Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I8996c427a98f542052b40bcc9f623c05f6d9bb21
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise 054d3f0787 Rename K_SemList to _k_sem_list
Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I2045fab9f67fda6f0d26a53d47561a705046d4db
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise 69bc5940d2 Rename K_MutexList to _k_mutex_list
Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I719d6f1a89b343d149eded7227534ee30055e030
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise 65ffb9e81e Rename K_MbxList to _k_mbox_list
Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Ibe83bc837cdae54cf553b80efd989ad321447873
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise 59d838355a Rename K_MapList to _k_mem_map_list
Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I12ab3ee4111a32afc674b654bf0a914012ec0318
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise 3473bb7609 Rename K_TaskCount to _k_task_count
Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Iafa862861cc6b56212c036acc0bb182e2c620e7b
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise a07990ecea Rename K_ThisNode to _k_this_node
Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I1b3cb984fa75cd1a83649c81787a40aee97f8a32
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise bf650d4fe5 Rename K_TaskList to _k_task_list
Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: I4c27dd98967dedbb15e28618f5dd8f26b919579d
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise 964a9c9d77 Rename K_PrioList to _k_task_priority_list
Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Idff77a32adb875789a57d2c9131b87769bf6f174
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:43 -05:00
Yonattan Louise a12dd63c74 Rename _minik_stack to _k_server_stack
Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Iad6d39bea0da42633e40e7e7d5b64d2a05efbad0
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:42 -05:00
Yonattan Louise 6530f4a26b Rename _minik_func to _k_server_dispatch_table
Updating global variable's name to follow a consistent naming convention.

Change accomplished with the following script:

   #!/bin/bash
   echo "Searching for ${1} to replace with ${2}"
   find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" \) \
            ! -path "./host/src/genIdt/*" \
            ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g';

Change-Id: Ifb54b2dbdc726e87b10c33776c0d1815d56776cd
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:42 -05:00
Inaky Perez-Gonzalez 9343cc7ca0 qemu: use a pidfile to avoid killing all and thus enabling parallel runs
When killing QEMU, we defaulted to either killall or find the first
qemu process. This intefered with parallel builds, as we might kill
some other build's qemu process.

This makes QEMU write a pidfile in the local outdir directory and kill
only that when done.

Change-Id: I498b1e0833fcda9a7bd50111616dfba015e566bd
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-02-05 20:13:42 -05:00
Peter Mitsis 6feec0d462 Remove references to host server channels
The host server channels are not used; their function pointers are always NULL.

Change-Id: I7616499f5695b83a015e6ee18c004aba96838d63
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:42 -05:00
Peter Mitsis bd969c97cc Remove k_boot.h and flashboot.c
The files k_boot.h and flashboot.c are obsolete.

Change-Id: Ieab69e714462079c2a836dacb7c5bab53d2e3b2b
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:13:41 -05:00
Peter Mitsis d1179f2c54 Remove Dest field from k_args
The 'Dest' field in the 'k_args' structure is only relevant to
a multi-node system.

Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Change-Id: I6942f503af6ebadd62a2bf10b2a3bd0c81850bb8
2016-02-05 20:13:41 -05:00
Allan Stephens 4baf0f0e15 sysgen: Detect invalid number of arguments for keywords
Now terminates process with an error message if there is a mismatch
between a keyword and the expected number of arguments that follow it.

Change-Id: Ib1902161937cae482e52be449c89789f8ff816a5
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:40 -05:00
Allan Stephens d00b802a6d sysgen: Terminate build when error detected
System generator now terminates with a non-zero exit code when
it detects an error, allowing the build system to detect the failure
and terminate the build.

Note: Sysgen only detects invalid keywords at this time. It would be
nice if it also detected other syntax and semantic errors.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:40 -05:00
Allan Stephens 5b76cee54e sysgen: Improve readability of kernel_main.c
Adds blank lines to kernel_main.c output file in places where
unrelated variables were juxtaposed. Also suppresses an unwanted
blank line that occurred when no project-specific events were
defined.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:40 -05:00
Allan Stephens 4cb503d165 sysgen: Standardize output file header creation routine naming
Makes the generation of kernel_main.c more consistent with the
generation of the other two output files.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:40 -05:00
Allan Stephens 3cddec6551 sysgen: Standardize newline creation in output files
The routine that appends data to kernel_main.c no longer adds
a newline character, similar to what is done during the generation
of microkernel_objs.h and vxmicro.h.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:40 -05:00
Allan Stephens 04012be07c sysgen: Relocate code for processing output directory name
Reworks output directory name processing so that it is invoked
at the bottom of the file, just like the rest of the program's
mainline. (It's previous location wasn't incorrect, but it could
be easily overlooked.)

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:40 -05:00
Allan Stephens 779932139c sysgen: Improve location of functions and global variables
Relocates a handful of functions and global variables that were
located in places that were logically inconsistent with most other
functions and variables.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:40 -05:00
Allan Stephens ed9499e83f sysgen: Enhancements to comments
Adds, removes, and revises various comments to make it easier
to figure out what is going on.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:40 -05:00
Allan Stephens fc86999380 sysgen: Cosmetic changes to achieve PEP 8 conformance
Makes cosmetic changes to address all issues reported by
the pep8 Python programming style tool.

Note: All future changes to sysgen should be run against pep8
to ensure no new issues are introduced.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:13:40 -05:00
Yonattan Louise 3322984234 Add patch for QEMU that solves the interrupt locking issue with ARM in QEMU.
Due to interrupt locking for ARM is not implemented by QEMU we provide
a temporary solution for internal purposes that works for the BSP = ti_lm3s6965.

This patch applies to QEMU v2.1.

Change-Id: Id14b66a18d02c53280c19d9a11fcf99256b3f5fb

Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 19:45:10 -05:00
Yonattan Louise cfd8417fe8 Add copyright header to do_checkpatch script
Adding copyright header to the file script/do_checkpatch.sh

Change-Id: I3160a68b6715ea35aa6c1d3529e2b2483bb44b5c
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2015-04-15 14:06:04 -05:00
Anas Nashif edb24ef6eb remove QA scripts
QA related scripts should be either maintained out
of the tree or come as enhancements to the sanity check
scripts.

Change-Id: I6dceed81f66b84cedad2dd84fd42d6b388de3468
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2015-04-13 18:47:50 -04:00
Inaky Perez-Gonzalez 8ddf82cf70 First commit
Signed-off-by:  <inaky.perez-gonzalez@intel.com>
2015-04-10 16:44:37 -07:00