Skip to content

Commit bbcb352

Browse files
erwangonashif
authored andcommitted
doc/guides: Add clarifications to board porting guidelines
Additions: - Provide clear description of a typical board port on zephyr - Add a clear statement that peripherals should be disabled by default (unless clearly specified) - Add clear mentions on peripheral that should actually be enabled Signed-off-by: Erwan Gouriou <[email protected]>
1 parent d0aa6fc commit bbcb352

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

doc/guides/porting/board_porting.rst

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,19 @@ A board implements an SoC with all its features, together with peripherals
121121
available on the board that differentiates the board with additional interfaces
122122
and features not available in the SoC.
123123

124+
A board port on Zephyr typically consists of two parts:
125+
126+
- A hardware description (usually done by device tree), which specifies embedded
127+
SoC reference, connectors and any other hardware components such as LEDs,
128+
buttons, sensors or communication peripherals (USB, BLE controller, ..).
129+
130+
- A software configuration (done using Kconfig) of features and peripheral
131+
drivers. This default board configuration is subordinated to features
132+
activation which is application responsibility. Though, it should also enable
133+
a minimal set of features common to many applications and to applicable
134+
project-provided :ref:`samples-and-demos`.
135+
136+
124137
.. _default_board_configuration:
125138

126139
Default board configuration
@@ -137,7 +150,10 @@ overridden.
137150

138151
In order to provide consistency across the various boards and ease the work of
139152
users providing applications that are not board specific, the following
140-
guidelines should be followed when porting a board:
153+
guidelines should be followed when porting a board. Unless explicitly stated,
154+
peripherals should be disabled by default.
155+
156+
- Configure and enable a working clock configuration, along with a tick source.
141157

142158
- Provide pin and driver configuration that matches the board's valuable
143159
components such as sensors, buttons or LEDs, and communication interfaces
@@ -149,12 +165,14 @@ guidelines should be followed when porting a board:
149165
- Configure components that enable the use of these pins, such as
150166
configuring an SPI instance for Arduino SPI.
151167

152-
- Configure an output for the console.
168+
- If available, configure and enable a serial output for the console.
153169

154170
- Propose and configure a default network interface.
155171

156172
- Enable all GPIO ports.
157173

174+
- If available, enable pinmux and interrupt controller drivers.
175+
158176
.. _setting_configuration_values:
159177

160178
Setting configuration values

0 commit comments

Comments
 (0)