1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

21683 Commits

Author SHA1 Message Date
MrKevinWeiss
7a220d16a8 sys/shell: Add shell command for app_metadata
This make an easily accessable shell command to print app_metadata
2019-03-05 16:10:06 +01:00
MrKevinWeiss
fc80ae7724 sys/app_metadata: Add app_metadata module
This allows a access to application metadata such as BOARD, CPU, etc.
It prints the contents to the stdio in a standard json form
2019-03-05 16:10:06 +01:00
Gaëtan Harter
8d58e3bf91
makefiles/modules.inc.mk: refactor, do not overwrite NO_PSEUDOMODULES
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.
2019-03-05 16:04:20 +01:00
Gaëtan Harter
5453523933
makefiles/modules.inc.mk: group CFLAGS handling
Put all lines related to CFLAGS handling together.
2019-03-05 15:57:18 +01:00
Gaëtan Harter
c2b1995af7
makefiles/modules.inc.mk: factorize in _ALLMODULES
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.
2019-03-05 15:54:05 +01:00
Gaëtan Harter
b6645b531b
makefiles/modules.inc.mk: do not export BASELIBS
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.
2019-03-05 15:52:38 +01:00
Gaëtan Harter
670a836863
makefiles/modules.inc.mk: do not export USEMODULE
USEMODULE is already exported by `makefiles/vars.inc.mk`.
2019-03-05 15:45:08 +01:00
Juan I Carrano
0bafe2221e
Merge pull request #11106 from benpicco/gdb-multiarch_fix
makefiles/tools: Automatically detect gdb-multiarch
2019-03-05 15:28:48 +01:00
Juan Carrano
420b2c9220 makefiles/mcuboot: use canned recipe for flashing.
The canned recipe is preferred to using $(FLASHER) $(FFLAGS) as it
allows to specify additional action actions (like what preflash is
currently doing.)
2019-03-05 14:45:48 +01:00
Juan Carrano
748bc6deee makefiles/riotboot: use canned recipe for flashing.
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.)
2019-03-05 14:39:57 +01:00
Benjamin Valentin
6e7414e220 makefiles/tools: Automatically detect gdb-multiarch
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.
2019-03-05 14:31:22 +01:00
Francisco Acosta
52d2851747
Merge pull request #11089 from cladmi/pr/riotboot/use_flashfile
tests/riotboot: use FLASHFILE for the generated file
2019-03-05 14:29:02 +01:00
MrKevinWeiss
0738084657 Makefile: add APPLICATION to macro defines
This allows the application code to know what application it is running
2019-03-05 14:00:41 +01:00
Gaëtan Harter
7a88bb4c1f
riotboot: prepare for when FLASHFILE is used
This currently does nothing but setting FLASHFILE when flashing.
This will allow passing the variable when flasher will use the FLASHFILE
variable.
2019-03-05 12:04:15 +01:00
840a096ce6
boards/nrf52840-mdk: fix openocd programmer configuration
For nrf52 based boards, the default adapter is JLink and nrf52840-mdk
uses dap.
2019-03-05 11:48:16 +01:00
Gaëtan Harter
13e852c58c
tests/riotboot: use FLASHFILE for the generated file
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.
2019-03-05 11:22:11 +01:00
Gaëtan Harter
240e4a3fe2
makefiles/riotboot.mk: slots only need to depend on BASELIBS
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.
2019-03-05 11:22:11 +01:00
Gaëtan Harter
ecfdece104
Makefile.include: include 'riotboot.mk' before using FLASHFILE
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.
2019-03-05 11:22:11 +01:00
Gaëtan Harter
60f71a1c15
tests/riotboot: use 'RIOTBOOT_COMBINED_BIN' variable
Use the new variable instead of the composed name.
2019-03-05 11:22:11 +01:00
5355f6a7be
Merge pull request #11062 from jcarrano/picocom-no-echo
serial.inc.mk: disable local echo in picocom.
2019-03-05 09:58:59 +01:00
e863adaca2
Merge pull request #11100 from haukepetersen/opt_nrf802154_addrgen
cpu/nrf52/nrf802154: unify address generation
2019-03-04 23:27:37 +01:00
1bed56847a
Merge pull request #11097 from cladmi/pr/murdock/flashfile
makefiles/murdock.inc.mk: do not overwrite FLASHFILE if set
2019-03-04 22:28:59 +01:00
HendrikVE
b5dacb6534 examples/nimble_gatt: extend application with ble characteristics
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.
2019-03-04 17:28:19 +01:00
Hauke Petersen
824fcf3c9d cpu/nrf52/nrf802154: unify address generation 2019-03-04 17:12:06 +01:00
Hauke Petersen
7cb1049eef
Merge pull request #10268 from SemjonKerner/add_nrf154
cpu/nrf52/radio: initial support for nrf52's ieee802.15.4 radio
2019-03-04 16:18:43 +01:00
f26425fdaf uncrustify: split lines at 80 chars 2019-03-04 16:14:57 +01:00
Gaëtan Harter
7467d1be75
makefiles/murdock.inc.mk: do not overwrite FLASHFILE if set
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.
2019-03-04 15:52:35 +01:00
MichelRottleuthner
1642a03125
Merge pull request #11066 from aabadie/pr/boards/common_f4_clock
boards/common/stm32: rework common clock configuration for stm32f4
2019-03-04 14:10:47 +01:00
Gaëtan Harter
731dcfc319
testrunner: disable local echo
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.
2019-03-04 13:26:53 +01:00
Gaëtan Harter
622645d03c
Merge pull request #11086 from cladmi/pr/codacy/python_asserts
codacy: disable complaining about python assert
2019-03-04 13:26:05 +01:00
Semjon Kerner
3efeb8056e examples/default: add ieee802.15.4 radio support for all nrf52840 boards 2019-03-04 13:21:47 +01:00
Semjon Kerner
84ebd83a62 boards/nrf52840dk: support ieee802.15.4 radio 2019-03-04 13:21:47 +01:00
Semjon Kerner
20728c2528 sys/auto_init: add auto_init for nrf52 ieee802.15.4 driver 2019-03-04 13:21:47 +01:00
Semjon Kerner
91787dcb5c cpu/nrf52: add 802.15.4 radio driver 2019-03-04 13:21:47 +01:00
Semjon Kerner
c2a40be458 drivers/netdev_ieee802154: add mac header filter 2019-03-04 13:21:43 +01:00
Kevin "Bear Puncher" Weiss
e3e2b6df15
Merge pull request #11084 from cladmi/pr/make/introduce_flashfile
Makefile.include: introduce FLASHFILE
2019-03-01 14:44:31 +01:00
Gaëtan Harter
4a23028265
codacy: disable complaining about python assert
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
2019-03-01 13:43:37 +01:00
Sebastian Meiling
d29d336894
Merge pull request #11039 from maribu/avrdude
makefiles/tools: Improved avrdude integration
2019-02-28 22:15:30 +02:00
Marian Buschsieweke
4abc41a227
makefiles/tools: Automatically set avrdude target
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.
2019-02-28 20:55:04 +01:00
Marian Buschsieweke
93cd8a1b04
makefiles/tools: fix avrdude with ICSP programmers
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
2019-02-28 20:55:00 +01:00
Gaëtan Harter
1d268c4cdb
Makefile.include: introduce FLASHFILE
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.
2019-02-28 18:11:49 +01:00
cladmi
3a17ddc43c
makefiles/docker.inc.mk: add support for EXTERNAL_MODULE_DIRS
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.
2019-02-28 15:13:35 +01:00
cladmi
8b54f87fc4
makefiles:docker.inc.mk: add a global documentation on directory mapping 2019-02-28 14:46:43 +01:00
cladmi
3c0ecebb2c
makefiles/docker.inc.mk: use more directories in RIOT
Use the directories from in RIOT if possible for RIOTCPU/RIOTBOARD/RIOTMAKE.
2019-02-28 14:46:43 +01:00
Gaëtan Harter
8687d53c82
makefiles/docker.inc.mk: use BUILD_DIR in RIOT if possible
Use BUILD_DIR from within the riot repository if it is inside.
2019-02-28 14:46:43 +01:00
Gaëtan Harter
a57f141cf6
makefiles/docker.inc.mk: use RIOTPROJECT in the RIOT if possible
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
2019-02-28 14:46:43 +01:00
cladmi
e59b77988d
makefiles/docker.inc.mk: add docker_volume_and_env
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
2019-02-28 14:46:43 +01:00
cladmi
8351b13cc3
makefiles/docker.inc.mk: add path_in_docker function
Return to which directory in the container this directory should be mapped.
2019-02-28 14:46:43 +01:00
cladmi
a462c4aeb9
makefiles/docker.inc.mk: change definition order
Update definition order for DOCKER_VOLUMES_AND_ENV.

* Localtime
* Mapping and env related to `RIOTBASE`
* Build directories
* Project
* CPU/BOARD/make
2019-02-28 14:46:43 +01:00
cladmi
e5871d9deb
makefiles/docker.inc.mk: use a variable for all volumes and environment 2019-02-28 14:46:27 +01:00