Files
platformio-core/docs/quickstart.rst

65 lines
2.3 KiB
ReStructuredText
Raw Normal View History

2014-08-09 16:31:20 +03:00
.. _quickstart:
2015-01-02 17:18:32 +02:00
Quickstart
2014-08-09 16:31:20 +03:00
==========
2014-11-07 22:14:44 +02:00
.. note::
Please read `Get Started <http://platformio.org/#!/get-started>`_
2014-11-07 22:14:44 +02:00
article from the official WebSite.
1. :ref:`Install PlatformIO <installation>`.
2014-08-09 16:31:20 +03:00
2. Find board ``type`` on this :ref:`Embedded Boards <platforms>` page or
via :ref:`cmd_boards` command.
2014-08-09 16:31:20 +03:00
2015-01-08 20:12:42 +02:00
3. Initialize new PlatformIO based project via :ref:`cmd_init` command with the
pre-configured environments for your boards:
2014-08-09 16:31:20 +03:00
.. code-block:: bash
$ platformio init --board=TYPE_1 --board=TYPE_2 --board=TYPE_N
2014-08-09 16:31:20 +03:00
Would you like to enable firmware auto-uploading when project is successfully built using `platformio run` command?
Don't forget that you can upload firmware manually using `platformio run --target upload` command. [y/N]: y
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. |-> PLEASE EDIT ME <-|
src - Put your source code here
lib - Put here project specific or 3-rd party libraries
2014-12-03 14:56:24 +02:00
Do you want to continue? [y/N]: y
Project has been successfully initialized!
Useful commands:
`platformio run` - process/build project from the current directory
`platformio run --target upload` or `platformio run -t upload` - upload firmware to embedded board
`platformio run --target clean` - clean project (remove compiled files)
2014-08-09 16:31:20 +03:00
2015-01-08 20:12:42 +02:00
Put your source code ``*.h, *.c, *.cpp or *.ino`` files to ``src`` directory.
4. Process the project's environments.
2014-08-09 16:31:20 +03:00
2015-01-08 20:12:42 +02:00
Change working directory to the project's root where is located
:ref:`Project Configuration File (platformio.ini) <projectconf>` and run:
2014-08-09 16:31:20 +03:00
.. code-block:: bash
$ platformio run
# 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
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
Further examples can be found in `PlatformIO Repository <https://github.com/platformio/platformio/tree/develop/examples>`_.
2014-08-12 19:29:57 +03:00
Also, for more detailed information as for commands please go to
:ref:`userguide` sections.