arm-gcc version from ubuntu bionic repository is not supported in RIOT.
Both when building with `gnu` and `llvm`.
arm-none-eabi-gcc --version
arm-none-eabi-gcc (15:6.3.1+svn253039-1build1) 6.3.1 20170620
So detect this version and print an error if found.
The check is done on the building machine and not on the host when building in
docker.
The error can be disabled when building with WERROR=0.
The 'build' directory should be created before starting docker.
If not it will be created as root.
Also add mapping for the directory in docker.
Currently create the directory in the target until there is a directory
creation target.
This introduces a new environment variable for a common directory
that holds all output of the build process, such as application or
package binaries. This would also allow to easily redirect output
to any other location, e.g. for out-of-source builds.
By erasing slot 1 header the slot gets invalidated.
This is very useful while debugging, since we can
force the bootloader to ignore anything on that
slot.
riotboot looks for valid, available slots and compares its
version. The slot with the highest version is booted, otherwise
if no valid slot is found it loops on `while(1);`
riotboot is introduced here and makes use of riotboot_hdr,
which indentifies the images encapsulated as slots.
The slot size and offset is configurable, which makes
slots extendable if needed, e.g. 2 or more slots can be
transparently added.
Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
Co-authored-by: Gaëtan Harter <gaetan.harter@fu-berlin.de>
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.