This will replace the current goal of 'make qemu' with 'make run' and
moves Qemu handling into its own file and into the boards instead of
being architecture specific.
We should be able to add new boards that support some other type of
emulation (by adding scripts/Makefile.<emu type>) and allow the board to
define their own options for the use type of emulation.
'make qemu' will still work, however it will be deprecated, starting
with this commit it is recommended to use 'make run'.
Jira: ZEP-359
Change-Id: I1cacd56b4ec09421a58cf5d010e22e9035214df6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Use the existing debugserver target also for Qemu debugging. Qemu
should be maintained as one of many emulation/simulations platforms and
emulation should be abstracted in the Makefiles and not tied to Qemu.
qemugdb will still work, it is however being deprecated.
Change-Id: I0cd10fb66debb939b8f7f1304bf2ef4605da6a1d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
To customise test builds and support test related features such as time
stamps and a boot banner, introduce a Makefile variant that is dedicated
to testing.
Initially we introduce a new config overlay that is used for all tests, in
this case we enable BOOT_BANNER and BUILD_TIMESTAMP. This will print the
current version and the date, useful when reporting bugs and also an
indicator that the system has booted before the test has started.
For example:
[QEMU] CPU: qemu32
***** BOOTING ZEPHYR OS v1.6.99 - BUILD: Dec 21 2016 19:57:13 *****
tc_start() - Test Nanokernel CPU and thread routines
Initializing nanokernel objects
...
..
Change-Id: I224318cdeb55a301964ea366dbc577e2e3a09175
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
In addition to providing documentaton, we also modify the static_lib
example to use outputexports instead of the double-include
Makefile.toolchain trick. For this to work well we need to fix a tiny
bug in the dependency handling in Makefile.inc.
Change-Id: I6571bc681bc34155f37cff1eccc2ea12ed52ef07
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
the issue is caused by lacking $(ARCH) in Makefile.inc, which
cause $(ZEPHYR_BASE)/boards/$(ARCH)/$(BOARD)/Makefile.board fail
to include. So just add ARCH variable by extract it from boards/
folder.
Issue: ZEP-1255
Change-Id: I15453c5e2bced8fc64b545b925086fe5c3bf68c5
Signed-off-by: jing wang <jing.j.wang@intel.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
This patch while it fixes a few bugs, introduces other issues, espcially
when building on windows.
This reverts commit ae327c60c9.
Change-Id: I1ffcd6c88d17f5bd6a66df28d99d2d27c0683930
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
This is not needed anymore, directory is created by
mergeconfig.
Change-Id: I3a24b14d08b9c5c0203f66536dd74109da55064c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
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>
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>
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>
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>