Commit graph

59 commits

Author SHA1 Message Date
Anas Nashif
3d1252ff2d soc: adapt Kconfig/CMake for soc in top /
Change build system to point to soc/ in the top directory rather than
under arch/

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-13 00:56:48 -04:00
Bobby Noelte
5a16b9020f dts: bindings: scan application dir for bindings
In addtion to zephyr/dts/bindings als scan the dts/bindings
directory within the application source directory for bindings.

Allows to have application specific bindings and drivers.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2018-08-27 12:50:13 -04:00
Alex Tereschenko
3c1a78ea0d cmake: replace PROJECT_SOURCE_DIR with ZEPHYR_BASE
Both variables were used (with the same value) interchangeably
throughout CMake files and per the discussion in GH issue,
ZEPHYR_BASE is preferred.

Also add a comment with explanation of one vs. the other.

Tested by building hello_world for several boards ensuring no errors.

Fixes #7173.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
2018-06-18 15:25:55 -04:00
Tomasz Bursztyka
1134393ac1 scripts/dts: Make extract_dts_includes generating both files by itself
Thus no need to parse twice the .dtsi, .dts and .yaml files.
Simplify provided arguments relevancy, letting argparse generating usage
message by itself.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-03-26 14:48:49 -04:00
Kumar Gala
d2e89856cc cmake: dts: Fix usage of BOARD vs BOARD_FAMILY
We assumed that ${BOARD} and ${BOARD_FAMILY} are always the same and
thus interchangeable.  That isn't always the case so use ${BOARD} proper
for when we mean the exact BOARD name we are building for vs the
BOARD_FAMILY.

We also add .dts files for board variants within a board family, such
that we have a .dts matching each board name.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-02-27 19:56:47 -06:00
Kumar Gala
b328ec51ac cmake: dts.cmake: Use SOC_PATH to find soc/dts.fixup
Per arch the path to the SOC dir that we would find dts.fixup varies
between being ${CONFIG_SOC_FAMILY}/${CONFIG_SOC_SERIES} and just
${CONFIG_SOC}.  The ${SOC_PATH} var handles defining this correct so
use it instead when we define DTS_SOC_FIXUP_FILE.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-02-22 10:14:02 -06:00
Anas Nashif
e172fa3b52 build: support out-of-tree custom boards
This is one way we can support out of tree board definitions. Basically
all this needs is a board definition in the application source directory
that follows the same structure we have in the main Zephyr tree (also
allowing multiple custom boards). An application tree would look like
this for example:

boards/
CMakeLists.txt
prj.conf
README.rst
src/

with boards following the same structure as in Zephyr:

.
├── boards
│   └── x86
│       └── arduino_101
│           ├── doc
│           │   └── img
│           └── support
└── src

To use this, you need to specify the BOARD_ROOT variable on the command
line when building:

cmake -DBOARD=<board name> -DBOARD_ROOT=<path to boards> ..

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-02-14 19:20:29 -05:00
Carles Cufi
72684ef815 dts: mcuboot: Support for common overlays and mcuboot
When the Kconfig BOOTLOADER_MCUBOOT is selected, an overlay to place the
image at the slot0 location is required. In order to avoid having to do
this manually for all samples when targetting MCUboot, include the logic
inside the dts.cmake script to prepend a new common.dts file that then
conditionally includes mcuboot.overlay.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-02-09 09:11:13 -05:00
Carles Cufi
06b9841675 dts: Move dts.cmake to cmake/
Move the DTS CMake file to the cmake/ folder, where all other .cmake
files live.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-02-09 09:11:13 -05:00
Renamed from dts/dts.cmake (Browse further)