docs: fix getting started having 2 toctrees

Instead of having 2 toctrees for setup and build your first project parts, use os-specific refs for the build your first project part
This commit is contained in:
Djordje Nedic
2022-04-15 16:26:21 +02:00
committed by Djordje Nedic
parent eef5e73842
commit 5250ca1627
12 changed files with 321 additions and 224 deletions
+5 -11
View File
@@ -142,8 +142,8 @@ IDE
.. toctree::
:maxdepth: 1
Eclipse Plugin <../get-started/eclipse-setup>
VSCode Extension <../get-started/vscode-setup>
Eclipse Plugin <eclipse-setup>
VSCode Extension <vscode-setup>
Manual Installation
~~~~~~~~~~~~~~~~~~~
@@ -153,18 +153,12 @@ For the manual procedure, please select according to your operating system.
.. toctree::
:maxdepth: 1
Windows Installer <../get-started/windows-setup>
Linux and macOS <../get-started/linux-macos-setup>
Windows Installer <windows-setup>
Linux and macOS <linux-macos-setup>
Build Your First Project
========================
If you already have the ESP-IDF installed and not using IDE, you can build your first project from the command line following :ref:`get-started-first-steps`.
.. toctree::
:hidden:
Windows <windows-setup>
Manual <linux-macos-setup>
If you already have the ESP-IDF installed and not using IDE, you can build your first project from the command line following the :ref:`Start a Project on Windows <get-started-windows-first-steps>` or :ref:`Start a Project on Linux and macOS<get-started-linux-macos-first-steps>`.
.. _Stable version: https://docs.espressif.com/projects/esp-idf/en/stable/
+2 -1
View File
@@ -229,11 +229,12 @@ Technically, you can add ``export.sh`` to your shell's profile directly; however
.. _get-started-build:
.. _get-started-configure:
.. _get-started-connect:
.. _get-started-first-steps:
.. _get-started-linux-macos-first-steps:
Step 5. First Steps on ESP-IDF
==============================
.. include:: linux-macos-start-project.rst
.. include:: start-project.rst
Tip: Updating ESP-IDF
@@ -0,0 +1,75 @@
Now you have all requirements met, the next topic will guide you on how to start your first project.
This guide will help you on the first steps using ESP-IDF. Follow this guide to start a new project on the {IDF_TARGET_NAME} and build, flash, and monitor the device output.
.. note::
If you haven't yet installed the ESP-IDF, please go to :ref:`get-started-step-by-step` and follow the instruction in oder to get all the software needed to use this guide.
Start a Project
===================
Now you are ready to prepare your application for {IDF_TARGET_NAME}. You can start with :example:`get-started/hello_world` project from :idf:`examples` directory in IDF.
.. important::
The ESP-IDF build system does not support spaces in the paths to either ESP-IDF or to projects.
Copy the project :example:`get-started/hello_world` to ``~/esp`` directory:
.. code-block:: bash
cd ~/esp
cp -r $IDF_PATH/examples/get-started/hello_world .
.. note:: There is a range of example projects in the :idf:`examples` directory in ESP-IDF. You can copy any project in the same way as presented above and run it. It is also possible to build examples in-place, without copying them first.
Connect Your Device
===================
Now connect your {IDF_TARGET_NAME} board to the computer and check under what serial port the board is visible.
Serial ports have the following patterns in their names:
- **Linux**: starting with ``/dev/tty``
- **macOS**: starting with ``/dev/cu.``
If you are not sure how to check the serial port name, please refer to :doc:`establish-serial-connection` for full details.
.. note::
Keep the port name handy as you will need it in the next steps.
Configure your Project
======================
Navigate to your ``hello_world`` directory, set {IDF_TARGET_NAME} chip as the target and run the project configuration utility ``menuconfig``.
.. code-block:: bash
cd ~/esp/hello_world
idf.py set-target {IDF_TARGET_PATH_NAME}
idf.py menuconfig
Setting the target with ``idf.py set-target {IDF_TARGET_PATH_NAME}`` should be done once after opening a new project. If the project contains some existing builds and configurations, they will be cleared and initialized. The target may be saved in the environment variable to skip this step at all. See :ref:`selecting-idf-target` for additional information.
If the previous steps have been done correctly, the following menu appears:
.. figure:: ../../_static/project-configuration.png
:align: center
:alt: Project configuration - Home window
:figclass: align-center
Project configuration - Home window
You are using this menu to set up project specific variables, e.g. Wi-Fi network name and password, the processor speed, etc. Setting up the project with menuconfig may be skipped for "hello_word". This example will run with default configuration.
.. only:: esp32
.. attention::
If you use ESP32-DevKitC board with the **ESP32-SOLO-1** module, or ESP32-DevKitM-1 board with the **ESP32-MIN1-1(1U)** module, enable single core mode (:ref:`CONFIG_FREERTOS_UNICORE`) in menuconfig before flashing examples.
.. note::
The colors of the menu could be different in your terminal. You can change the appearance with the option ``--style``. Please run ``idf.py menuconfig --help`` for further information.
-100
View File
@@ -4,106 +4,6 @@
{IDF_TARGET_HEAP_SIZE:default="298968", esp32="298968", esp32s2="253900", esp32s3="390684", esp32c3="337332"}
Now you have all requirements met, the next topic will guide you on how to start your first project.
This guide will help you on the first steps using ESP-IDF. Follow this guide to start a new project on the {IDF_TARGET_NAME} and build, flash, and monitor the device output.
.. note::
If you haven't yet installed the ESP-IDF, please go to :ref:`get-started-step-by-step` and follow the instruction in oder to get all the software needed to use this guide.
Start a Project
===================
Now you are ready to prepare your application for {IDF_TARGET_NAME}. You can start with :example:`get-started/hello_world` project from :idf:`examples` directory in IDF.
.. important::
The ESP-IDF build system does not support spaces in the paths to either ESP-IDF or to projects.
Copy the project :example:`get-started/hello_world` to ``~/esp`` directory:
Windows
~~~~~~~
.. code-block:: batch
cd %userprofile%\esp
xcopy /e /i %IDF_PATH%\examples\get-started\hello_world hello_world
Linux/macOS
~~~~~~~~~~~
.. code-block:: bash
cd ~/esp
cp -r $IDF_PATH/examples/get-started/hello_world .
.. note:: There is a range of example projects in the :idf:`examples` directory in ESP-IDF. You can copy any project in the same way as presented above and run it. It is also possible to build examples in-place, without copying them first.
Connect Your Device
===================
Now connect your {IDF_TARGET_NAME} board to the computer and check under what serial port the board is visible.
Serial ports have the following patterns in their names:
- **Windows**: names like ``COM1``
- **Linux**: starting with ``/dev/tty``
- **macOS**: starting with ``/dev/cu.``
If you are not sure how to check the serial port name, please refer to :doc:`establish-serial-connection` for full details.
.. note::
Keep the port name handy as you will need it in the next steps.
Configure your Project
======================
Navigate to your ``hello_world`` directory, set {IDF_TARGET_NAME} chip as the target and run the project configuration utility ``menuconfig``.
Windows
~~~~~~~
.. code-block:: batch
cd %userprofile%\esp\hello_world
idf.py set-target {IDF_TARGET_PATH_NAME}
idf.py menuconfig
Linux/macOS
~~~~~~~~~~~
.. code-block:: bash
cd ~/esp/hello_world
idf.py set-target {IDF_TARGET_PATH_NAME}
idf.py menuconfig
Setting the target with ``idf.py set-target {IDF_TARGET_PATH_NAME}`` should be done once after opening a new project. If the project contains some existing builds and configurations, they will be cleared and initialized. The target may be saved in the environment variable to skip this step at all. See :ref:`selecting-idf-target` for additional information.
If the previous steps have been done correctly, the following menu appears:
.. figure:: ../../_static/project-configuration.png
:align: center
:alt: Project configuration - Home window
:figclass: align-center
Project configuration - Home window
You are using this menu to set up project specific variables, e.g. Wi-Fi network name and password, the processor speed, etc. Setting up the project with menuconfig may be skipped for "hello_word". This example will run with default configuration.
.. only:: esp32
.. attention::
If you use ESP32-DevKitC board with the **ESP32-SOLO-1** module, or ESP32-DevKitM-1 board with the **ESP32-MIN1-1(1U)** module, enable single core mode (:ref:`CONFIG_FREERTOS_UNICORE`) in menuconfig before flashing examples.
.. note::
The colors of the menu could be different in your terminal. You can change the appearance with the option ``--style``. Please run ``idf.py menuconfig --help`` for further information.
Build the Project
=================
+3
View File
@@ -109,6 +109,9 @@ Note that this shortcut is specific to the ESP-IDF directory selected in the ESP
First Steps on ESP-IDF
======================
.. _get-started-windows-first-steps:
.. include:: windows-start-project.rst
.. include:: start-project.rst
Related Documents
@@ -0,0 +1,75 @@
Now you have all requirements met, the next topic will guide you on how to start your first project.
This guide will help you on the first steps using ESP-IDF. Follow this guide to start a new project on the {IDF_TARGET_NAME} and build, flash, and monitor the device output.
.. note::
If you haven't yet installed the ESP-IDF, please go to :ref:`get-started-step-by-step` and follow the instruction in oder to get all the software needed to use this guide.
Start a Project
===================
Now you are ready to prepare your application for {IDF_TARGET_NAME}. You can start with :example:`get-started/hello_world` project from :idf:`examples` directory in IDF.
.. important::
The ESP-IDF build system does not support spaces in the paths to either ESP-IDF or to projects.
Copy the project :example:`get-started/hello_world` to ``~/esp`` directory:
.. code-block:: batch
cd %userprofile%\esp
xcopy /e /i %IDF_PATH%\examples\get-started\hello_world hello_world
.. note:: There is a range of example projects in the :idf:`examples` directory in ESP-IDF. You can copy any project in the same way as presented above and run it. It is also possible to build examples in-place, without copying them first.
Connect Your Device
===================
Now connect your {IDF_TARGET_NAME} board to the computer and check under what serial port the board is visible.
Serial ports start with COM in Windows.
If you are not sure how to check the serial port name, please refer to :doc:`establish-serial-connection` for full details.
.. note::
Keep the port name handy as you will need it in the next steps.
Configure your Project
======================
Navigate to your ``hello_world`` directory, set {IDF_TARGET_NAME} chip as the target and run the project configuration utility ``menuconfig``.
Windows
~~~~~~~
.. code-block:: batch
cd %userprofile%\esp\hello_world
idf.py set-target {IDF_TARGET_PATH_NAME}
idf.py menuconfig
Setting the target with ``idf.py set-target {IDF_TARGET_PATH_NAME}`` should be done once after opening a new project. If the project contains some existing builds and configurations, they will be cleared and initialized. The target may be saved in the environment variable to skip this step at all. See :ref:`selecting-idf-target` for additional information.
If the previous steps have been done correctly, the following menu appears:
.. figure:: ../../_static/project-configuration.png
:align: center
:alt: Project configuration - Home window
:figclass: align-center
Project configuration - Home window
You are using this menu to set up project specific variables, e.g. Wi-Fi network name and password, the processor speed, etc. Setting up the project with menuconfig may be skipped for "hello_word". This example will run with default configuration.
.. only:: esp32
.. attention::
If you use ESP32-DevKitC board with the **ESP32-SOLO-1** module, or ESP32-DevKitM-1 board with the **ESP32-MIN1-1(1U)** module, enable single core mode (:ref:`CONFIG_FREERTOS_UNICORE`) in menuconfig before flashing examples.
.. note::
The colors of the menu could be different in your terminal. You can change the appearance with the option ``--style``. Please run ``idf.py menuconfig --help`` for further information.