Allow to initialise project with the specified embedded boards // Resolve #21

This commit is contained in:
Ivan Kravets committed 2014-12-29 20:22:01 +02:00
1 parent 82744afe58
commit af191834d1
7 files changed
+112 -40

No files matched your search

+6
View File
@@ -58,18 +58,24 @@ For example, ``[env:hello_world]``.
Options
~~~~~~~
.. _projectconf_env_platform:
``platform``
^^^^^^^^^^^^
:ref:`Platform <platforms>` type
.. _projectconf_env_framework:
``framework``
^^^^^^^^^^^^^
See ``framework`` type in *Frameworks* section of :ref:`platforms`
.. _projectconf_env_board:
``board``
^^^^^^^^^
+13 -34
View File
@@ -7,33 +7,18 @@ Quickstart
Please read `Get Started <http://platformio.ikravets.com/#!/get-started>`_
article from the official WebSite.
First, :ref:`Install PlatformIO <installation>`.
1. :ref:`Install PlatformIO <installation>`.
Print all available development platforms for installing
2. Find board ``type`` from :ref:`platforms` (you can choose multiple board
types).
3. Initialize new PlatformIO based project with the pre-configured
environments for your boards:
.. code-block:: bash
$ platformio search
[ ... ]
$ platformio init --board=TYPE1 --board=TYPE2
Install new development platform
.. code-block:: bash
$ platformio install PLATFORM
Downloading [####################################] 100%
Unpacking [####################################] 100%
Installing .....
[ ... ]
The platform 'PLATFORM' has been successfully installed!
Initialize new PlatformIO based project
.. code-block:: bash
$ platformio init
The current working directory *** will be used for the new project.
You can specify another project directory via
`platformio init -d %PATH_TO_THE_PROJECT_DIR%` command.
@@ -46,29 +31,23 @@ Initialize new PlatformIO based project
Project has been successfully initialized!
Now you can process it with `platformio run` command.
More detailed information about this command is here :ref:`cmd_init`.
Setup environments in ``platformio.ini``. For more examples go to
:ref:`Project Configuration File <projectconf_examples>`
.. code-block:: ini
# Simple and base environment
[env:mybaseenv]
platform = %INSTALLED_PLATFORM_NAME_HERE%
Process the project's environments
4. Process the project's environments.
.. code-block:: bash
$ platformio run
# if embedded project then upload firmware
# if you don't have specified `targets = upload` option for environment,
# then you can upload firmware manually with this command:
$ platformio run --target upload
# clean project
$ platformio run --target clean
If you don't have installed required platforms, then *PlatformIO* will propose
you to install them automatically.
Further examples can be found in the ``examples/`` directory in the source
distribution or `on the web <https://github.com/ivankravets/platformio/tree/develop/examples>`_.
+36 -1
View File
@@ -32,8 +32,27 @@ Options
.. option::
--project-dir, -d
Specified path to the directory where *PlatformIO* will initialize new project.
A path to the directory where *PlatformIO* will initialise new project.
.. option::
--board, -b
If you specify board ``type`` (you can pass multiple ``--board`` options), then
*PlatformIO* will automatically generate environment for :ref:`projectconf` and
pre-fill these data:
* :ref:`projectconf_env_platform`
* :ref:`projectconf_env_framework`
* :ref:`projectconf_env_board`
The full list with pre-configured boards is available here :ref:`platforms`.
.. option::
--disable-auto-uploading
If you initialise project with the specified ``--board``, then *PlatformIO*
will create environment with enabled firmware auto-uploading. This option
allows you to disable firmware auto-uploading by default.
Examples
--------
@@ -43,6 +62,7 @@ Examples
.. code-block:: bash
$ platformio init
The current working directory *** will be used for the new project.
You can specify another project directory via
`platformio init -d %PATH_TO_THE_PROJECT_DIR%` command.
@@ -61,6 +81,21 @@ Examples
.. code-block:: bash
$ platformio init -d %PATH_TO_DIR%
The next files/directories will be created in ***
platformio.ini - Project Configuration File
src - a source directory. Put your source code here
lib - a directory for the project specific libraries
Do you want to continue? [y/N]: y
Project has been successfully initialized!
Now you can process it with `platformio run` command.
3. Initialise project for Arduino Uno
.. code-block:: bash
$ platformio init --board uno
The next files/directories will be created in ***
platformio.ini - Project Configuration File
src - a source directory. Put your source code here