Handle that `IMAGE_OFFSET` can be set to something that contain spaces.
With 'IMAGE_OFFSET=$$((0x1000 + 0x1000))' we had in the command line when doing
'flash'
--offset $((0x1000 --offset + --offset 0x1000))
With the change we correctly have
--offset $((0x1000 + 0x1000))
There are two major reasons for this:
1. clang picks up different errors sometimes than GCC.
2. OSX support is hardened as it is usually the toolchain used there.
Allow flashing with an offset in ROM from the rom base address.
It reuses `IMAGE_OFFSET` configuration variable name from `openocd.sh`.
This will allow flashing multiple images with different flash operations.
Introduce dist/pythonlibs directory to store RIOT python packages.
This directory is exported via PYTHONPATH by the build system to
make it commonly available.
While info-build already provides lots of useful information
it does not print the application source dir. However this
might be useful for debugging and logging, hence its added
to the output.
When running tests, I often needed to modify `buildtests.inc.mk` to see the
actual errors/standard output.
This allows overwriting the default redirection of both to `/dev/null`.
It is low level and directly given to the command execution.
As it is interpreted by make, it can even be overwritten using build system
variables:
'BUILDTEST_MAKE_REDIRECT=>/tmp/buildtest.$${board}.out 2>&1'
It replaces
make BOARD=iotlab-m3 info-debug-variable-NEWLIB_INCLUDE_DIR
/usr/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/include/
with
make BOARD=iotlab-m3 info-debug-variable-NEWLIB_INCLUDE_DIR
/usr/arm-none-eabi/include
Without trailing slash and without relative '..' everywhere.
It also uses `realpath` instead of `abspath` to support Mingw32.
Some versions of Mingw32 abspath implementation has trouble working with
windows formatted path.
$(abspath "C:/A/B") returns "/C/CUR/DIR/C:/A/B" instead of "/C/A/B"
relpath does not have this problem, it does additional symlink resolution but is
not a problem.
Note: on windows it does not remove the trailing `/`.
https://github.com/zephyrproject-rtos/zephyr/issues/2061#issuecomment-331635063
Patched in
941059c69f
Only keep lines that are indeed include path.
It also keeps newlines as they do not matter.
It fixes Mingw32 support where `grep '^\s'` is not working the same way.
It also handles some mac `sed` that do not support `\s`.
Ouput tested with:
make -C examples/hello-world BOARD=samr21-xpro info-debug-variable-COMPILER_INCLUDE_PATHS
# by also putting newlines for readability
Now:
/usr/bin/../lib/gcc/arm-none-eabi/7.2.1/include
/usr/bin/../lib/gcc/arm-none-eabi/7.2.1/include-fixed
/usr/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/include
Before:
/usr/bin/../lib/gcc/arm-none-eabi/7.2.1/cc1 -E -quiet -v -iprefix /usr/bin/../lib/gcc/arm-none-eabi/7.2.1/ -isysroot /usr/bin/../arm-none-eabi -D__USES_INITFINI__ /dev/null
/usr/bin/../lib/gcc/arm-none-eabi/7.2.1/include
/usr/bin/../lib/gcc/arm-none-eabi/7.2.1/include-fixed
/usr/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/include
When NEWLIB_INCLUDE_DIR is set from other parts than 'COMPILER_INCLUDE_PATHS' it
does not have a trailing slash.
Also, it makes it more problematic when supplying it from the command line.
And anyway having two '/' does not break anything.
Not all users register their user in the docker group and should not run the
whole make process as root to use docker.
They can now overwrite DOCKER with `DOCKER="sudo docker"`.
Creating files as a user is correctly handled as `id -u` is still run as the
original user.
In the previous state, with llvm and arm for example, newlib-nano include dir
NEWLIB_NANO_INCLUDE_DIR is placed after NEWLIB_INCLUDES and so the default
'newlib.h' is used instead of the nano version.
The excluded patterns can always be defined as they only set `CFLAGS` that
should not be passed to `CXX`.
This prepares for replacing the cflags support detection by a function.
BUILDDEPS are files / make targets that should be build before compiling.
It can include packages source download, generating headers, modules.
It is the equivalent of `APPDEPS` but not limited to the application.
It cannot be done right now with `APPDEPS` as it is used in `BASELIBS` and
fixing it requires changing mips using it for source files.