By default if IoT-LAB Cli Tools V3 is used then BINFILE is used to
flash on IoT-LAB. But BINFILE is not built by default when RIOT_CI_BUILD
is set as a ci optimization.
But since before IOTLAB_NODE was not passed to docker when building it
did not know that it should BUILD BINFILE as well, which led to failures
if doing:
$ IOTLAB_NODE=iotlab-m3.grenoble.iot-lab.info BOARD=iotlab-m3 \
RIOT_CI_BUILD=1 BUILD_IN_DOCKER=1 make -C examples/hello-world/ flash
But if IOTLAB_NODE is passed at is checks for IoT-LAB cli Tools also
happen in the docker container which leads to a make error since those
are not present in docker.
Therefore add BINFILE to BUILD_FILES if RIOT_CI_BUILD is set, but unset
IOTLAB_NODE once INSIDE_DOCKER.
If we
-include Makefile.ci
and `Makefile.ci` does not exist, but we provide `make` with a way
on how to do so, it will try to create `Makefile.ci`.
This is not what we want, but I don't know how to disable this automagic.
So rename the target to `create-Makefile.ci` to avoid the conflict.
The warning about the API change is scheduled to be removed by 2020.10.
Since the release has been branched off, we can now drop the warning
going forward.
If the repository was checked out without tags, parsing RIOT_VERSION
will fail.
Fall back to creating a fake release version code based on the current
year and month.
Redirecting `2>&1 >/dev/null` moves stderr to stdout first and then
stdout to /dev/null; when checking for command existence or otherwise
silencing output, this is usually not desired (but only starts producing
errors when the actual command fails, which is often not tested).
Previously, external modules had to be individually added to both
EXTERNAL_MODULE_DIRS and USEMODULE. If those where not in sync, this
resulted in build errors.
With this commit, search folders for external modules are added to
EXTERNAL_MODULE_DIRS instead. So lets say the file system structure is
like this
```
└── /path/to/external/modules
├── mod_a
│ ├── Makefile
│ ├── Makefile.dep
│ ├── Makefile.include
│ ├── foo.c
│ └── include
│ └── external_module.h
└── mod_b
├── Makefile
└── bar.c
```
One now adds `/path/to/external/modules` to EXTERNAL_MODULES and only
with `USEMODULE += mod_a` the corresponding module, dependencies and
include settings are actually used. Hence, it is possible to configure
`EXTERNAL_MODULE_DIRS` from `~/.profile` or `~/.bashrc` once and never
needs to worry about them again.
The escape codes and special chars now live in their own module. The
color module is only concerned with detecting whether to use colors or
not.
Additional variables are defined with hard a coded ESC char, a tab and a
newline. This removes the need for echo or printf.
By running make compile-commands a `compile_commands.json` in the RIOT base
directory. With the environment variable `COMPILE_COMMANDS` the path of
this file can be changed to a custom location.
The `compile_commands.json` will contain the exact compile command, but
as additional flag `-I/usr/$(TARGET)/include` is added to work around
`clangd` not being able to locate the newlib system headers. The
additional includes can be overwritten using the environment variable
`COMPILE_COMMANDS_EXTRA_INCLUDES`.
`cosy` is a graphical memory usage analyzer.
It is a great tool, but pretty hidden.
Add it as a build target so it can be easiely summoned for any application and board.
This adds a check in the build process to verify that no ERROR_ Kconfig
symbols are set. These symbols indicate invalid conditions in the
Kconfig configuration.
Separate thread names from DEVELHELP so thread names can be
enabled in non-development/debug builds when required/desired.
THREAD_NAMES will be enabled by default then DEVELHELP is set to 1.
This switch allows to test the module dependency modelling during the
Kconfig migration. When set, it will use the symbols prefixed with
CONFIG_MOD_ defined by Kconfig as the list of modules to compile.
This allows to include KCONFIG_OUT_CONFIG file in Makefile
unconditionally, which means that `make clean all` is allowed when using
Kconfig.
For this, the recipe for `clean` is guarded with `MAKE_RESTARTS` so
the BINDIR folder is not removed once Make restarts scanning the files.
The comment says as much, the tool in question even has `macosx` in its
name [1], and it does not build for other non-Linux-POSIX systems such
as FreeBSD.
[1]: https://github.com/tzvetkoff/setsid-macosx
When mixing C and C++ code, $(CXX) has to be used for linking. Prior to this
commit, the build system automatically uses $(CXX) if the application contains
C++ source code. However, if C++ is used in an module only, $(CC) is still
used. This has not let to problems, as internal modules must be written in C.
For external modules this restriction does not apply.
This commit checks if the cpp feature is used. In that case, $(CXX) is used
for linking over $(CC). This way external modules may use C++ code.
That pair is reserved for cases when it can be set implicitly by the
build system.
The check could just as well be done in sys/include/usb.h, but this
gives prettier output.
This allows the check for test IDs to run independently of the
configuration source, and provides a canonical point for the
configurable (and tested) Makefile variable to enter CFLAGS.
This
* renames DEFAULT_xID to USB_xID_TESTING as it is not really a default
(if anyting, the 7D00 is, and it's not that)
* moves the check into Makefile
* generalizes the check to all test PID/VID pairs
* in doing so, fixes the "or" (which would have ruled out warning-free
use of an allocated pid.codes number), and compares to the actual
testing PID rather than the RIOT-peripheral PID
* removes all occurrences of duplicated checks in examples or tests,
leaving definitions only where they are needed
* moves the Kconfig defaults of the usbus_minimal example into the main
Kconfig, as these are good defaults for all cases when USB is enabled
manually
Closes: https://github.com/RIOT-OS/RIOT/issues/12273
- Add the new EXTERNAL_BOARD_DIRS variable that can contain a space separated
list of folders containing external boards
- Introduce $(BOARDDIR) as shortcut for $(BOARDSDIR)/$(BOARD)
- Map the existing BOARDSDIR to the new approach
- If BOARDSDIR is provided by the user, it will be added to
EXTERNAL_BOARD_DIRS for backward compatibility. (And a warning is issued
to encourage users migrating to EXTRA_BOARDS.)
- BOARDSDIR is updated after the board is found to "$(BOARDDIR)/..".
- Useful for `include $(BOARDSDIR)/common/external_common/Makefile.dep`
- Provides backward compatibility
Rename the variable to make it clearer that it refers to the last Makefile
included.
Usually this is the current file, but when another Makefile is included this
changes.
This adds a new subdirectory called `fuzzing/` which will contain
applications for fuzzing various RIOT network modules in the future.
This subdirectory is heavily inspired by the `examples/` subdirectory.
The fuzzing applications use AFL as a fuzzer. Each application contains
Makefiles, source code, and an input corpus used by AFL to generate
input for fuzzing.
$(MAKEFILEDIR) will always evaluate to the directory of the Makefile
where it's being called (evaluated).
This construct is used elsewhere in RIOT, make it more accessable
by defining a special variable with it.
Goals:
- Untangle dependency resolution and feature checking for better maintainability
- Improve performance of "make info-boards-supported"
Changes:
- Makefile.dep
- Dropped handling of default modules and recursion
- Now only dependencies of the current set of used modules and pkgs are
added
==> External recursion is needed to catch transient dependencies
- Changed Makefile.features:
- Dropped checking of provided features
- Dropped populating FEATURES_USED with provided features that are required
or optional
- Dropped populating FEATURES_MISSING with required but not provided
features
- Dropped adding modules implementing used features to USE_MODULE
==> This now only populates FEATURES_PROVIDED, nothing more
- Added makefiles/features_check.inc.mk:
- This performs the population of FEATURES_USED and FEATURES_MISSING now
- Added makefiles/features_modules.inc.mk:
- This performs now the addition of modules implementing used features
- Added makefiles/dependency_resolution.inc.mk:
- This now performs the recursion required to catch transient dependencies
- Also the feature check is performed recursively to handle also required
and optional features of the transient dependencies
- DEFAULT_MODULES are added repeatedly to allow it to be extended based on
used features and modules
==> This allows modules to have optional dependencies, as these
dependencies can be blacklisted
- Use simply expanded variables instead of recursively expended variables
(`foo := $(bar)` instead `foo = $(bar)`) for internal variables during feature
resolution. This improves performance significantly for
`make info-boards-supported`.
- Reduce dependency resolution steps in `make info-boards-supported`
- Globally resolve dependencies without any features (including arch)
provided
==> This results in the common subset of feature requirements and modules
used
- But for individual boards additional modules might be used on top due
to architecture specific dependencies or optional features
- Boards not supporting this subset of commonly required features are not
supported, so no additional dependency resolution is needed for them
- For each board supporting the common set of requirements a complete
dependency resolution is still needed to also catch architecture specific
hacks
- But this resolution is seeded with the common set of dependencies to
speed this up