Skip to content

Commit 2acc161

Browse files
Update contrib.rst
1 parent 7322bad commit 2acc161

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

docs/contrib.rst

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ track of them when release messages are generated.
3636
Adding a New Board
3737
------------------
3838

39+
Adding a new board requires:
40+
41+
* Updated ``tools/makeboards.py`` script
42+
* Updated ``boards.txt`` file, generated by ``makeboard.py``
43+
* Updated ``package_pico_index.template.json`` file, generated by ``makeboard.py``
44+
* New ``tools/json/BOARD_NAME.json`` board file for Platform.IO
45+
* New ``variants/BOARD_NAME/pins_arduino.h`` header defining the I/O pins
46+
3947
To add a new RP2040 board you will need to update the ``tools/makeboards.py``
4048
script. Do *NOT* manually edit ``boards.txt``, that file is machine generated.
4149
You will need to add a ``MakeBoard`` call at the end of the file. Please be sure
@@ -45,10 +53,16 @@ and then the board name. Otherwise it is hard to find a specific board in the m
4553
Run ``python3 tools/makeboards.py`` to update the ``boards.txt`` file and generate
4654
a Platform.IO JSON file in the ``tools/json`` directory.
4755

56+
Create a folder called ``variants/BOARD_NAME`` and place in a ``pins_arduino.h``
57+
file in it that contains your default pin name mapping (i.e. SPI0/1 pins, UART
58+
pins, LED_DEFAULT, etc.). Copying one of the existing ones as a template can
59+
make this task much simpler.
60+
4861
In your ``git commit`` be sure to add the newly generated ``tools/json/XXX.json``
49-
file as well as the modified ``makeboards`` script and ``boards.txt`` and the
50-
Arduino packaging JSON ``package/package_pico_index.template.json``. You should
51-
also add a note in the ``README.md`` file listing your new board.
62+
file as well as the modified ``makeboards`` script and ``boards.txt``, the new
63+
``pins_arduino.h`` header you generated, and the Arduino packaging JSON
64+
``package/package_pico_index.template.json``. You should also add a note in
65+
the ``README.md`` file listing your new board.
5266

5367
Submit the updated commit as a PR and, if all goes well, your board will be in
5468
on the next core release.

0 commit comments

Comments
 (0)