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.