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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Adding emptiness into core-y does not add any value.
Change-Id: I695f9a8682eb35bcdb80eff9716338f88d84ab09
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
- 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>
This variables are not being used in the code any more.
Change-Id: I3d4b513ed61d98020f27e5968835090946fe0c8b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
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>
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>
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>
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>
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>
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>
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>
PROJECTINCLUDE is not required in app makefiles.
Change-Id: I3751b7c51c453dfe47d207bb11d171138668c4e7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
We now only use ARCH and avoid duplication of the same definition.
Change-Id: Ia61059b906a2ebc31e703412bead948997975d58
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
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>
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>
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>
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>
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>
This reverts commit 58fd0778c6dcc6bd3148b5d07615cd7bd777f456.
Change-Id: Ibffe036d2e182652b3c966c10ed405c9386f823c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
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>
Remove goals that call scripts we do not have or support.
Change-Id: Ic6f1d2b620e20f7355e1dec0a2454239fad8f123
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
CONFIG_COMPILER_OPT was set before it was initialised.
Change-Id: I398da7a9fde1ad64ff5a8df41ec50884f8844ce6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Remove references and make targets still referring to Linux
Documentation directory.
Change-Id: I6544e0ea9ae6c6c48158c89ed9bd61d73b1684fd
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
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>
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>
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>
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>
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>
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>
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>
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>