summaryrefslogtreecommitdiff
path: root/Makefile.inc
AgeCommit message (Collapse)Author
2016-10-24board: organize boards based on architectureKumar Gala
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-09-12win-build: fixes to build with alternative make implementationsJuan Manuel Cruz
Some make implementations have different implementations for notdir and absdir functions. notdir may require that his parameter do not finish with "\". absdir may fail when given a windows formated path as input. The path that is given to notdir as parameter is removed from the final "\" and abspath is replaced with realpath when the input given can be a windows formated path. Jira: ZEP-762 Change-Id: Ic83e3526fc5234decb3192ab1f9f538addf9a76e Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-09-08kconfig: include configuration fragment files from output directoryInaky Perez-Gonzalez
Current setup includes configuration fragments (*.conf) from the source directory. This patch enables said inclusion to also happen from the output directory; this enables automatic build systems and validation to set configuration fragments without modifying the source tree. This is important so that the source tree remains pristine from the standpoint of source control systems. Change-Id: Ic4a896afad2b8525c13dd6c6d9081f514b18e7aa Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-08-30build: default ARCH to be initialized by the board support codeInaky Perez-Gonzalez
ARCH is defaulted to be x86. This makes it somehow impossible for later the board code to set it properly when it needs to be evaluated in a top level makefile for a project. By undefining it, a lazy resolution is forced that works its way to the proper Kconfig set by setting BOARD, which should be the ONLY mandatory argument (to avoid things that will fail like BOARD=galileo ARCH=arc). Jira: ZEP-690 Change-Id: I5b10922eb4cdb559ab5fe354bc91c9ffb92f0ca8 Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-08-27Make outdir board-specific to avoid build collisionsAndy Ross
Casual building in the tree leads to regular messups where I forget to clean up the outdir first when switching platforms and the build fails in strange ways. Put a $(BOARD) subdirectory under outdir, and use that at $(O) when the user does not provide an output directory. Note that "make pristine" continues to remove the entire outdir, including other architecutres (so as to make the tree pristine). Also update a few spots where outdir was mentioned in documentation to clarify the new scheme. Change-Id: I365eec06ea440f17380b9f9ace5f5d34b9bed4dc Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2016-08-25win-build: Fixes an issue supporting quotesJuan Manuel Cruz
Jira: ZEP-517 Change-Id: Ic63df69e3df83d90343ac5d1f88a1c496a8f6e09 Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-06-30build: Fix application object files placement when building out of treeKumar Gala
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-28build: add 'qemugdb' targetAndrew Boie
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-22build: quote SOURCE_DIR to allow it to be a listKumar Gala
If SOURCE_DIR happens to be multiple directories we need to quote it so it gets passed correctly as a list. Change-Id: I7795ddecd016fad2048f957accd1557bb2215632 Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-06-22build: make zephyrmake exposed with V=1Kumar Gala
Remove extra @ which would always silence output from zephyrmake. Every instance of zephyrmake is prefixed with a $(Q) so V=1 will expose them Change-Id: I8e622cc2175f645897ac78d607486d37c0af1618 Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-06-14Revert "build: Do not depend on python while creating the relative path"Anas Nashif
This patch while it fixes a few bugs, introduces other issues, espcially when building on windows. This reverts commit ae327c60c96e4d5e1f88b8ec86e79de20f72a6fd. Change-Id: I1ffcd6c88d17f5bd6a66df28d99d2d27c0683930 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-26scripts: add a script to report RAM/ROM usageAnas Nashif
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-23build: use export to pass CFLAGS to zephyrmakeCaio Marcelo de Oliveira Filho
If CFLAGS have spaces, the existing zephyrmake leaks part of it as arguments for make. Instead of explicitly setting, just the export the CFLAGS to make it visible to the inner call to make. Change-Id: I7b083cbc19a49e8dede39333443c701567d214c0 Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
2016-05-16build: Do not depend on python while creating the relative pathbitpathe
Change-Id: I45892371b3d72a681fc0d5c3fdc49af2f0094296 Signed-off-by: Bit Pathe <bitpathe@gmail.com>
2016-05-16build: add extra dependency for zephyr.lnk and rebuild with new boardsAnas Nashif
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-14build: Add MinGW dependencies in makefileJuan Manuel Cruz
Jira: ZEP-177 Change-Id: I5c67b9ed6c279b2b59afd4cd0351df5f0d030533 Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-04-25build: generate error if board is not foundAnas Nashif
Change-Id: Icf0c713d5fe3bb56dea4d74c87176c04f80df329 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-14build: support multiple defconfigs per boardAnas Nashif
We will now look for the defconfig to be used using wildcards which will allow us to host similar boards in the same directory and share all existing files. JIRA: ZEP-103 Change-Id: Icfe5dc2fa4b2c4e21e6b1285d80e0c844d430d7d Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05build: fix parallel builds of applicationsAnas Nashif
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-05add debug/debugserver supportAnas Nashif
Change-Id: I114994cb092870cd57b8e43b197d56ab8ca7db20 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05add support for debugserverAnas Nashif
Change-Id: Ib22d9c06ba7816c3b870973d16e1c25229f31e1f Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05makefile: do not create directories when calling helpAnas Nashif
Create a new help target. Change-Id: I33200cb129a2527d31d19ec99bc1cd6ded1c21ea Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05Add flash support for boards using latest SDKAnas Nashif
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-05mingw: change backslashes to forward slashesYonattan Louise
If the path of the SOURCE_DIR has the windows format. We change the backslashes to avoid escaping the characters. Change-Id: I93247ade884374b292cd34176dee81f53796da8a Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com> Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05mingw: Use built-in pwd with -W option for mingw buildsLouise Mendoza
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-05Remove quotation marks form CFLAGS.Louise Mendoza
The quotation marks in windows cause the exact interpretation of the text, including the special symbols like '\', that cause problems with the parameter of the toolchain. Change-Id: Ib223ed64b92380419e2fd86b703247ada1a06e34 Signed-off-by: Louise Mendoza <yonattan.a.louise.mendoza@intel.com>
2016-02-05dequote and strip CONF_FILE variable and minor variable cleanupAnas Nashif
Avoid issues with variables having quotes and leading/trailing spaces. Additionally, set KERN_TYPE to micro. Change-Id: Id3f5aeca6844292bbb537f443bd36f191432fe58 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05Move defconfig files to the board directoryAnas Nashif
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-05Use BOARD instead of PLATFORM_CONFIGAnas Nashif
Change-Id: I14db0087cd705df0db8a911071bc3949b5c79314 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05qemu: Creation of QEMU specific platformsSergio Rodriguez
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-05build: use realpath instead of readlink -fAnas Nashif
readlink is not portable and does not work the same way on different platforms, use Make realpath instead. Change-Id: I5348000b624d8ac76c2c409962dd1930761ed6ce Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05use oldnoconfig and avoid using 'yes'Anas Nashif
We use yes to answer question to an interactive 'make oldconfig' and generate lots of noise. 'yes' is also not portable, so skip the yes and use 'make oldnoconfig' instead. Change-Id: I14f7056c7735e1a020aad2f37c652e4a53872760 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05kconfig: move all defconfig fragments to configs/Anas Nashif
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-05x86: CLFLUSH and cache line size detectionBenjamin Walsh
Detect the presence of CLFLUSH instruction and cache line size at runtime. It is still possible to set them manually via kconfig options if the values are known. Change-Id: I00bda1de4c5c241826ead6f43b887b99a963cc7b Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05kbuild: make menuconfig work with local configurationAnas Nashif
Calling 'make menuconfig' from an application will prepare the configuration defined in the application (Makefile) and will launch menuconfig with the correct configuration rather than the default for the architecture. Change-Id: I6c611ddaa23b67632c507291294a73b6c4283cea Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05remove nano/micro defconfigs, use 1 file onlyAnas Nashif
Do not use micro_* or nano_* defconfigs, instead maintain platform in one single defconfig and merge nano or micro support on top. Change-Id: I0d5184f37865ed8312e516e48cf5a8584a287dfe Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05build: re-add initconfig to generate .configAnas Nashif
run make initconfig to only create the .config in outdir. The .config will be the result of the defconfig merged with the local application config define in CONF_FILE. Change-Id: If2a308ac3805d32cea8dd7be7a14772f22443600 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05Kbuild: Use DOTCONFIG instead of /.configAnas Nashif
Change-Id: Ida72f1321f6b02c5d506e4c9a9a18035e9c13b0d Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05Kbuild: Remove .dir targetAnas Nashif
This is not needed anymore, directory is created by mergeconfig. Change-Id: I3a24b14d08b9c5c0203f66536dd74109da55064c Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05cleanup Makefile.inc and fixed mergeconfigAnas Nashif
Remove the environment file due the fact it was destructive and removed existing .config and build environment. Now, if you change the architecture, you will not be building against old environment, instead, kconfig will prompt you for the changes. Change-Id: Ib557dd2a0562dcfe23fee60863b3e667f1c99060 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05cleanup makefiles and remove duplicationAnas Nashif
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-05kbuild: environmental vars rebuildJuan Manuel Cruz
This commit allows kbuild to rebuild if the following environmental variables change: KERNEL_TYPE, PLATFORM_CONFIG, ARCH. Change-Id: Ibab0392b6eb362a5423bce149c013235b75d3140 Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05build: simplify clean targetAnas Nashif
Do not delete files that do not exist and just clean the outdir directory which has all the objects. The source directories now do not have any built objects. Change-Id: I5774fa325717c65b6666de495b35f9b86f57473c Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05build: fixed typo when stripping variableAnas Nashif
Change-Id: I9dba0c02aac92b1443933ce5d9a7d997ec2ed2e2 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05build: Let application specify the defconfigAnas Nashif
We should be able to point to a defconfig file that is outside of the buildsystem instead of using system provided defconfigs. In Makefile of application, specify for example: KBUILD_DEFCONFIG=/tmp/micro_basic_atom_defconfig Change-Id: I63e500bf74892654587b63d788a94541c33072e8 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05build: fix application build in symlinked environmentAndrew Boie
This fixes issues building in a tree which has symlinks in its path, for some reason PROJECT_BASE ends up having symlinks removed from it but not ZEPHYR_BASE, causing Python to generate relative paths with "../.." (for example) in the beginning. This patch ensures both have symlinks removed before computing SOURCE_DIR. Change-Id: I3e0688b602a320d7644834b73cde79cfe91cb677 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05build: Fix python3 printf syntaxArkadiusz Lichwa
Using as default on build host Python3.4 environment, the build of Zephyr terminates with complain. File "<string>", line 1 import os.path; print os.path.relpath(...) ^ SyntaxError: invalid syntax Change-Id: I99abf647ffc68d4e8a0b3d6c74a5362435670aa4 Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-05build: HACK fix issue where project objects don't end up in $(O)Andrew Boie
Kbuild doesn't like absolute paths since it can't compute an outdir path by applying a prefix. Convert to relative path before calling the kernel Make session. This will not work for projects that are completely outside the Zephyr tree as leading ../ in the relative SOURCE_DIR will mess up the outdir calculation. Change-Id: I6680796d5da4624b01aa3c45ac2c4b4a8a99d09a Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05fix issue where two outdirs are createdAndrew Boie
O was getting passed along to the main Kbuild Make session which is called with -C. If O was a relative path, the outdir would effectively become $(ZEPHYR_BASE)/$(O) which is not what we want. Change-Id: I148539490ecfc2d4e84a0fdf3e3dd1ab24503633 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05Makefile.inc: fix indentationAndrew Boie
An additional level of indent after line continuations makes this file easier to read. Change-Id: I2f5de9b811a5e725639d3a0c2cd62196c2a9e9c4 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>