2014-08-09 16:31:20 +03:00
|
|
|
.. _cmd_init:
|
|
|
|
|
|
|
|
platformio init
|
|
|
|
===============
|
|
|
|
|
|
|
|
.. contents::
|
|
|
|
|
|
|
|
Usage
|
|
|
|
-----
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2014-11-30 18:14:18 +02:00
|
|
|
platformio init [OPTIONS]
|
2014-08-09 16:31:20 +03:00
|
|
|
|
|
|
|
|
|
|
|
Description
|
|
|
|
-----------
|
|
|
|
|
|
|
|
Initialize new PlatformIO based project.
|
|
|
|
|
|
|
|
|
|
|
|
This command will create:
|
|
|
|
|
|
|
|
* :ref:`projectconf`
|
2014-11-30 18:14:18 +02:00
|
|
|
* ``src`` - a source directory. Put your source code here
|
|
|
|
* ``lib`` - a directory for the project specific libraries. PlatformIO will
|
|
|
|
compile them to static libraries and link to executable file
|
|
|
|
|
|
|
|
Options
|
|
|
|
-------
|
|
|
|
|
|
|
|
.. option::
|
|
|
|
--project-dir, -d
|
|
|
|
|
|
|
|
Specified path to the directory where *PlatformIO* will initialize new project.
|
2014-08-09 16:31:20 +03:00
|
|
|
|
|
|
|
|
|
|
|
Examples
|
|
|
|
--------
|
|
|
|
|
2014-11-30 18:14:18 +02:00
|
|
|
1. Create new project in the current working directory
|
|
|
|
|
2014-08-09 16:31:20 +03:00
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
$ platformio init
|
2014-11-30 18:14:18 +02:00
|
|
|
The current working directory *** will be used for the new project.
|
|
|
|
You can specify another project directory via
|
2014-12-03 14:56:24 +02:00
|
|
|
`platformio init -d %PATH_TO_THE_PROJECT_DIR%` command.
|
2014-11-30 18:14:18 +02:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
2. Create new project in the specified directory
|
|
|
|
|
|
|
|
.. 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.
|