Commit graph

1120 commits

Author SHA1 Message Date
Sebastian Bøe e51ce4d34d cmake: Generate POST_BUILD items based on KConfig
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-22 13:29:37 -05:00
Anas Nashif be25936bb2 release: make cmake happy about version
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-19 23:16:03 -05:00
Anas Nashif 388286663a cmake: fixed version handling
Use VERSION in top directory to specify version

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-19 23:16:03 -05:00
Sebastian Bøe ce2bfcdb96 cmake: Remove the PREBUILT_HOST_TOOLS variable
The PREBUILT_HOST_TOOLS variable was used during the CMake migration
but is no longer documented or needed. As the docs demonstrate, adding
tools to path is an easy way to find prebuilt host tools.

Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-17 17:55:26 -05:00
Sebastian Bøe 9f59045546 cmake: Refactored EXTRA_FLAGS code into a dedicated script
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-15 19:47:44 -05:00
Kumar Gala 999b658f76 cmake: flash: Remove fake path to zephyr_flash_debug.py
We append a path to the FLASH_SCRIPT/DEBUG_SCRIPT that was bogus and not
really needed by zephyr_flash_debug.py.  So lets remove it since its
just confusing.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-11-14 12:07:44 -06:00
Luiz Augusto von Dentz 3eaeeb82ab net: Only enable QEMU_NET_STACK with CONFIG_NET_SLIP_TAP
If CONFIG_NET_SLIP_TAP is not selected QEMU_NET_STACK will not work
which happen when CONFIG_NET_L2_BT is selected.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-11-14 09:52:13 -08:00
Sebastian Bøe 8d0a80c6a9 cmake: Fix SDK-less builds
This change changes the semantics of the environment variable
ZEPHYR_SDK_INSTALL_DIR to allow the use of 3rd party toolchains
alongside the Zephyr SDK's host tools.

Specifically, setting ZEPHYR_SDK_INSTALL_DIR now indicates that the
Zephyr SDK host tools are to be used. But not necessarily that the
Zephyr SDK's toolchain is to be used.

The documentation is also changed to explain this behaviour.

Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-13 13:14:32 -05:00
Anas Nashif 539d2af654 flash: support flashing multiple configurations of a single board
Some boards define multiple configuration which all are maintained under
the same board directory. The flasher was looking for an openocd.cfg
based on the board name, which can't be found for such boards.

Use the variable BOARD_DIR provided by cmake instead of trying to
assemble the board directory location on our own.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-13 10:55:26 -05:00
Sebastian Bøe 709cff1b60 cmake: Fail when zephyr_sources() is called on a directory
https://github.com/zephyrproject-rtos/zephyr/issues/4864 revealed that
calling zephyr_sources() on a directory will silently omit the
directory. This is a clear user error and should be immediately
flagged as such.

Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-10 11:57:28 -05:00
Sebastian Bøe f0346bfac0 flash: Change type of FLASH_SCRIPT_ENV_VARS
The old way of constructing FLASH_SCRIPT_ENV_VARS was corrupting the
values that were passed to the flasher. This new method is the
standard way of creating a dictionary/hashmap in CMake and does not
suffer from the same problem.

This fixes
https://github.com/zephyrproject-rtos/zephyr/issues/4844#event-1334599401

Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-10 07:54:54 -05:00
Sebastian Bøe 8dd3bb8666 flash: Pass env var OPENOCD_DEFAULT_PATH to flasher
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-10 07:54:54 -05:00
Jukka Rissanen ede10b96e4 cmake: Set proper QEMU options for networking applications
If compiling networking application for QEMU, then serial ports
must be set properly for QEMU<->host connectivity using SLIP.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-11-10 14:52:53 +02:00
Anas Nashif 446503dc50 cmake: Support disjoint toolchain and SDK locations
Make more toolchains use the tools provided by the Zephyr SDK.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-09 23:22:11 -05:00
Leandro Pereira 114f6032fe cmake: Support disjoint toolchain and SDK locations
Some toolchains, such as the one provided by Espressif for the ESP32,
or ISSM provided by Intel, will contain only the compiler, linker, and
supporting tools.  Other binaries needed by the build system that are
provided by the Zephyr SDK need to be found somewhere else.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-11-09 19:52:25 -05:00
Sebastian Bøe eb8e7b7969 cmake: Fixed openocd
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Sebastian Bøe c7832bd343 cmake: Use -serial bt-server when CONFIG_BT
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Sebastian Bøe 4449bef955 cmake: Pass GDB env var to flasher script
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Anas Nashif adb988a577 cmake: fixed version handling
Use VERSION in top directory to specify version

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-08 20:00:22 -05:00
Sebastian Bøe 12f8f76165 Introduce cmake-based rewrite of KBuild
Introducing CMake is an important step in a larger effort to make
Zephyr easy to use for application developers working on different
platforms with different development environment needs.

Simplified, this change retains Kconfig as-is, and replaces all
Makefiles with CMakeLists.txt. The DSL-like Make language that KBuild
offers is replaced by a set of CMake extentions. These extentions have
either provided simple one-to-one translations of KBuild features or
introduced new concepts that replace KBuild concepts.

This is a breaking change for existing test infrastructure and build
scripts that are maintained out-of-tree. But for FW itself, no porting
should be necessary.

For users that just want to continue their work with minimal
disruption the following should suffice:

Install CMake 3.8.2+

Port any out-of-tree Makefiles to CMake.

Learn the absolute minimum about the new command line interface:

$ cd samples/hello_world
$ mkdir build && cd build
$ cmake -DBOARD=nrf52_pca10040 ..

$ cd build
$ make

PR: zephyrproject-rtos#4692
docs: http://docs.zephyrproject.org/getting_started/getting_started.html

Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00