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).
`PORT` is unset if `netdev2_tap` is not in `USEMODULES`.
But unfortunately, `netdev2_tap` is set by boards/native/Makefile.dep
*after* `PORT` is set, so that `PORT` remains empty.
This commit breaks this circular dependency by checking for
`netdev_default` and `gnrc_netdev_default` instead.
Without this commit, `make term` throws an error for examples that
require a tap interface, when `PORT` is not explicitely given.
uart0 functionality is removed by #3164. This patch implements periph/uart,
rather than deprecated uart0, using /dev/tty.
To use with netdev2_tap simultaneously, this patch adds asynchronus read system
and modifies netdev2_tap to use it.
A TTY device is specified on command line with -c (COM) option, since -t was
used by the old implementation.
This patch also implements empty GPIO driver needed by the xbee driver.
* also added a trailing underscore to header guards for consistency
Commit for PR 2623, repairing header file include guards.
This PR is intended to fix the include guards in files under RIOT/boards
SQUASH ME: fix underscore removal overdos
SQUASH ME: consistent macro naming
SQUASH ME: missed that one
SQUASH ME: fixed overdo
SQUASH ME: consistency
This change allows drivers (or any module for that matter) to provide
features. This is e.g. useful if a board does not have a transceiver,
but your application uses `USEMODULE += some_driver`, which implements
the transceiver interface.
The line `FEATURES_PROVIDED += some_feature` should go to the guarded
block in `{sys,drivers}/Makefile.include`.
Please see #1715.
Closes#1715.
This PR implements the new Makefile variables "FEATURES_PROVIDED" and
"FEATURES_REQUIRED". A board *can* have a new file `Makefile.features`
which looks like:
```make
FEATURES_PROVIDED = transceiver
```
An application can have a corresponding line
```make
FEATURES_REQUIRED = transceiver
```
If the selected BOARD does not fulfil the requirements of the
application, then a *warning* is issued at compile time.
This change only includes the feature "transceiver", further features
are expected to be listed in further PRs. The requirement "transceiver"
is automatically added if the application uses the module
"defaulttransceiver".
`make buildtest` understands the new feature listing, so the user won't
need to add boards to `BOARD_BLACKLIST` manually.
Part of the change are the added Make targets
* `info-features-missing`, which prints the required features
`\setminus` the provided features. The output is empty if there are no
features missing.
* `info-boards-features-missing`, the same as `info-features-missing`
but as a table for all boards, but heeded `BOARD_WHITELIST` and
`BOARD_BLACKLIST`.
Applications don't have to use this new feature. This change does not
break existing Makefile.
It can be useful to know if the current compilation builds the native
board module, because e.g. then we must not include `sys/types.h`.
This diff adds `-DNATIVE_INCLUDES` to the make variable
`NATIVEINCLUDES`.
Sometimes boards/*/Makefile.include (e. g. in case of the msba2) gets included
twice somehow, leading the TERMFLAG to be set twice and faulty. This
fixes that.