diff --git a/HISTORY.rst b/HISTORY.rst index 956299da..da5f0581 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -6,6 +6,7 @@ Release History * Integrate PlatformIO with `Circle CI `_ and `Shippable CI `_ +* Described in documentation how to `create/register own board `_ for PlatformIO * Disabled "nano.specs" for ARM-based platforms (`issue #219 `_) * Fixed "ConnectionError" when PlatformIO SF Storage is off-line diff --git a/docs/platforms/creating_board.rst b/docs/platforms/creating_board.rst new file mode 100644 index 00000000..76c5ed2e --- /dev/null +++ b/docs/platforms/creating_board.rst @@ -0,0 +1,62 @@ +.. _board_creating: + +Creating Board +============== + +*PlatformIO* has pre-built settings for the most popular embedded boards. This +list is available: + +* `Embedded Boards Explorer `_ (Web) +* :ref:`cmd_boards` (CLI command) + +Nevertheless, PlatformIO allows to create own board or override existing +board's settings. All data is declared using +`JSON-style `_ via +`associative array `_ +(name/value pairs). + +.. contents:: + +JSON Structure +-------------- + +The key fields: + +* ``build`` data will be used by :ref:`Platforms ` and + :ref:`frameworks` builders +* ``frameworks`` is the list with supported :ref:`frameworks` +* ``platform`` main type of :ref:`Platforms ` +* ``upload`` upload settings which depend on the ``platform`` + +.. code-block:: json + + { + "myboard": { + "build": {}, + "frameworks": ["%LIST_WITH_SUPPORTED_FRAMEWORKS%"], + "name": "My test board", + "platform": "%PLATFORM_TYPE_HERE%", + "upload": {}, + "url": "http://example.com", + "vendor": "My Company Ltd." + } + } + +Installation +------------ + +1. Create ``boards`` directory in :ref:`projectconf_pio_home_dir` if it + doesn't exist. +2. Create ``my_own_boards.json`` file and put to ``boards`` directory. +3. Search available boards via :ref:`cmd_boards` command. You should see + ``myboard`` board. + +Now, you can use ``myboard`` for the :ref:`projectconf_env_board` option in +:ref:`projectconf`. + + +Examples +-------- + +For the examples, please look into built-in ``*.json`` files with boards +settings: https://github.com/platformio/platformio/tree/develop/platformio/boards. diff --git a/docs/platforms/creating_platform.rst b/docs/platforms/creating_platform.rst index 656c6497..3497fe88 100644 --- a/docs/platforms/creating_platform.rst +++ b/docs/platforms/creating_platform.rst @@ -292,7 +292,7 @@ Installation ------------ 1. Create ``platforms`` directory in :ref:`projectconf_pio_home_dir` if it - doesn't exists. + doesn't exist. 2. Copy ``test.py`` and ``test-builder.py`` files to ``platforms`` directory. 3. Search available platforms via :ref:`cmd_platforms_search` command. You should see ``test`` platform. diff --git a/docs/platforms/index.rst b/docs/platforms/index.rst index 00ec1e6e..1505e4d1 100644 --- a/docs/platforms/index.rst +++ b/docs/platforms/index.rst @@ -25,3 +25,4 @@ MCU, upload protocol or etc. Please use ``board`` option. timsp430 titiva creating_platform + creating_board