Not all compiles/linkers support the GCC flags to not include standard
defines, include files and libraries. So make these parameters such
that the toolchain can define them when supported.
Also, according to documentation, -nostdlib does the same for both
-nostartfiles and -nodefaultlibs. So remove the redundant ones.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The filename dts.fixup is deprecated, dts_fixup.h should be used
instead. This commit detects when fixup files have not been renamed
and errors out with a warning.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
The Zephyr configuration system uses many different files in many
different formats. It makes it a lot easier for users to understand
what these files do if when we use the correct file extensions.
To this end we rename the dts.fixup files to the correct file
extension '.h'.
This is a breaking change for out-of-tree fixup files. Such files will
be detected and given an appropriate error message.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Drop a few paths from when we preprocess the dts. This is to reduce
creep of where #defines might get resolved from.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Allow application build scripts to pass extra flags to DTC, this could
for instance be done to enable/disable warnings.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
As far as testing can tell, all occurences of the "Node has a unit
name, but no reg property" warnings have been fixed. To prevent them
from re-appearing we turn the warning into an error.
This is a breaking change for out-of-tree boards that are affected by
the warning.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
In dts.cmake, build shield list. For each shield, check if
associate KCONFIG is enabled and if it is, add matching files
to following new cmake variables:
-DTC_SHIELD_OVERLAY_FILE
-DTC_SHIELD_FIXUP
Then, consume these variables when needed.
Shield overlay is conceived as the very first overlay applied
to the board dts. It intends to build a new board that should
then behave as any other board versus common or user's overlay.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
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>
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>
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>
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>
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>
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>
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>