The standard is 9 years old now, it is well supported in all mayor compilers.
In fact, features of the 'new' standard are already used in RIOT (std_atomic).
Let's make it the default and adapt the Makefiles accordingly.
If `native` is compiled with `USEMODULE=socket_zep` and networking,
don't also include `netdev_tap` automatically.
This mirrors the behavior on nrf52 and esp* where the default netdev
can be 'overwritten' by another option.
b4f29035ce adapted the can_linux module to
the periph_can interface. This is a cleanup of some things that stayed
behind. Here the makefile is removed, the references to can_linux in the
dependency resolution and configuration Makefile are changed to the
standard periph_can, and the startup code is adapted.
With the introduction of BOARDSDIR external boards can re-use common
code of BOARDS present in RIOTBASE. To be able to do this file
references may not use $(BOARD) since BOARD will be set by the
external BOARD.
Without this change a RIOT application compiled with all-asan will
segfault as RIOT provides its own malloc by default. Add a define for
disabling custom malloc, calloc and realloc implementations and use it
when compiling with all-asan.
cpu/$(CPU)/Makefile.features and cpu/$(CPU)/Makefile.dep are
automatically included
Part of moving CPU/CPU_MODEL definition to Makefile.features to have it
available before Makefile.include.
Previously this code was compiled unconditionally which might result in
a linking error since qdecs_value is not defined if the periph_qdec
module isn't enabled.
The toolchain variables were overwritten anyway in
`makefiles/toolchain/gnu|llvm.inc.mk` as they use `=` affectation,
except for `OBJCOPY`.
On my Linux ubuntu bionic machine, the only difference for `info-build`
with both gnu/llvm and also with LTO=1
is that it now uses an absolute path for `objcopy`
-OBJCOPY: objcopy
+OBJCOPY: /usr/bin/objcopy
On the OSX 17.7.0 I tested, there was no difference.
This variable is only used for the term recipe (and maybe for flashing). They
should not be evaluated if they are not needed and the user should not see a
warning that the port is not set if he does not use port (for example in make
all.)
DEBUGGER/DEBUGGER_FLAGS/DEBUGSERVER/DEBUGSERVER_FLAGS are evaluated by the
main Makefile.include or by file included by it.
Their value does not need to be exported.
Testing
-------
`git diff --word-diff` only reports `export` being removed.
`git show --stat` reports `55 insertions(+), 55 deletions(-)`
Which is the same amount as lines that where matching
`export[[:blank::]]\+VARIABLE`.
FLASHER and FFLAGS are evaluated by the main Makefile.include or by file
included by it. Their value does not need to be exported.
This will also prevent evaluating 'PORT' for FFLAGS when not needed.
Testing
-------
`git diff --word-diff` only reports `export` being removed.
`git show --stat` reports `84 insertions(+), 84 deletions(-)`
Which is the same amount as lines that where matching
`export[[:blank::]]\+VARIABLE`.
Configure 2 factice motors in one motor_driver.
native_motor_driver_qdec_simulation() is provided to simulate QDEC encoders
virtually linked to the motors.
Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
native_motor_driver_qdec_simulation() callback is called each time
motor_set() from motor_driver driver is called.
It set associated qdec value to the PWM duty cycle.
QDEC values are stored in qdecs_value[] array in the order motors
are described in board.h.
Then it is needed to configure in first motors that needs the QDEC in
board.h.
Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
The file always exist so no need to do '-include'.
Replaced using:
sed -i 's|-\(include $(RIOTCPU)/.*/Makefile.features\)|\1|' \
$(git grep -l '$(RIOTCPU)/.*/Makefile.features' boards)
Some modules used a 'NATIVEINCLUDES' with different include path and no other
included directories.
It was defining basic 'include' in a different order and not using other things
defined in INCLUDES.
After doing some checks with the given include path and possible conflicting
files, there should be no conflict when using the default one.
* No common headers between all the NATIVEINCLUDES directories
* No common headers files between board/native/include, cpu/native/include and
other files in the repository (except other boards/cpus of course).