A call to `$(ensure_value x,y)` will fail with message y if x is empty, and
otherwise return x. This can be useto write more compact makefiles, while still
producing friendly error messages.
When doing `make -j clean all' the directories can be cleaned after
files are made. To ensure files are created after clean, those targets
are made conditionally dependent on the clean target.
This copies the handling done in Makefile.include.
Get FLASH_FILE and ELFFILE from command line instead of environment variable.
The documentation was claiming ELFFILE was given as a command line argument
already, but is was not.
riotboot_hdr enables to partition the internal flash memory
into "slots", each one with a header providing information
about the partition. The concept for now is limited to
firmware partitions, which are recognised by the riotboot
bootloader. In the future the concept might be extended to
represent other content.
Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
Get BINFILE and ELFFILE from command line instead of environment variable.
Rename 'HEXFILE' to 'BINFILE' in the script as the binary file is used.
The documentation was already talking about 'BINFILE' but 'BINFILE'
was never exported by the build system and it was using 'HEXFILE' in the
implementation.
This makes doing 'scan-build-analyze' produce an error at execution if
WERROR=1.
When used from `scan-build` it will not procude an error to display the result
webpage.
This correctly defines a `scan-build-analyze` target that does not display the
result webpage.
`scan-build-view` has now been moved to a private target as should not
be used directly.
The handling of displaying the page on the host system and implementing
'scan-build-analyze' are now explicitely done with separate targets and
not double implemented target when in docker or on the host that were executed
twice with different implementations.
When building from a worktree, the common git directory was not mounted
in docker.
This lead to the version not being set and issues with git-cache in
ubuntu bionic that could not execute the 'git hash-object' command.
This completely removes the hardcoded/os specific path setting for includes.
It directly queries gcc include directories.
It takes what was already done by `makefiles/libc/llvm.inc.mk`.
I replaced the `GCC_MULTI_DIR` handling by givining `CFLAGS_CPU` when
searching for include directories.
`CFLAGS` cannot be used as it will crash when `-target $(CPU_ARCH)` is
added.
It currently requires using deferred variables as `CFLAGS_CPU` can be
overwritten later in the build process.
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.