Commit Graph

67 Commits

Author SHA1 Message Date
Anas Nashif 54634d6a43 add support for debugserver
Change-Id: Ib22d9c06ba7816c3b870973d16e1c25229f31e1f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:30 -05:00
Anas Nashif 71d22157b4 makefile: do not create directories when calling help
Create a new help target.

Change-Id: I33200cb129a2527d31d19ec99bc1cd6ded1c21ea
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:30 -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
Yonattan Louise 4a2ce3c0c9 mingw: change backslashes to forward slashes
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-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
Louise Mendoza 7a2836f0f4 Remove quotation marks form CFLAGS.
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-05 20:25:16 -05:00
Anas Nashif 9d26ab769d dequote and strip CONF_FILE variable and minor variable cleanup
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-05 20:25:13 -05:00
Anas Nashif 1cfc5b3f6f Move defconfig files to the board directory
This commit also renames boards and makes naming consistent between
board name and defconfig files.

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

Change-Id: Ibe6a5102edb987fe1d6ce32c8c392a87d45d6951
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:11 -05:00
Anas Nashif c740608ce5 Use BOARD instead of PLATFORM_CONFIG
Change-Id: I14db0087cd705df0db8a911071bc3949b5c79314
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:11 -05:00
Sergio Rodriguez 2e2ad8166e qemu: Creation of QEMU specific platforms
Setting up new platforms to handle emulation, and make them the only
ones able to run on QEMU from the Makefile "qemu" target to avoid
confusion with other platforms. We have now platform qemu_x86 and
platform qemu_cortex_m3, also modification to the sanity checks to have
qemu support only on those platforms

Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
Change-Id: I9291918a1d58fea4f37750ada78234628f9a5d98
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:56 -05:00
Anas Nashif 182a646c0d build: use realpath instead of readlink -f
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-05 20:24:54 -05:00
Anas Nashif c4ad67dd9c use oldnoconfig and avoid using 'yes'
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-05 20:24:54 -05:00
Anas Nashif c47769bd56 kconfig: move all defconfig fragments to configs/
When building for a certain platform, we have no idea
what architecture we are building for.

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

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

Change-Id: Ib7e9f63b9a8051714dc207f583fd26ef620497d8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:53 -05:00
Benjamin Walsh 334c14e66e x86: CLFLUSH and cache line size detection
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-05 20:24:41 -05:00
Anas Nashif fa2e18b294 kbuild: make menuconfig work with local configuration
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-05 20:24:29 -05:00
Anas Nashif 2ce8d30892 remove nano/micro defconfigs, use 1 file only
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-05 20:24:28 -05:00
Anas Nashif f5e3be2af7 build: re-add initconfig to generate .config
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-05 20:24:28 -05:00
Anas Nashif fbed1e4bcd Kbuild: Use DOTCONFIG instead of /.config
Change-Id: Ida72f1321f6b02c5d506e4c9a9a18035e9c13b0d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:33 -05:00
Anas Nashif 13a0223cda Kbuild: Remove .dir target
This is not needed anymore, directory is created by
mergeconfig.

Change-Id: I3a24b14d08b9c5c0203f66536dd74109da55064c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:33 -05:00
Anas Nashif e80edfc7bf cleanup Makefile.inc and fixed mergeconfig
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-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
Juan Manuel Cruz ea0c810bc5 kbuild: environmental vars rebuild
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-05 20:15:26 -05:00
Anas Nashif 97493575a6 build: simplify clean target
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-05 20:14:45 -05:00
Anas Nashif 0db074eae4 build: fixed typo when stripping variable
Change-Id: I9dba0c02aac92b1443933ce5d9a7d997ec2ed2e2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:45 -05:00
Anas Nashif 7aa584d9c2 build: Let application specify the defconfig
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-05 20:14:45 -05:00
Andrew Boie 776d5f7c22 build: fix application build in symlinked environment
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-05 20:14:42 -05:00
Arkadiusz Lichwa a9c1163ed9 build: Fix python3 printf syntax
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-05 20:14:42 -05:00
Andrew Boie 9132a13542 build: HACK fix issue where project objects don't end up in $(O)
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-05 20:14:42 -05:00
Andrew Boie ca12bbb569 fix issue where two outdirs are created
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-05 20:14:41 -05:00
Andrew Boie c69920798b Makefile.inc: fix indentation
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>
2016-02-05 20:14:38 -05:00
Peter Mitsis 519351ee92 Use PLATFORM_CONFIG to specify configuration
Uses PLATFORM_CONFIG to specify the configuration file instead of
KBUILD_DEFCONFIG.  This name is more intuitive to Zephyr users and
it is not tied to kbuild.

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

Change-Id: I177608942c3e77c2f152743c862aad1d460c0e33
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:38 -05:00
Peter Mitsis 5890d1fbb4 kbuild: remove BSP+variant to defconfig mapping
Removes the BSP+BSP_VARIANT to KBUILD_DEFCONFIG mapping.  Consquently,
KBUILD_DEFCONFIG must be defined (via Makefile, or command line, or environment
variable, ...) when building any project.

Change-Id: I0a416977bc0d37419c4a6bcf40560b3b32f19f8d
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:38 -05:00
Andrew Boie 4f9a95ff1e kbuild: remove BSP_VARIANT Makefile variable
This wasn't being used anywhere and seems to be a legcy of old sanity tests.
By removing this x86 is no longer a special case.

Change-Id: I78c668a7d9e6bc7c7f60d91712c4c21c0121b7e2
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:14:37 -05:00
Anas Nashif 27603f4801 Revert "Kbuild: Tools build at TIMO_BASE directory."
This reverts commit 23da104f0dc8c6c4a768a727b564272c084aa79b.

Conflicts:
	Makefile
	Makefile.inc

Change-Id: Ia8f2efe3cd37e82c04c304f04c46d787d2265dde

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:24 -05:00
Anas Nashif b8823770d2 Rename TIMO -> ZEPHYR
Change-Id: Id44a129e275fb0cfe1fce6ec2a03c2d86ffe3995
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:16 -05:00
Allan Stephens 815c6406bc Rename VPF files to use MDEF file extension
The file extension indicates a "Microkernel DEFinitions" file,
and no longer reflects the obsolete VxMicro/Viper branding.

Change-Id: Ib95b271404a4a4737e851d603c371244fa609e4d
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:15 -05:00
Juan Manuel Cruz 52c9d87c25 Kbuild speed and target dependency improvements.
This commit improve Kbuild speed by removing the defconfig Make
call and including a direct copy of the default configuration file.

The .initconfig target is broken down in mergeconfig and defconfig
targets as well.

Change-Id: I1efadfca487a3fa8438e65e1c3da83fc46576628
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:14 -05:00
Juan Manuel Cruz dc2b1f1746 Kbuild: Improve verbosity on project build.
This commit allows to control the verbosity of the Makefile.inc
execution using the console parameter V=1.

Change-Id: I253332b6e33725b6cd4cd83643321278f396ed50
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:14 -05:00
Dirk Brandewie 6fa99f87ec kbuild: Only execute initconfig target once
There is no need to rerun the initconfig target if the current project
directory has already been configured.

Change-Id: Ifaf01d8afa88f058bd4e20ed7c3fe136dbb1a640
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:14:12 -05:00
Juan Manuel Cruz 427fc58804 Kbuild: Fix to distclean target.
This commit fixes the distclean target.
distclean target removes the hidden files, with cmd extension,
generated by Kbuild.

Change-Id: If00c9b0ee9791abb64e29f8a9ebda454384f23af
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:10 -05:00
Juan Manuel Cruz 4d7f954896 Kbuild: Tools build at TIMO_BASE directory.
This commit allows the tools build to be executed at TIMO_BASE
directory insted of being executed at the PROJECT_BASE.
This allows the sanity checks to run faster because there is no
need to recompile the tools with every test.

Change-Id: I9e9ac78695db884b44e2693029e9ea6ed96b21c8
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:10 -05:00
Anas Nashif 02085a3fda Kbuild: make merge_config less verbose
Change-Id: I1102f383db23fad18364f09eff6128391980637a

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:10 -05:00
Juan Manuel Cruz 988236f2b9 Kbuild: Output files at outdir directory.
This commit enables the outdir directory.
Kbuild output files will be generated at the outdir directory
inside the project directory.

Change-Id: Icec04aca1753326c9d50dea20c71850c1d8c3dd0
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:10 -05:00
Juan Manuel Cruz 899c1c9731 Kbuild: Enables help target from project directory.
This commit enables the help target from the project directory.

Change-Id: I124c8f8fea40a09865a18f917dd8a798dd8b45e5
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:10 -05:00
Juan Manuel Cruz 6ad9404883 Kbuild: Support for BSP_VARIANT
This commit adds the support for the BSP_VARIANT symbol.
This symbols is used by sanity checks to identify an specific
CPU in the generic-pc BSP.

Change-Id: Ia1d31303bc2d4bfc9c9ec5bf8da964b9707e44b0
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:09 -05:00
Juan Manuel Cruz dc5a457847 Kbuild: Changing build parameter CONF_OVERLAY to CONF_FILE
This commit changes the build parameter CONF_OVERLAY with the
name CONF_FILE.

Change-Id: I404a4aa87b167a9ca4e7b395d53c2f7794b232bc
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:09 -05:00
Juan Manuel Cruz 1548be0540 Kbuild: Fix to pristine target.
This commit fixes the pristine target and removes
the complete set of hidden files:
 - .config.old
 - .version
 - .tinymountain.cmd
 - .tmp_versions

Change-Id: I6f96248885d504cb2a0f53849672c51b2d56e69a
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:09 -05:00
Anas Nashif a6fc21ed5e Kbuild: add alias pristine to distclean
Change-Id: Ifb21c78f0772e1a4bde61dc8b3e9198fc13a0279
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:09 -05:00
Juan Manuel Cruz 1537c24789 Kbuild: Fix for the parallel building problem.
This commit fixes an issue with the parallel building problem.
Note: When calling $(MAKE) from a function call or from inside
another variable, instead of calling directly in target,
make cannot identify the make calls to distribute the process
load across processes. This makes the parallel building to
ommit the $(MAKE) calls in these situations from the parallelism.

Change-Id: I42ed5127a99a1a461c47edb4b4f8511e4b6e7e8d
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:08 -05:00
Juan Manuel Cruz 5fbb5f6420 Kbuild: Adding bluetooth sanity checks.
This commit adds the Makefiles to add sanity checks for
the bluetooth driver.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Iadfe6eb2662347a981393ffeb3e343f32c5f67f0
2016-02-05 20:14:08 -05:00