Refactor to define REALMODULES incrementally without overwriting
'NO_PSEUDOMODULES'.
This also allows an external makefile to maybe add something there if it really
needs to.
Factorize the reused value in a private variable.
I define it private as somehow 'USEPKG' is supposed to be removed so the
variables can be removed later.
BASELIBS is used only in the main Makefile.include or included files.
As it is not used in sub make executions or scripts it does not need to
be exported.
The canned recipe is preferred to using $(FLASHER) $(FFLAGS) as it
allows to specify additional action actions (like what preflash is
currently doing.)
A canned recipe had previously been defined to perform the flashing
procedure. The canned recipe is preferred to calling $(FLASHER) $(FFLAGS)
as there might be additional steps involved in flashing (this is handled by
preflash currently but with the canned recipe we will be able to fix it.)
Modern versions of GDB support multiple targets with the same gdb binary.
At least Ubuntu and Debian have dropped the gdb-arm-none-eabi package in favour
of gdb-multiarch.
Here, no $(PREFIX)-gdb binary is availiable, instead gdb-multiarch should be used.
This patch tries to automatically detect the presense of gdb-multiarch and uses it
instead of arm-none-eabi-gdb.
FLASHFILE is now a generated file when doing `make all`.
This prepares also for when flashers will use `FLASHFILE` as a file to
be flashed.
It currently still needs the hack below for openocd and edbg.
This also fixes the issue when building 'riotboot' in docker that was
being built with the host toolchain.
Using 'link' was working too but will introduce a circular dependency
when FLASHFILE is one of the slot files.
This trims down to the minimal required dependency to work. It is now
the same as `ELFFILE` dependencies.
Include the 'riotboot.mk' file before using FLASHFILE/ELFFILE/HEXFILE
variables. This will allow setting variables to values from riotboot.mk
like `FLASHFILE = $(RIOTBOOT_COMBINED_BIN)` before it is evaluated in
Makefile.include.
It should be included after defining 'BINFILE' for 'riotboot.bin'
handling.
Extend this application with 2 custom BLE characteristics. One is
read-only and returns a string including a random number and the
second one is writable. In addition, two characteristics for device
information were added (model and manufacturer). Access to the
characteristics produces output on the terminal.
If FLASHFILE is set keep the original value.
It changes the variable from an immediate to a deferred variable but if
murdocks keeps working there is no issue.
When local echo is enabled, pexpect will also match on send lines to the
node. So could think a node is echoing when it is only seeing the sent
message.
The sent messages are still written to `logfile` but now only once.
This may show issues with our current tests implementation that expected
this behavior.
This silents the reported issue in codacy about python asserts:
Use of assert detected. The enclosed code will be removed when
compiling to optimised byte code.
The concern is valid about python asserts, but they are used in tests
and python is not run with optimised byte code.
Solution taken from codacy website
https://support.codacy.com/hc/en-us/articles/207994335-Code-Patterns
The CPU variable in the boards Makefile.include file already contains the target
CPU, so there is no reason to provide it in each board again as avrdude flag.
This commit automatically sets the avrdude target from the CPU variable and
removes the unneeded flags.
Currently the flag "-P ${PORT}" is added to avrdude regardless of the programmer
used. But this flag should only be set for programmers that operate over a
serial port - e.g. like the various Arduino bootloaders. This commit changes
the behaviour so that the "-P flag" is only set for only of the default
programmers of the various AVR boards supported by RIOT. This allows to use
ICSP programmers (e.g. like the usbtiny) like this:
make BOARD=arduino-uno PROGRAMMER=usbtiny
Introduce FLASHFILE variable to start migrating boards to use it.
This is the file that will be used for flashing.
Boards do not currently use it but will migrated in upcoming PRs.
They are remapped to `$(DOCKER_BUILD_ROOT)/external` if they are not
inside RIOT (usually the case but not for `tests/external_modul_dirs`).
If they are inside 'riotproject' they are currently also remapped to
'external'.
The value of `EXTERNAL_MODULE_DIRS` is then enforced by configuring it on
the command line as the application should not try to set it anymore.
The remapping is done in `external/directory_name` so cannot handle
multiple external directories with the same name.
Use RIOTPROJECT from within the riot repository if it is inside.
This means when it is the case to use:
* Not mounting the directory to `riotproject`
* Use `APPDIR` relative to inside RIOT
If it is not inside, do the same as before:
* Mount the RIOTPROJECT to `riotproject`
* Use `APPDIR` relative to RIOTPROJECT
Add functions to get volume and env arguments for a given directory environment
variable.
It handles:
* variables with multiple directories like EXTERNAL_MODULE_DIRS
* relative path
* if the 'directories' variable is empty, it will not be exported to docker