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

doc: update Makefile.include instructions

Specify the programmer using the PROGRAMMER variable, don't include programmer specific makefile and serial makefile
This commit is contained in:
Alexandre Abadie 2020-12-02 09:41:01 +01:00
parent 646e665a86
commit b31357eccc
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405

View File

@ -125,21 +125,31 @@ FEATURES_PROVIDED += periph_uart
### Makefile.include {#makefile-include}
This file contains BSP or toolchain configurations for the `BOARD`. It
should at least define the configuration needed for flashing (i.e. a
programmer) as well as the serial configuration (if one is available).
should at least define the configuration needed for flashing (i.e. specify a
default programmer) as well as the serial configuration (if one is available).
The default serial port configuration is provided by
`makefiles/tools/serial.inc.mk` and define the following values for the serial
port (depends on the host OS):
e.g.:
```
PORT_LINUX ?= /dev/ttyACM0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
```
So if the board is also using this, there's no need to redefine these variables
in the board configuration.
For example a board that is using a custom serial port (via an USB to serial
adapter) and that is flashed using openocd by default would have the following
content in its `Makefile.include`:
```mk
# Define the default port depending on the host OS
PORT_LINUX ?= /dev/ttyUSB0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*)))
# setup serial terminal
include $(RIOTMAKE)/tools/serial.inc.mk
# this board uses openocd
include $(RIOTMAKE)/tools/openocd.inc.mk
PROGRAMMER ?= openocd
```
## doc.txt {#board-doc}