Commit graph

330 commits

Author SHA1 Message Date
Anas Nashif 5ca45ba3f2 Zephyr 1.5.0
Change-Id: Ie7a145c02a320bdb3c5cbce149d84d43bd194d76
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-08-26 17:35:49 -04:00
Anas Nashif 0e6c11ac5d Zephyr 1.5.0-rc4
Change-Id: I3299be2abed8618c54448e66802c52acf94158a9
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-08-25 22:43:11 -04:00
Juan Manuel Cruz 5bd398d3e3 win-build: Fixes Makefile target names including char ":"
The build system uses absolute path names to generate
target names. In Windows, absolute path names include the
character ":".
Makefile does not support target names with the character ":"
on them.
The target names involved are PHONY. The commit modifies the
Makefile logic to not include directory names in zephyr-app-dirs
and clean-dirs targets.

Jira: ZEP-517

Change-Id: I37b62f04b8bc6bffbbc19e0e4fd2a827347e5cbd
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-08-25 11:09:35 +00:00
Ramesh Thomas cc74572c5b fs: Adds diskio interface
Adds the diskio interface for the FAT file system.  This
revision uses RAM to emulate disk storage.

Origin: Original
Jira: ZEP-285
Change-Id: I7a30c8761d5ed9b564f1d1e08482c5ef199d7372
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-08-01 16:46:38 -07:00
Kumar Gala 44b712da85 build: use quiet cmd for AR of libzephyr.a
Introduce a quiet_cmd to create the .a for libzephyr.a so that we can
get see explicitly what's going on if V=1 is set

Change-Id: Id0a3cf0aefac4f28bab1da3ba244b7dcead394a8
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-07-31 21:02:32 +00:00
Anas Nashif f4ed108ada build: create libzephyr.a and link it in instead of objects
Enabling building of the kernel archive as the first step towards
split kernel and app builds.
An application will be able to link against this archive in the final
step of the build process.

Change-Id: If0abc7002d19ca2ca10c7babd83fe1dc6fccebfa
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-07-31 18:10:02 +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 d9a84c5c77 Makefile: link arch/ last
The IRQ implementations of ARC, ARM, and Nios II use .gnu.linkonce
sections for declaring entires in the sw_isr_table array. It's
imperative that arch/built-in.o be linked after everything else
as we want custom interrupt handlers to take precedence over the
default spurious interrupt handlers.

Currently, any interrupt handlers defined in ext/ or usb/ will not
be installed properly on the above mentioned arches.

Change-Id: Ib3fb21ff1ef114678906f130c268c266535954f1
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-27 15:48:23 +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
Andrew Boie 11693c1bf9 build: use -Og instead of -O0 for CONFIG_DEBUG
From the GCC manual for -Og option, introduced in GCC
4.8:

Optimize debugging experience. -Og enables optimizations
that do not interfere with debugging. It should be the
optimization level of choice for the standard
edit-compile-debug cycle, offering a reasonable level of
optimization while maintaining fast compilation and a
good debugging experience

Change-Id: I65751cf3117bc2e6f70a7008b170126160cfa48c
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-25 18:09:14 +00:00
Kumar Gala 62a9f9cdd5 build: Make sure sysgen related header files get updated
Since sysgen copies kernel/microkernel/include/micro_private_types.h and
kernel/microkernel/include/kernel_main.h we need to make sure that
sysgen gets invoked if those files ever change.  Otherwise we might have
stale versions.

Change-Id: Id84522e3af693f1323f73c9642d1884f0be4b7cf
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-07-18 18:46:31 +00:00
Adrian Bradianu 7a16ade6d1 usb: Add USB device core layer
USB Device core layer is a hardware independent interface between USB
device controller driver and USB device class drivers or customer
applications. It's a port of the LPCUSB device stack.

Change-Id: I9371ffab7034d20953fec0525e72fbe9e094c931
Signed-off-by: Adrian Bradianu <adrian.bradianu@windriver.com>
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
2016-06-30 17:51:56 +00:00
Andrew Boie 206d0b4497 Revert "qemu: pass -serial stdio instead of -serial mon:stdio"
This reverts commit e697621371.
It is causing problems dependeing on what version of QEMU is
used, with the SDK QEMU the terminal has to be 'reset' after
running (the opposite behavior of the Nios 2 build).

Change-Id: I6756eb0cf8edf4faa36f3a5e1cf0e456f146e1d8
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-30 16:50:02 +00:00
Kumar Gala 23af1e928e build: Fix application object files placement when building out of tree
For the application object files to get properly placed in the outdir
when the source files are outside of the zephyr tree we need to set
$srctree in kbuild to the parent dir of the application source code
rather than getting the default of $srctree being set to $ZEPHYR_BASE.

By doing this we are able to get the kbuild system to place the object
file results in the outdir rather than in the application source dir.

Jira: ZEP-369
Change-Id: I4d3ba67a4a38c15978d5bf7e1f0a912e9bf00f08
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-06-30 16:49:40 +00:00
Kumar Gala ff694e92b5 build: Split out building of application code
Seperate building of the application code from the zephyr OS code.  This
is in prep for both having a libzephyr.a for the OS and to fix where
the application object files get put when building out of tree.

Change-Id: I43f3b54d11f41aaf35350de7462c5cd556804092
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-06-30 14:36:38 +00:00
Vinicius Costa Gomes 28b79191d4 build: Fix not allowing the host tools to be crosscompiled
There are situations that the host gcc is not able to generate x86
binaries, in those cases, the user should point HOSTCC to a binary able
to generate the correct type of binaries.

This also allows './scripts/sanitycheck' to be run in systems where the
build tools are prefixed by default.

Change-Id: Id1fc247f8a820e19bb3d4e8119634f8300e7ebac
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-06-29 05:37:58 +00:00
Andrew Boie e697621371 qemu: pass -serial stdio instead of -serial mon:stdio
You can now exit out of QEMU using Ctrl-C, and this resolves
some issues where the terminal could get messed up if QEMU
terminates abnormally.

Change-Id: I94ca66333bf9035e3627f28bbd2c152cf981a13f
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-29 00:08:20 +00:00
Andrew Boie be13e26586 build: add 'qemugdb' target
This new target works much like 'make qemu' but fires up a local GDB
server on port 1234 and pauses execution

Change-Id: I87fd174c66dcc9f2f43b5b1204cc5c34f741622d
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-28 15:56:05 -07:00
Maureen Helm 280eadffdd ksdk: Add Makefile support for ksdk device and CPU
Translate the SOC name and part number into the ksdk device path and CPU
macro respectively. This will be used by future ksdk shim drivers and by
the ksdk itself.

Change-Id: I40e94441ee032bfbed7df834be8000d95be53250
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2016-06-20 17:38:47 +00:00
Andrew Boie 63cea24896 misc: add config to omit frame pointer
Change-Id: Ia69c14addded7563a24f15d4a3408fcc2c8e673a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-16 18:15:59 +00:00
Anas Nashif 1aaa11b213 libc: change linking order to avoid over-stripping of symbols
At the moment libc gets linked, all unused functions get
stripped and the libqmsi gets linked but __assert_func is not
available.

Change-Id: I7fc2f8b9136f858023b3e983575869a2206ba9ce
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-06-14 16:55:53 +00:00
Anas Nashif d53c237b60 build: do not reference full path of map file
Change-Id: I5e8c9439d0e73657b73e38663f85a080c55d86b5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-06-14 16:55:52 +00:00
Anas Nashif 6f6504c447 Zephyr v1.4.0
Change-Id: Iedb103de08349c3a046247cbdcf6498126765d72
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-06-03 12:17:40 -04:00
Anas Nashif 8b29fb720c Zephyr v1.4.0-rc3
Change-Id: I74707d577deb7f2001c85730a1bbdf9fe1fc39ac
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-06-02 19:54:05 -04:00
Anas Nashif f86452493f Zephyr v1.4.0-rc2
Change-Id: I6c5346551d58991ed9cebc93a04c3b099ddd18b2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-06-01 19:51:00 -04:00
Anas Nashif b05e2dea29 Zephyr v1.4.0-rc1
Change-Id: I3883cd6dd8c80f3b5b521df98edf4e0c52992983
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-29 23:24:24 -04:00
Anas Nashif 37b1d1eb55 ext: include headers based on HAL being used
For CMSIS we now have HAS_CMSIS which needs to be added to the
SoC definition.
Instead of changing the main Makefile we now include a sub-Makefile
with all related header and library paths that are hosted in
ext/

Move redifintion of LIB_INCLUDE_DIR later to get variables defined
in Makefile.toolchain.*

Change-Id: I9f90f90247c2a66b4565427b89d4e1d4dd5c9622
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-27 01:38:23 +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 489f42328c qmsi: move drivers and hal to ext/hal
This is external source code maintained somewhere else. Put it
under ext/ for clarity and maintainability.

Change-Id: I9e7c9d0948a2ba893006e316dc21d9b1a9edfa93
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-23 21:32:30 +00:00
Benjamin Walsh 0107c80c29 misc: clean up __ASSERT warnings during build
By default, instead of spamming the build output with one warning per
file where __assert.h is included when CONFIG_ASSERT=y, only display a
warning at the end of the build.

Also limit the range of CONFIG_ASSERT_LEVEL between 0 and 2.

Change-Id: I95ffd1bcec9535de1afabc047814e5c6f5b9c2c1
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-05-18 22:06:54 +00:00
Anas Nashif 083a7ad0df build: move library related code to lib/
Cleanup main Makefile and remove all library related code to
lib/ to better support the increasing number of libraries and
to keep the main Makefile clean from library dependencies.

Jira: ZEP-308
Change-Id: Id83cf309020604b8eab8d80cad0021905d5b5f7a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-16 19:43:50 +00:00
Anas Nashif 0b2c44a771 tinycrypt: move from lib to regular objects
tinycrypt was built using the lib- scripts without any real benefit. We
also had a wrong placement of the Kconfig files under misc/ and a Kconfig
file for Crypto that was never used before.

Change-Id: I82d5902d92e7c06e10a95f418d9ead3cbcabcce4
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-16 19:43:50 +00:00
Anas Nashif a0cf03b1c7 build: add extra dependency for zephyr.lnk and rebuild with new boards
When building an application for a different BOARD, the .link file
was never updated causing issues with linking.
Also, make sure we restart the build process when the board has changed.
This guarantees that the file is recreated when the dependencies have
changed.

Jira: ZEP-239
Change-Id: Ided3a71c03fd8b2c6ab9c2bf8370104cd5071c08
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-16 19:43:50 +00:00
Juan Manuel Cruz 164ecd0df9 build: allows CC and CCX override from Makefile source files
Jira: ZEP-177
Change-Id: I318d6530d5ee369f5f154fde44377cec46c1624d
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-05-14 15:55:03 +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
Fabrice Olivero 35dcc0a4cb qemu: Add possibility to redirect serial port to pseudo TTY
Change-Id: I9a3b6ecd85b88ec59db29af727ed3ccbd47e42a2
Signed-off-by: Fabrice Olivero <fabrice.olivero@intel.com>
2016-05-12 02:20:31 +00:00
Andrew Boie ff872dc349 build: rename non-generated linker scripts to .ld extension
Avoids confusion with .gitignore rules, which were inadequate to
cover all the places where these files are found. At least in
VIM, these files are now syntax highlighted correctly.

Change-Id: I23810b0ed34129320cc2760e19ed1a610afe039e
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-05-09 18:09:26 +00:00
Anas Nashif 74326ec58b build: use gcc instead of ld for linking
We now have to supply location of libraries (libgcc, libc) and header
directories to the build system. This can be solved in the
Makefile.toolchain.* file for known toolchains but becomes a problem
when supporting 3rd party SDKs and cross compilers.

Linking with ld requires ld to know where all the artificats of the
compiler are. Use gcc instead to make use of the internal information
available in gcc about additional libraries and headers.

Jira: ZEP-241
Change-Id: I15a3b812467b7ae878226f7e5532d538d2720268
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-04 10:27:18 +00:00
Anas Nashif 0ce35823a4 Zephyr 1.3.0
Change-Id: I44ebde6cab75fbf64666c1a574ec57463a7167b0
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-02 20:50:45 -04: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
Anas Nashif af70a288ee Zephyr 1.3.0-rc2
Change-Id: I796f4f5e9d21838224f4afaf5afc20bca1760046
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-27 19:18:00 -04:00
Anas Nashif bf1356c969 Zephyr 1.3.0-rc1
Change-Id: I794f435cd882abc87f2f37a5c07b6ba0a08ba5f3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-26 00:07:27 +00:00
Anas Nashif 7c332df43b qmsi: use QMSI_LIBRARY instead of QMSI_DRIVERS
For linking with external library, use QMSI_LIBRARY and point
to path of the library using QMSI_INSTALL_PATH

Change-Id: Icd954188a26cc02074aa8fe08a4afdea31879f60
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-22 20:55:36 -04:00
Anas Nashif ef2fc59cab fixed inclusion of limits.h when building with newlib
The -nostdinc flag to GCC makes it not include its own directories when
searching headers, which means they need to be added manually. The same
Makefile line (~657) that adds the -nostdinc is also adding the correct path
for the gcc used to build, using the "-print-file-name=include" switch to get
the correct path for the respective gcc version.

The problem is that including limits.h from newlib will try to include gcc's
version too, which in every toolchain the SDK provides (and at least on my
machine, the same thing applies for the system gcc), limits.h is found under
gcc's "include-fixed" directory, not just include. So another -isystem should
be added with the value from "-print-file-name=include-fixed".

Jira: ZEP-142
Credits: Iván Briano
Change-Id: I33b7d9808d000a7346df4f88df92dc76e31fb2dc
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-19 01:14:39 +00:00
Anas Nashif d2f1c76686 new SoC naming convention
Use SOC_FAMILY and SOC_SERIES to identify soc families and series
and to point to the correct linker files and files related to a
specific SoC.

Change-Id: I8b1a7339f37d6ea4161d03073d36557a40c0b4a6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-18 21:24:59 +00:00
Anas Nashif a02c34ef0b soc: introduce SoC families and series
Add additional layers when defining SoCs to allow reuse among SoCs
of the same family and architecture.

The Board is the first location where we search for a linker.cmd file,
if not found we look for the linker file in
arch/<arch>/soc/<family>/<series>

Change-Id: I51d5e9a056220d0bd2ae0fa31474ffe63568e698
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-18 21:24:59 +00:00
Juro Bystricky d57a503a55 Makefile: Fix linking order of libraries
Link with libm.a before libc.a, as libc.a can contain
references used by libm.a.

Change-Id: I5cde8f2e323f59ecae452a8a868a5d54942e9f39
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
2016-04-09 14:31:19 +00:00
Anas Nashif fb663cac0d Zephyr 1.2.0
Change-Id: Ie223f458776c81439db8cd4c3a25b4753599588b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-02 08:45:35 -04:00
Anas Nashif 1d894f98c2 Zephyr v1.2.0-rc2
Change-Id: I36fd9b96d247184b4a986467f1609a9c3b0cbd9f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-31 21:22:26 -04:00
Anas Nashif 65bb5a324b Zephyr 1.2.0-rc1
Change-Id: I213138a6552ddf7dcac5afbb9c7f5f4957570133
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-27 18:35:53 +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
Anas Nashif 11e268de9a Zephyr 1.1.0
Change-Id: Ib29996cadfaeb977c16a30ae828732f316791e1f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-05 06:57:40 -05:00
Anas Nashif 8569839666 Zephyr 1.1.0-rc1
Change-Id: Iafe6fbee5a3ba603963fb7bcbf2b28f1875b1242
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-02 12:56:17 +00:00
Anas Nashif a77c7d819a improve 'make help' and remove config targets
- Put kconfig targets in a new target 'kconfig-help' instead of showing
  it by default.
- Show how the the different boards can be used with make BOARD=<board>

Change-Id: I481d4acaf72b1f05925c6f56e510329681da8e11
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-17 13:42:08 +00:00
Benjamin Walsh 76c76a1977 kbuild: support arbitrary dir for Makefile.app
The location of Makefile.app can now be specified via MAKEFILE_APP_DIR
instead of implicitly being searched for in the project directory.

Change-Id: Ib86bf25e210d9c3749c5811b6e36376f59e3cd32
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-11 14:20:03 +00:00
Anas Nashif 027b69e0d5 Zephyr v1.0.0
Change-Id: I977bd0705a901440221010b577beec784f16a566
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-08 21:32:24 -05:00
Anas Nashif 492d67a95d Zephyr v0.9.0
Change-Id: I1b734c929a0d16d5cc1949b22731d0730141d065
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:33 -05:00
Anas Nashif fe9eae95e8 link in external application library
When building an application and external build process of an
application specific library can be started by the application which
generates a .a file that will be linked at the final stage with the
Zephyr kernel.

Change-Id: I06fa1a10605ab032801ead8f5ee8d0c85c0bea5c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:31 -05:00
Anas Nashif 20fe678782 link binary with extra options provided by app
A custom linker script might have references to files and defines
provided directly by the application, the EXTRA_LINKER_CMD_OPT
variable can be exported by the application with the needed
includes to satisfy the linking process.

Change-Id: Ic0b3dffa9a6c31fe8ef28f4f45c30266e7327e06
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:31 -05:00
Anas Nashif 105d8c68a2 Zephyr 0.9.0-rc2
Change-Id: Ie9a039141841ee62a596117aa857c63c1a00e323
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:30 -05:00
Anas Nashif 872676c735 build: fix parallel builds of applications
When building with more than 1 job, we were getting:

make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.

Trying to fix this in the Makefile resulted in dependency issues and unsatisfied
dependencies in the compilation and build chain.

Change-Id: Ic73d089cf6a0a0d7b6fd83908b8144c34af25582
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:30 -05:00
Anas Nashif 78e1b0efe1 print message when flashing/debugging not supported
Change-Id: I5ba5e08d534a4e94999fa192a3e5addc039df1ed
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:30 -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 c0c155618e build: set GDB to the right GDB binary from the SDK
Change-Id: I6d0bb5f74600b89aabfb7cf1f21351e64a9b45a7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:30 -05:00
Anas Nashif 3cf1d29d34 disable try-run on windows
Do not try to check for compiler options during build. This fails
miserably on windows.

Change-Id: I8c84f197ca78897755f67e35fd3a75c30c1d3b7c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:30 -05:00
Anas Nashif 7d348b0e71 expand 'make help'
Add information about additional make targets

Change-Id: I82a0df2ab2814e72a52304dfd88c04c0feee70ad
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:30 -05:00
Anas Nashif b8ef593878 Zephyr 0.9.0-rc1
Change-Id: Id3a66d89627808d2189c9cd7d93e836d2435809f
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
Andrew Boie 630280c464 build: fix issue with static interrupts on ARC/ARM
Static interrupts rely on a trick where the _sw_isr_table array
is declared with each element in a different .gnu.linkonce
section, initially pointing to the spurious IRQ handler.

When drivers or apps declare their own interrupts, they override
the element with their own containing the real ISR and parameter.

However, this only works if the initial declaration of the
_sw_isr_table array with the spurious handlers is linked last.
App-specific code was being linked later than the core code,
causing static interrupts declared in apps not to be installed
correctly.

If the _sw_isr_table is moved from SOC-specific code to core arch
code, interrupts configured under soc/ should still also work.

Change-Id: Iec7df47386dfbbf2956a807da27dc8aa6e01b268
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:25:25 -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
Anas Nashif 23be7fd1cd build: rebuild binary if dependencies have changed
We had an issue of final binary not being built when sources
are changed. This adds the required dependencies.

Change-Id: I1676fc63e6857ef604576905a5ae1ee02b0b648a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:23 -05:00
Andre Guedes eda4d59404 kbuild: Remove check from non-existing options
This patch removes the checks related to CONFIG_CC_STACKPROTECTOR_
REGULAR and CONFIG_CC_STACKPROTECTOR_STRONG options since these
options don't exist in Zephyr. According to 186ab6552, they were
copied from Linux but further clean up was missing.

Change-Id: I1d8b4f47319a54b68b6f0b5aec1feb0a247e72e9
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-02-05 20:25:22 -05:00
Anas Nashif fe039db04a override architecture from command line
When ARCH is specificed on the command line the parsing process
is messed up and non-x86 platforms fail.

Change-Id: If63f243bce3cd305ce291de83bbd90c15b4c861e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:21 -05:00
Anas Nashif 9be80e3ed6 kbuild: remove linux modules related code
Change-Id: Iddcb74355dc1d6ba0b64a4658bebd4fbb28a6838
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:17 -05:00
Louise Mendoza 947fb40ef3 Removing directory link to the source tree.
Removes the symbolic link to the source tree directory that is created
inside the outdir directory.
This link is not being used and is created as a complete copy of the
source tree on windows.

Change-Id: Icd430f3423175151589c15559d57b5ecfc0a0853
Signed-off-by: Louise Mendoza <yonattan.a.louise.mendoza@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:17 -05:00
Louise Mendoza 0c3f05bcd7 mingw: Use built-in pwd with -W option for mingw builds
The pwd for mingw has a different output to the pwd shell's built-in pwd.
This change uses the built-in pwd for keep compatibilty with the path
in mingw.

Change-Id: I43d605157e19f661480e68ecbbd024c5f077e461
Signed-off-by: Louise Mendoza <yonattan.a.louise.mendoza@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:16 -05:00
Ido Yariv a8c48ea7b7 Workaround QEMU's multiboot loading issue
When QEMU loads a multiboot image based on the ELF headers, it
calculates the total memory size subtracting the minimum address from
the maximum address in the program header.

While the IDT section is removed from the ELF, an empty segment in the
program header is still kept at IDT_LIST base address. Since the IDT
segment isn't contiguous with the loadable code segment, QEMU is tricked
into thinking the total memory size is larger than it really is.

To workaround this, change the address of the IDT section to the address
of the text section. This will make objcopy remove the extra segment
entirely when the IDT section is removed.

This could have been fixed in QEMU since this isn't a bug in Zephyr
per-se, but it will be easier to avoid specific QEMU versions
requirements.

Change-Id: I062b7d0fb8fccfe4d0d0b4cb0afc4667bbb7f7dd
Signed-off-by: Ido Yariv <idox.yariv@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Ido Yariv <ido@wizery.com>
2016-02-05 20:25:16 -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 204b66d150 build: reused declared LDFLAGS
Change-Id: Ia421fc3e796a889f3083b00ddcb058ccefb35291
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:15 -05:00
Anas Nashif ace0e227c7 remove unused variables and defines
Many variables being declared in the Makefiles are Linux specific
and never used by Zephyr.
This is an attempt to cleanup the Makefiles and just keep the code
we use.

Change-Id: Ib97d3d7e3a55077d6f9ec2b4170b3763424a1c99
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:15 -05:00
Anas Nashif cc2801c08d remove stray core-y redifinition
Adding emptiness into core-y does not add any value.

Change-Id: I695f9a8682eb35bcdb80eff9716338f88d84ab09
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:15 -05:00
Anas Nashif ce5dc6a3b7 build: remove unused init-y handling
This is not used in Zephyr

Change-Id: I27507fc72686d2a54d4565cd36414bd7ffbd0399
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 3315b1f89b KLIBC_DIR and LDLIBS_TOOLCHAIN are obsolete
This variables are not being used in the code any more.

Change-Id: I3d4b513ed61d98020f27e5968835090946fe0c8b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:15 -05:00
Andre Guedes 635351bcdd drivers: Add infrastructure for QMSI drivers
This patch introduces the infrastructure required to enable QMSI drivers.
QMSI drivers are shim drivers based on drivers provided by QMSI BSP. The
BSP provides a static library (libqmsi) which implements several drivers
for peripherals from Intel MCUs.

Next patch will introduce the first QMSI driver (watchdog driver) which
will rely on the infrastructure introduced by this patch.

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

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

Change-Id: I458f92fa6799526c608369d1e56579936bcb196e
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-02-05 20:25:15 -05:00
Anas Nashif e7e125a7b9 Zephyr 0.8.0
Bump version to 0.8.0

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

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

Change-Id: Id44aa7d0e93d97234163ec858e2cfefe09768a08
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:13 -05:00
Anas Nashif 16266f5cd5 Zephyr 0.8.0-rc2
Change-Id: I79f294623ca9bae1a5f9f88492ecbc5da9907cbb
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:13 -05:00
Anas Nashif 799c590f88 Zephyr 0.8.0-rc1
Set new version for 0.8.0-rc1.

Change-Id: I1172bc013571acee4c95e2537fbb962804d8c64f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:12 -05:00
Anas Nashif 10bb38c186 Use SoC instead of platform.
Change terminology and use SoC instead of platform. An SoC provides
features and default configurations available with an SoC. A board
implements the SoC and adds more features and IP block specific to the
board to extend the SoC functionality such as sensors and debugging
features.

Change-Id: I15e8d78a6d4ecd5cfb3bc25ced9ba77e5ea1122f
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 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 220c54818c globally include headers for boards and platforms
Change-Id: I1f259cccc73dfb3d35019d6ebf3d3bdc6aec2b23
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:11 -05:00
Anas Nashif 2d762243fd kconfig: add BOARD Kconfig variable for defining boards
This variable (CONFIG_BOARD) will store the textual form of the
platform name and will be used for locating files related to the
board in the source tree.

Change-Id: I3c8a05ed428451a6785799a5492f0dd14682f208
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:10 -05:00
Anas Nashif f6f81868f8 build: Remove PROJECTINCLUDE from application makefiles
PROJECTINCLUDE is not required in app makefiles.

Change-Id: I3751b7c51c453dfe47d207bb11d171138668c4e7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:04 -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 9fe306bc2a Generate stack usage information only when enabled
This will only generate the .su files when CONFIG_STACK_USAGE
is specified, otherwise the tree will be full of .su files.

Change-Id: I3ffc7a7f5ab09aaae49ff65e8ad5de0832370777
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:04 -05:00
Anas Nashif 7283fe0dd3 Zephyr 0.7.0
Changed version to 0.7.0

Change-Id: Iaa629e415492c37bb32e45ff8bfc0164210afbf6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:58 -05:00
Anas Nashif 678ebbcd24 Zephyr v0.7.0-rc3
Change-Id: Ib565982ca76f9e6dc160b933a0240da1a9ba889b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:57 -05:00
Anas Nashif 3b2f85ba5e Zephyr v0.7.0-rc2
Change-Id: I2e5f11642094f15dc2fef810d6f4e5314b1c3e72
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:57 -05:00
Anas Nashif 5a495d5626 build: export SoC and architecture names
For usage in Makefiles.

Change-Id: I10dc3810ae3170cf667b60e84809f476c7d6f9dd
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:55 -05:00
Anas Nashif 1e3dca51bb build: set platform name without quotes and reuse everywhere
Avoid having to remove quotes wherever the platform name is used
by exporting the variable only once.

Change-Id: I4cb51901e4ac19d70d0310fe6bbacd157f586661
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:54 -05:00
Anas Nashif be07e3ffa3 Zephyr 0.7.0-rc1
Update version

Change-Id: I36ebc4b7ebba9c37f71d2ab4aea51bb93bb1bf0f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:54 -05:00
Anas Nashif 81057e7596 build: show supported boards when running 'make help'
This lists all supported board by looking at configs/ and other
locations with defconfig files.

Change-Id: I48ed260543adfeacbc089f403f948010ea6f978e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:53 -05:00
Anas Nashif df73d32147 build: use architecture definition from kconfig
Do not depend on host architecture and use architecture definition
from the defconfig file of the board.

Change-Id: Idb3dd42524f26bd167a34d6eb024d4d9816e9730
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:52 -05:00
Anas Nashif 1b702154b5 kbuild: add clang support
Clang support already existed in the Makefiles but was not complete
and some gcc options did not work with clang. Move those to be conditional
on the compiler used to make clang work.

To build with clang for x86:

make  CC=clang  -C samples/microkernel/apps/hello_world/

You still need the gcc cross environment for various tools.

For now, only x86 was tested.

Change-Id: Ic5aeab4f80d312e1d1312a4a9fc885a43f760270
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:47 -05:00
Anas Nashif 14cb8da750 Revert "kbuild: add clang support"
This reverts commit 58fd0778c6dcc6bd3148b5d07615cd7bd777f456.

Change-Id: Ibffe036d2e182652b3c966c10ed405c9386f823c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:42 -05:00
Anas Nashif 0d0cb8e661 kbuild: add clang support
Clang support already existed in the Makefiles but was not complete
and some gcc options did not work with clang. Move those to be conditional
on the compiler used to make clang work.

To build with clang for x86:

make  CC=clang  -C samples/microkernel/apps/hello_world/

You still need the gcc cross environment for various tools.

For now, only x86 was tested.

Change-Id: I1a50c3a82d79ff3001beb4366961ca810eeb6006
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:41 -05:00
Anas Nashif b2147178b4 build: remove unsupported targets from Makefile
Remove goals that call scripts we do not have or support.

Change-Id: Ic6f1d2b620e20f7355e1dec0a2454239fad8f123
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 0c39517251 makefile: put app files in seperate target
Application source code is not a core component of the kernel.
Remove from core-y and put the application tree in its own category.

Change-Id: I1d6f479829eb58b9a49baf90aaf9f74187660b86
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:41 -05:00
Anas Nashif 5401ded10b Zephyr 0.6.0
Bump release in makefile and documentation.

Change-Id: I395e3a1caa304f00be5343160b2a62829a66ad46
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:37 -05:00
Anas Nashif c587253e23 Zephyr 0.6.0-rc2
Change-Id: Ie894c0133674e0642bd0ce951ff63d6012a9d6bd
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:36 -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
Anas Nashif 454a60d4a8 Zephyr 0.6.0-rc1
Change-Id: Ib17449cc36d93fa4e56ce54d05d84a6ef68f308a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:34 -05:00
Anas Nashif 20439b488e gcc: build with -fstack-usage
will generate an extra file that specifies the maximum amount
of stack used, on a per-function basis.

Using a static stack checker the data can be analysed, for example:
   http://dlbeer.co.nz/oss/avstack.html

Change-Id: I23bd8ce7c4516bd0c7ffb74504e6d379677f25f8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:29 -05:00
Anas Nashif a401ddec57 remove linux configs and compile options not being used
The makefile has some options we do not have in Zephyr, so better
remove them to avoid any confusion and misconfiguration.

Change-Id: I35663261bceb741a28d35bdbe87df451aa298c86
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:28 -05:00
Anas Nashif 1cc1ac4b2f move cflags setting to arch/<arch>/Makefile
Move Zephyr specific CFLAGS that depend on config options to
the Makefile where they can better be managed among other cflag
options.

Change-Id: Ia79a2f2def4f51857f6d661aa78e9fb7eb7a5e22
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:28 -05:00
Anas Nashif a56b1313cd Zephyr 0.5.0
Change-Id: Id62f50846c8d9d6cc6be8d6c9050704978d6aba9
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:22 -05:00
Juan Manuel Cruz a5a6ec341b build: help message update
This commit updates the help message adding pristine target
and removing reference to a non-existent README file.

Change-Id: I38f32e6d1e2fc0723894b5e5a71570bc4333e615
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:24:22 -05:00
Anas Nashif ee743c7d42 build: allow usage of a custom linker script
This change will allow the use of a custom linker script by
setting the config variable CUSTOM_LINKER_SCRIPT to a path outside
of Zephyr tree.

This is useful when an application needs to add sections into the
linker script and avoid having to change the script provided by
Zephyr.

Change-Id: Ibe31abcc8c0227e734f59bc26d3c8d5619951b29
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:22 -05:00
Anas Nashif d1342a8dd7 Zephyr v0.5.0-rc0
Change-Id: I50fca2a42cae44760db191ac711b1693e167a5a8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:19 -05:00
Anas Nashif d9af71bcff build: fixed wrong logic for setting options during debug
From old build system -DPERF_OPT was set with no optimisation, that
was buggy and did not function as expected with new Makefiles.

Change-Id: I21ebbe0e9314d0a25cb53c6455ff244252e44af0
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:19 -05:00
Anas Nashif 6f6e95d325 build: remove obsolete variables from Makefile
Those variables are not being used anymore.

Change-Id: I6904aae1dfa01eedacdc86e61aead61619e3302d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:19 -05:00
Szymon Janc dc1fd516a8 Fix TinyCrypto include path
TinyCrypto includes files are in 'include' subfolder.
Without this patch one is required to include eg
#include <include/aes.h>
instead of
#include <aes.h>

Change-Id: I4a761a107d819400ad39cc0e3fb918bed2df4ab4
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:15:58 -05:00
Constanza Heath 7d0e1d9218 Add initial import of TinyCrypt crypto library and tests
Change-Id: I89b8db6925385dd02e95e0401bc42f32543e0daf
Signed-off-by: Constanza Heath <constanza.m.heath@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:36 -05:00
Anas Nashif cca4e97e01 Zephyr 0.4.0
Change-Id: If6473058c708c6833389ef5d1e6bd356d7c243ef
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:35 -05:00
Anas Nashif db5a6391bb Zephyr 0.4.0-rc2
Change-Id: Icd2e0201cb79f2af4a2d754a529eb6d11343b2f4
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:34 -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 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 9c72cf542e portability: echo -n fails on the mac
Change-Id: If5973f80b6fa97e19e31e8a6b7c16b6aa78d2450
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 8f9377e631 Zephyr 0.4.0-rc1
Change-Id: Ib1aabc675a915b152d8719a493ba5fef45dbbce0
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:28 -05:00
Anas Nashif 3852c8c98a fix setting of CONFIG_COMPILER_OPT
CONFIG_COMPILER_OPT was set before it was initialised.


Change-Id: I398da7a9fde1ad64ff5a8df41ec50884f8844ce6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:28 -05:00
Anas Nashif 7b9455b9e7 remove unused linux Documentation targets
Remove references and make targets still referring to Linux
Documentation directory.

Change-Id: I6544e0ea9ae6c6c48158c89ed9bd61d73b1684fd
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:27 -05:00
Fabien Chereau 6d1ee7e8bf build: avoids link error when CCACHE is not activated
Change-Id: I31d7578cc20b9b64c7c144935f93576b6349597e
Signed-off-by: Fabien Chereau <fabien.chereau@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:26 -05:00
Anas Nashif 42fbd4afd2 cleanup libc kconfig and use choice
This will allow adding more libc implementations in the future.
Also use the location of the include directory from the toolchain
settings.

Change-Id: Idae5e4ffd9b1bcb5e924da156df56e81f10c8842
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:25 -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
Andrew Boie 5bb06311a9 Kbuild: Don't warn on zero-length format strings
This warning isn't particularly useful and we intentionally do this
in our __assert.h macros.

Change-Id: I783398fd92dffe57e2e18d520db4e752c8c37a98
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:15:21 -05:00
Anas Nashif 64bd9c6df3 build: rename platform target to drivers
This is really not a platform target, rename it to match
what it really does, which is building drivers.

Change-Id: Ie36781fa0916371013de81b9fa542a9e790af7e6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:45 -05:00
Anas Nashif 8d00ec5c4e build: build libc as object, not kbuild library (lib.a)
The way we build the libc files is not a real library that can be
used as a libc and makes managing the source files a bit
difficult, so lets revert back to building the c function files
like everything else in the system to avoid any confusion.

Change-Id: I4e998e37bc376522fe253c4aefefe7804597f0f2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:45 -05:00
Anas Nashif 486a2a1034 doc: fix docs target
The top make file has a documentation target that does not work.
Change it to work with our documentation and scripts.

Change-Id: Id32643900d122f54778e3179930f2e8e34387aa1
Signed-off-by: Anas Nashif <anas.nashif@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
Peter Mitsis 771c5998e9 kbuild: Replace 'bsp-y' with 'platform-y'
Replace obsolete BSP terminology with platform terminology.

Change-Id: I4c23cc0cc0c12f1402e9ea467b87d10e17e5ef71
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:43 -05:00
Anas Nashif ef39858deb Zephyr 0.3.0
Change-Id: Iee74ac9a62d0866d0881a215ce74ad0ca555cd3d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:42 -05:00
Andrew Boie 22c3fa3742 build: Don't disable the monitor when using QEMU_PIPE
Performance is about the same, it does not appear to cause issues,
and older versions of QEMU don't support this flag.

Change-Id: Ie45a2396c7b0d3098923244d92b15422491413a1
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:14:42 -05:00