The original em7d, em9d and em11d are different configurations of
em_starterkit. They have the same peripherals, e.g. uart, spi, gpio
, ddr. The differences of them are in arc core configurations, interrupt
number assignment.
So em7d, em9d and em11d can be viewed in the same SoC family or SoC
series.
Referring other arch's implementation, this commit merges em7d, em9d
and em11d into the same SoC, named snps_emsk. This will eliminate
unnecessary duplication and make it easier for future maintainment.
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
Remove the C Kconfig tools and various scripts associated with them.
scripts/kconfig/diffconfig is popular, so keep it.
I don't know whether anyone is using scripts/kconfig/config. Remove it
and see if anyone screams.
scripts/kconfig/streamline_config.pl deals with modules ('m' values) and
can safely be removed. Zephyr's Kconfig files do not use modules.
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
They will no longer be available once the C Kconfig implementation is
removed.
oldconfig and allno/yesconfig implementations are available for
kconfiglib and could be added later if needed. savedefconfig (minimal
configuration generation) is available from the menuconfig.py
configuration interface.
cmake/usage/kconfig-usage.cmake becomes kinda pointless after this
change, so merge it into cmake/usage/usage.cmake.
Remove the kconfig_target, COMMAND_FOR_*, and COMMAND_RUNS_ON_WIN_*
CMake variables, as there's just the 'menuconfig' target now.
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Make 'make/ninja menuconfig' run menuconfig.py instead of mconf from the
C Kconfig tools. Get rid of the 'pymenuconfig' target.
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
When a bug in the caching mechanism is detected the cache format must
be bumped to ensure that we no longer get a cache hit on old corrupted
keys.
This fixes#7246 when the cache is corrupted.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Messages about compiler checks are very verbose so we disable them by
default. They have always been undesirably verbose, but introducing
CMAKE_REQUIRED_FLAGS into the 'check' string made them unacceptably
so.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Fix a bug where different compiler checks were aliased and therefore
the test results were incorrectly re-used.
The 'check' string is used by CMake internally to cache test results,
but when testing linker flags the check string has been aliased
between the different linker checks. To fix the aliasing issue we add
the CMAKE_REQUIRED_FLAGS variable to the 'check' string. The aliasing
issue disappears because the linker flag-under-test is in
'CMAKE_REQUIRED_FLAGS'.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This patchset provides Xtensa's xcc compiler support for Xtensa
projects in Cmake. This requires the below environment variables
to be defined aptly. The appropriate xcc license information also
need to be supplied.
ZEPHYR_GCC_VARIANT=xcc
TOOLCHAIN_VER=RF-2015.3-linux
XTENSA_CORE=cavs21_LX6HiFi3_RF3_WB16
XTENSA_SYSTEM=/opt/xtensa/XtDevTools/install/tools/
RF-2015.3-linux/XtensaTools/config/
XTENSA_BUILD_PATHS=/opt/xtensa/XtDevTools/install/builds/
Change-Id: Ib3c10e8095439b0e32276ff37c00eca8420773ec
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Older Git versions do not support the -C argument for specifying the
working directory. Switch to using --work-tree instead.
This fixes#7287.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
This commit adds a Kconfiglib-based menuconfig implementation, built
with the standard Python 'curses' module. A new 'pymenuconfig' target is
added to run it.
The C tools are kept for now. Removing them separately allows testing of
pymenuconfig alongside the C tools, and keeps changes small and focused.
A feature is planned for later that shows all symbols -- including those
that aren't currently visible -- along with a search and "jump to"
feature. Loading of arbitrary .config files will be supported later as
well (as opposed to always loading .config/KCONFIG_CONFIG). Those
features are all connected implementation-wise.
For Windows, the wheels at
https://www.lfd.uci.edu/~gohlke/pythonlibs/#curses provide the curses
implementation. They use the standard Python curses module
(_cursesmodule.c), linked against PDCurses.
Running 'python -VV' gives the Python version and bitness, to know which
wheel to install. User documentation will be added once the C tools are
removed and the 'pymenuconfig' target is moved over to 'menuconfig'.
The CMake parts are originally by Sebastian Bøe.
Description, taken from the menuconfig.py docstring:
Overview
========
A curses-based menuconfig implementation. The interface should feel
familiar to people used to mconf ('make menuconfig').
Supports the same keys as mconf, and also supports a set of
keybindings inspired by Vi:
J/K : Down/Up
L : Enter menu/Toggle item
H : Leave menu
Ctrl-D/U: Page Down/Page Down
G/End : Jump to end of list
g/Home : Jump to beginning of list
The mconf feature where pressing a key jumps to a menu entry with
that character in it in the current menu isn't supported. A search
feature with a "jump to" function for jumping directly to a
particular symbol regardless of where it is defined will be added
later instead.
Space and Enter are "smart" and try to do what you'd expect for the
given menu entry.
Running
=======
menuconfig.py can be run either as a standalone executable or by
calling the menu.menuconfig() function with an existing Kconfig
instance. The second option is a bit inflexible in that it will
still load and save .config, etc.
When run in standalone mode, the top-level Kconfig file to load can
be passed as a command-line argument. With no argument, it defaults
to "Kconfig".
The KCONFIG_CONFIG environment variable specifies the .config file
to load (if it exists) and save. If KCONFIG_CONFIG is unset,
".config" is used.
$srctree is supported through Kconfiglib.
Other features
==============
- Seamless terminal resizing
- No dependencies on *nix, as the 'curses' module is in the Python
standard library
- Unicode text entry
- Improved information screen compared to mconf:
* Expressions are split up by their top-level &&/|| operands
to improve readability
* Undefined symbols in expressions are pointed out
* Menus and comments have information displays
* Kconfig definitions are printed
Limitations
===========
- Python 3 only
This is mostly due to Python 2 not having curses.get_wch(),
which is needed for Unicode support.
- Doesn't work out of the box on Windows
Has been tested to work with the wheels provided at
https://www.lfd.uci.edu/~gohlke/pythonlibs/#curses though.
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Instead of using a module that tries to do too many things that break
in different places, keep it simple and just call git describe.
This fixes#7044 and fixes#7207.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Make posix align with non-posix platforms by having CMAKE_C_COMPILER
and friends use absolute paths.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This commit ports nearly all usage of check_c_compiler_flag,
check_cxx_compiler_flag, and check_compiler_flag to use
zephyr_check_compiler_flag instead.
This has a significant CMake configure-time performance impact.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
zephyr_check_compiler_flag is introduced to resolve
https://github.com/zephyrproject-rtos/zephyr/issues/5633
The time spent when invoking CMake is halved with a warm cache.
See the API documentation for details.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This commit introduces TOOLCHAIN_SIGNATURE. A CMake variable that is
defined like this:
Toolchains with the same signature will always support the same set of
flags.
Currently it is implemented by MD5summing the CC binary.
This is useful for instance if the build system needs to determine if
it has seen the toolchain before, e.g. in a caching use-case.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This commits allows check_compiler_flag to accept the empty string as
an option. There are several use-cases for accepting no flag, one of
which is testing the toolchain itself.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
To improve the build system's "clean build" runtime we need to cache
files in a directory outside of the build directory.
Caching files outside of the build directory is is already being done
to a certain degree today. For instance, if a user has installed
ccache it will cache files in $HOME/.ccache/.
This commit locates a directory that is suitable for caching files in
a cross-platform way. For instance on Linux this is believed to be
$HOME, on Windows this is believed to be %LOCALAPPDATA%.
If for whatever reason no environment variables are are found to be
suitable we fall back to using $ZEPHYR_BASE/.cache/. For users that
often use 'git -clean' the caching mechanism will not work as well,
but it will at least be better than no caching at all.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Added a CMake extention for determining if a directory is write-able
by the build system. To determine this, we attempt to 'touch' a file
in the directory and check the return code of this command.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Adding a new kernel object type or driver subsystem requires changes
in various different places. This patch makes it easier to create
those devices by generating as much as possible in compile time.
No behavior change.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Fixes issue #7184.
Use $BOARD_ROOT to find correct list of supported boards.
This is needed since the user can set this variable to any directory.
Pass $BOARD_ROOT to usage.cmake where it is called.
Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
Improve the error feedback when the toolchain is not found.
Currently, for some setups, presumably primarily SDK-less setups,
users can get an error message like this for certain types of
misconfigurations:
CMake Error at zephyr/cmake/extensions.cmake:984 (message):
No such file or directory: CMAKE_READELF: 'CMAKE_READELF-NOTFOUND'
Call Stack (most recent call first):
zephyr/cmake/compiler/gcc.cmake:14 (assert_exists)
zephyr/cmake/toolchain.cmake:38 (include)
zephyr/cmake/app/boilerplate.cmake:243 (include)
CMakeLists.txt:1 (include)
This commit will improve the error feedback to give a explanation for
what kind of failure has occured and will also dump relevant variables
to ease debugging.
This fixes#7075
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This uses the version and hash (git describe) and replaces the timestamp
currently used in the boot banner. This works much better than using
timestamps. It lets us point to the exact commit being used to run a
certain application or test.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The actual behaviour of CONIG_FP_SOFTABI has not been matching the
documenation. The Kconfig documentation states that floating point
instructions should be generated, but this Kconfig option has been
turning off floating point instructions instead.
This commit causes floating point instructions to be generated when
CONFIG_FP_SOFTABI is enabled, as was originally intended and
documented.
This commit can cause regressions if users have been relying on the
actual behaviour instead of the documented behaviour.
Kconfig documentation:
config FP_SOFTABI
help
This option selects the Floating point ABI in which hardware
floating point instructions are generated but soft-float calling
conventions.
GCC documentation:
Specifying ‘soft’ causes GCC to generate output containing library
calls for floating-point operations. ‘softfp’ allows the generation of
code using hardware floating-point instructions, but still uses the
soft-float calling conventions. ‘hard’ allows generation of
floating-point instructions and uses FPU-specific calling conventions.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
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>
If the value argument to set_ifndef() may be unset, the entire value
must be double-quoted to avoid a CMake syntax error.
Fix call sites which don't handle this, or which otherwise make
non-idiomatic use of this function.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
We are using the CMake command 'file(STRINGS' (which defaults to only
decoding ASCII) to read Kconfig configurations. When UTF-8 characters
are detected they are treated as newlines.
This behaviour has caused issues when users have input UTF-8
characters into Kconfig values. E.g. USB device descriptor strings.
This commit adds the flag 'ENCODING "UTF-8"' to the 'file(STRINGS'
command so that UTF-8 characters are correctly passed through the
build system.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Moving the ccache build script earlier in allows us to export ccache
to external projects. Using ccache with external projects, such as
OpenThread, can significantly speed up the build time.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
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>
ARM Cortex-M33 may implement an optional Floating Point Unit
(FPU) supporting single-precision arithmetic. This commit
modifies the respective GCC_M_CPU flag to comply with Cortex-M33.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
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>
We need access to SOC_PATH in dts.cmake so we need to move the
definitions of SOC_NAME, SOC_SERIES, SOC_FAMILY, and SOC_PATH out of the
toplevel CMakeLists.txt and into cmake/app/boilerplate.cmake. We place
them before we include cmake/dts.cmake so they will be available to use
in it.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Create a net sample to setup a multi-node RPL mesh network using QMEU.
To enable this, it was necessary implement a hw filter on IEEE 802.15.4
UART Pipe driver and create a QEMU pipe management on cmake.
This sample use a tool developed on zephyr net-tools repository called
virtual-hub.
Signed-off-by: Pedro Martucci <pedropaulomartucci@gmail.com>
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>
Move toolchain definitions into toolchain/ and move compilers to
compilers/
Usage of toolchain- for everything was confusing, there are the actual
compiler related definitions and there is the toolchain/SDK related
configs, so keeping them separate helps understand the different and
prevents confusion.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
We want to support other toolchain not based on GCC, so the variable is
confusing, use ZEPHYR_TOOLCHAIN_VARIANT instead.
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>
This patch changes the manner in which we collect DTS overlay files so
that they comply with the same approach taken for configuration fragment
files (.conf).
Additionally it also documents the usage of those files in the
Application Developer Guide.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Fixes: 5958
Ninja by default will suppress command output and input. This is a
problem for the 'flash', 'debug', etc. targets, which may need to
interact with the user (and which display interactive output like
progress bars).
To fix this, add the USES_TERMINAL option to their target
definitions. This puts them in the console pool on Ninja, allowing the
commands to interact with the console.
References:
https://ninja-build.org/manual.html#_the_literal_console_literal_poolhttps://cmake.org/cmake/help/v3.8/command/add_custom_target.html
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
When the ZEPHYR_GCC_VARIANT-variable is not set properly no
message is printed, whereas this small change will help users
to easier understand why things are not working. Here: they forgot
to set an ENV-variable.
Signed-off-by: Patrick Boettcher <patrick.boettcher@posteo.de>
Some boards do not generate .bin files by default, this file is however
needed when generating ram/rom reports, so in case it is not present,
create it.
Fixes#5784
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The work-around previously setting ARC builds to use -O2 to fix an
ADC bug #3797 is no longer needed, we should this patch and revert
to the default -Os flag to optimize for smaller size.
Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
Error occurred when using target_link_libraries in CMakeLists.txt:
Cannot specify link libraries for target "interface" which is not built
by this project.
Replace "interface" with "${interface}".
Signed-off-by: Ding Tao <miyatsu@qq.com>
$ENV{ZEPHYR_BASE} was recently search-replaced with ${ZEPHYR_BASE},
but some CMake code, like usage.cmake, is run by a seperate CMake
build system that does not have access to the CMake variable
ZEPHYR_BASE.
This patch reverts the usage of ${ZEPHYR_BASE} back to use
$ENV{ZEPHYR_BASE} in usage.cmake.
This has been proven to work on both Windows and Linux.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Run Kconfig on every reconfigure but with different fragments
depending on the situation.
When .config is missing or when a file from merge_config_file has been
modified use the merge_config_file's as input, otherwise use .config
as input.
This should match the behaviour before kconfiglib.py was introduced
and fixes#5673.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
'conf' is part of the zephyr SDK or need to be built and installed in
the path. We now using python for Kconfig processing, so this is not a
strict requirement and we should be able to build without it. If the
binary is not found, just go on with our business.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>