2014-08-09 16:31:20 +03:00
|
|
|
.. _quickstart:
|
|
|
|
|
|
|
|
Quickstart
|
|
|
|
==========
|
|
|
|
|
2014-11-07 22:14:44 +02:00
|
|
|
.. note::
|
2014-12-30 23:22:42 +02:00
|
|
|
Please read `Get Started <http://platformio.org/#!/get-started>`_
|
2014-11-07 22:14:44 +02:00
|
|
|
article from the official WebSite.
|
|
|
|
|
2014-12-29 20:22:01 +02:00
|
|
|
1. :ref:`Install PlatformIO <installation>`.
|
2014-08-09 16:31:20 +03:00
|
|
|
|
2014-12-29 20:22:01 +02:00
|
|
|
2. Find board ``type`` from :ref:`platforms` (you can choose multiple board
|
|
|
|
types).
|
2014-08-09 16:31:20 +03:00
|
|
|
|
2014-12-29 20:22:01 +02:00
|
|
|
3. Initialize new PlatformIO based project with the pre-configured
|
|
|
|
environments for your boards:
|
2014-08-09 16:31:20 +03:00
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2014-12-29 20:22:01 +02:00
|
|
|
$ platformio init --board=TYPE1 --board=TYPE2
|
2014-08-09 16:31:20 +03:00
|
|
|
|
2014-12-03 14:56:24 +02:00
|
|
|
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.
|
|
|
|
|
|
|
|
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.
|
2014-08-09 16:31:20 +03:00
|
|
|
|
2014-12-29 20:22:01 +02:00
|
|
|
More detailed information about this command is here :ref:`cmd_init`.
|
2014-08-11 12:20:08 +03:00
|
|
|
|
2014-12-29 20:22:01 +02:00
|
|
|
4. Process the project's environments.
|
2014-08-09 16:31:20 +03:00
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
$ platformio run
|
|
|
|
|
2014-12-29 20:22:01 +02:00
|
|
|
# if you don't have specified `targets = upload` option for environment,
|
|
|
|
# then you can upload firmware manually with this command:
|
2014-08-09 16:31:20 +03:00
|
|
|
$ platformio run --target upload
|
|
|
|
|
|
|
|
# clean project
|
|
|
|
$ platformio run --target clean
|
|
|
|
|
2014-12-29 20:22:01 +02:00
|
|
|
If you don't have installed required platforms, then *PlatformIO* will propose
|
|
|
|
you to install them automatically.
|
2014-08-09 16:31:20 +03:00
|
|
|
|
2014-08-12 19:29:57 +03:00
|
|
|
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>`_.
|
|
|
|
|
|
|
|
Also, for more detailed information as for commands please go to
|
|
|
|
:ref:`userguide` sections.
|