The start of generated/cfb_font_dice.h looked like this:
/*
* This file was automatically generated using the following command:
* /home/john/zephyrproject/zephyr/scripts/gen_cfb_font_header.py
* --input fonts/dice.png --output
* /home/john/tmp/build/zephyr/include/generated//cfb_font_dice.h
* --width 32 --height 32 --first 49 --last 54
*/
For build reproduction and "privacy" reasons, change it to this:
/*
* This file was automatically generated using the following command:
* ${ZEPHYR_BASE}/scripts/gen_cfb_font_header.py
* --input fonts/dice.png --output
* zephyr/include/generated//cfb_font_dice.h
* --width 32 --height 32 --first 49 --last 54
*/
Test with:
sanitycheck -p reel_board \
-T $ZEPHYR_BASE/samples/display/cfb_custom_font/
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The macro obtains the toolchain specific flag and value for
setting of the requested c standard.
The intent here is to abstract Zephyr's dependence on toolchains,
thus allowing for easier porting to other, perhaps commercial,
toolchains and/or usecases.
No functional change expected.
Signed-off-by: Danny Oerndrup <daor@demant.com>
Final step of linker abstraction:
* Abstract zephyr_lnk by including it in toolchain_ld_link_elf.
* Abstract relevant uses of target_link_libraries.
* Introduce toolchain_ld_force_undefined_symbols.
No functional change expected.
This is motivated by the wish to abstract Zephyr's usage of toolchains,
permitting non-intrusive porting to other (commercial) toolchains.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
The macro is intended to abstract the -fno-common compiler option
which controls the placement of uninitialized global variables. The
macro leaves it up to the toolchain to define the option.
The intent here is to abstract Zephyr's dependence on toolchains,
thus allowing for easier porting to other, perhaps commercial,
toolchains and/or usecases.
No functional change expected.
Signed-off-by: Danny Oerndrup <daor@demant.com>
The macro is intended to abstract the -imacros compiler option for
inclusion of the autoconf.h header file. The abstraction allows for a
given toolchain to decide how the inclusion of the header file is to
be done.
The intent here is to abstract Zephyr's dependence on toolchains,
thus allowing for easier porting to other, perhaps commercial,
toolchains and/or usecases.
No functional change expected.
Signed-off-by: Danny Oerndrup <daor@demant.com>
The macro is intended to abstract the -ffreestanding compiler option
which tells the compiler that this is a bare metal env. The option is
compiler and thus toolchain specific, but this macro leaves it up to
the toolchain to decide the value of the option.
The intent here is to abstract Zephyr's dependence on toolchains,
thus allowing for easier porting to other, perhaps commercial,
toolchains and/or usecases.
No functional change expected.
Signed-off-by: Danny Oerndrup <daor@demant.com>
cmake has a number of issues dealing with symbolic links:
https://gitlab.kitware.com/cmake/cmake/issues/16228
One of them can cause cmake to rewrite the -S input from the user and
CMAKE_SOURCE_DIR to unexpectedly include symbolic links:
https://cmake.org/pipermail/cmake/2019-May/thread.html#69496
Catch this corner case and warn about subtle issues like breaking
-fmacro-prefix-map=${ZEPHYR_BASE}=
Sample warning message:
CMake Warning at ../../CMakeLists.txt:30 (message):
ZEPHYR_BASE doesn't match CMAKE_CURRENT_SOURCE_DIR
ZEPHYR_BASE = ~/zephyrproject/zephyr
PWD = ~/westsymlink/zephyr/samples/hello_world
CMAKE_CURRENT_SOURCE_DIR = ~/westsymlink/zephyr
You may be using a mix of symbolic links and real paths which causes
subtle and hard to debug CMake issues.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This helps by letting us add checks for when the runner has already
been set. There is documentation saying you can set
-DBOARD_DEBUG_RUNNER at the command line and have it take effect,
which turns out not to be true for a large number of boards.
A status message helps the user debug.
(We'll address the existing in-tree boards in the next patch.)
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
Add a version check to allow building with older GCC versions that did
not support this option.
Fixes#16607
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
With gcc 9.1.x on fedora 30 we are getting new warnings that turn into
errors when running sanitycheck. Disable those while the issues are
being addressed.
Relates to #16587
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This is a graphical configuration interface written in Tkinter. Like
menuconfig.py, it supports showing all symbols (with invisible symbols
in red) and jumping directly to symbols. Symbol values can also be
changed directly from the jump-to dialog.
This interface should feel a lot smoother than menuconfig.py on Windows.
When single-menu mode is enabled, a single menu is shown at a time, like
in the terminal menuconfig. Only this mode distinguishes between symbols
defined with 'config' and symbols defined with 'menuconfig'.
Compatible with both Python 2 and Python 3. Has been tested on X11,
Windows, and macOS.
To avoid having to carry around a bunch of GIFs, the image data is
embedded in guiconfig.py. To use separate GIF files instead, change
_USE_EMBEDDED_IMAGES to False. The image files can be found in
https://github.com/ulfalizer/Kconfiglib/tree/screenshots/guiconfig.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Make headers look like this instead:
/* From ${ZEPHYR_BASE}/arch/common/isr_tables.ld: */
Besides being shorter and more "private", this makes the content of
snippets-*.ld files the same no matter who built them and where.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
With the addition of a local CMake variable ZEPHYR_BASE that mirrors the
value of the environment variable the documentation build broke on
Windows. This is because CMake was incorrectly interpreting backslashes
present in the Windows path as escaping characters. In order to avoid
this, use CMake's built-in file(TO_CMAKE_PATH) functionality, which
converts the path to a canonical version using forward slashes only.
At the same time rework boilerplate.cmake to use the same mechanism
instead of manually replacing backslashes and removing trailing ones.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Introducing the macro toolchain_cc_warning_error_implicit_int which,
abstracts the implicit_int error flag thus leaving it to the toolchain
to decide whether this flag is needed or not.
The intent here is to abstract Zephyr's dependence on toolchains,
thus allowing for easier porting to other, perhaps commercial,
toolchains and/or usecases.
No functional change expected.
Signed-off-by: Danny Oerndrup <daor@demant.com>
The macros are named toolchain_cc_warning_error_misra_sane and
toolchain_cc_cpp_warning_error_misra_sane
These macros provide toolchain specific flag(s) relating to the MISRA
SANE configuration option.
The macros will place the flag(s) in a variable provided by caller,
which can then add to zephyr compile options.
The intent here is to abstract Zephyr's dependence on toolchains,
thus allowing for easier porting to other, perhaps commercial,
toolchains and/or usecases.
No functional change expected.
Signed-off-by: Danny Oerndrup <daor@demant.com>
on non-XIP system, SRAM is the default region, and relocated .data
section and .bss section of SRAM shouldn't be inserted between
_image_rom_start and _image_rom_end, because the memory region between
_image_rom_start and _image_rom_end will construct the mpu ro region.
Also for the newly added memory region on non-XIP system, the
relocated .text secition and .rodata section should also be mpu aligned.
Fixes: #16090.
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
'west --version' output has the path to the west manifest directory.
If there is a semantic version string in this path name, it will
raise a false version check failure.
Signed-off-by: Thomas Stilwell <Thomas.Stilwell@nordicsemi.no>
Shields can often be very complex to setup in a generic way for several
boards to support. Let's allow shields to have their own .conf files
as well as specialized overlays per board (when needed).
Signed-off-by: Michael Scott <mike@foundries.io>
Allows snippets to be placed in different locations:
- The noinit, rwdata and rodata output sections
- Two different locations for placing custom output sections,
one location for RAM and another for all other sections.
Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
This is placeholder for extended warning flags, likely to change between
toolchains.
The intent here is to abstract Zephyr's dependence on toolchains,
thus allowing for easier porting to other, perhaps commercial,
toolchains and/or usecases.
No functional change expected.
Signed-off-by: Danny Oerndrup <daor@demant.com>
This is placeholder for base warning flags, common to most toolchains.
The intent here is to abstract Zephyr's dependence on toolchains,
thus allowing for easier porting to other, perhaps commercial,
toolchains and/or usecases.
No functional change expected.
Signed-off-by: Danny Oerndrup <daor@demant.com>
The introduced macros are placeholders for the cmake parameter warning
level.
The intent here is to abstract Zephyr's dependence on toolchains,
thus allowing for easier porting to other, perhaps commercial,
toolchains and/or usecases.
No functional change expected.
Signed-off-by: Danny Oerndrup <daor@demant.com>
No functional change expected.
This is motivated by the wish to abstract Zephyr's usage of toolchains,
permitting non-intrusive porting to other (commercial) toolchains.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
- Add examples for the latter.
- Point at each other and highlight how independent they are from each
other.
- State their inputs and outputs in plain English.
- Fix "git describe" error message giving the wrong impression that
everyone cares about BUILD_VERSION. Only the boot banner cares now.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Move PROPERTY_LINKER_SCRIPT_DEFINES to toolchain_ld_base.
No functional change expected.
This is motivated by the wish to abstract Zephyr's usage of toolchains,
permitting non-intrusive porting to other (commercial) toolchains.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
No functional change expected.
This is motivated by the wish to abstract Zephyr's usage of toolchains,
permitting non-intrusive porting to other (commercial) toolchains.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
On some systems where you don't have access to `PATH` and you can't
set the `ENV{PATH}` variable. You need to be able to pass the path
to the west executable down to the python script so it is better
for it to be set explicitly than assuming that it exsists as a
part of the PATH/executables in the shell being called.
Signed-off-by: Sigvart M. Hovland <sigvart.hovland@nordicsemi.no>
While configure_linker_script() may be useful for other linkers, it
currently only aimed at GNU ld. To really be useful among different
linkers, we would need to abstract its usage of the C preprocessor.
We can do this later, if needed.
No functional change expected.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
No functional change expected.
This is motivated by the wish to abstract Zephyr's usage of toolchains,
permitting non-intrusive porting to other (commercial) toolchains.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
No functional change expected.
This is motivated by the wish to abstract Zephyr's usage of toolchains,
permitting non-intrusive porting to other (commercial) toolchains.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
Move GNU ld linker specific flags related to orphan handling into
toolchain_ld_baremetal().
No functional change expected.
This is motivated by the wish to abstract Zephyr's usage of toolchains,
permitting non-intrusive porting to other (commercial) toolchains.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
Move --gc-sections flag to toolchain_ld_base()
Move --build-id=none flag to toolchain_ld_base()
No functional change expected.
This is motivated by the wish to abstract Zephyr's usage of toolchains,
permitting non-intrusive porting to other (commercial) toolchains.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
Modern versions of GDB support multiple architectures
with the same binary.
In fact, Ubuntu stopped shipping a gdb-arm-none-eabi
package, gdb-multiarch should be used instead.
This fixes a failure on those systems where otherwise CMAKE_GDB will be
assigned to CMAKE_GDB-NOTFOUND.
Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
When importing a pre compiled imported library it is currently
required to perform three steps.
This commit introduces a helper function which allows the
user to import a library with a single function call.
Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
The intent of toolchain_ld_baremetal() is to collect the flags belonging
to non-hosted (i.e. POSIX-based) targets.
No functional change expected.
This is motivated by the wish to abstract Zephyr's usage of toolchains,
permitting non-intrusive porting to other (commercial) toolchains.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
* LINKERFLAGPREFIX's value is GNU ld specific, and
* LINKERFLAGPREFIX is not a convention always honored by all linkers.
Thus we shall not set it from the common root CMakeList.txt.
So we move to linker/ld/target.cmake.
No functional change expected.
This is motivated by the wish to abstract Zephyr's usage of toolchains,
permitting non-intrusive porting to other (commercial) toolchains.
Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
clang doesn't understand fortify at all, provide no op macro,
in order to handle the request to fortify in a generic way.
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
In case TOOLCHAIN_HOME isn't explicitly reuqested,
(or indirectly forced with CLANG_ROOT_DIR), detect
any host installed clang in the path.
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
The logic is practically intact and is the following:
1. Use any host installed llvm/clang in the path in case
ZEPHYR_TOOLCHAIN_VARIANT=llvm is requested alone.
2. This can be further restricted with TOOLCHAIN_HOME.
3. And can be further overridden with CLANG_ROOT_DIR,
like previously.
So, only the unconditional restriction to /usr is lifted.
Together with fixing the unconditional set of TOOLCHAIN_HOME
by host tools for non-toolchain needs, this makes the logic
more flexible.
Now, after the logic is controllable by TOOLCHAIN_HOME, 3)
might be an extra, but is left intact for backward compatibility.
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
Host-tools don't unconditionally set TOOLCHAIN_HOME anymore,
but in case Zephyr's SDK toolchain is used, set TOOLCHAIN_HOME.
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>