summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcopilot-swe-agent[bot] <[email protected]>2025-12-28 14:18:17 +0000
committercopilot-swe-agent[bot] <[email protected]>2025-12-28 14:18:17 +0000
commit83542ce912f902d78908eac7e0b0bb8830cb7741 (patch)
tree8dc50d8c306ef848bd055d16edfcbcd455213516
parent2dce3b8d2c4694d52281e830a8938ccf0a2c89c2 (diff)
Add detailed build instructions for rp2040 and esp32 to getting_started.rst
- Added dedicated "Building for RP2040" section with pico-sdk installation steps - Added dedicated "Building for ESP32" section with esp-idf installation steps - Included platform-specific instructions for Linux/macOS and Windows - Added PICO_SDK_PATH export steps before cmake for rp2040 - Added esp-idf source/export steps before cmake for esp32 - Updated note section to reference new detailed sections - Documentation builds successfully without errors Co-authored-by: HiFiPhile <[email protected]>
-rw-r--r--docs/getting_started.rst129
1 files changed, 128 insertions, 1 deletions
diff --git a/docs/getting_started.rst b/docs/getting_started.rst
index 0c3fcec80..9f558bfa4 100644
--- a/docs/getting_started.rst
+++ b/docs/getting_started.rst
@@ -34,7 +34,10 @@ Get the Code
$ python tools/get_deps.py -b stm32h743eval # or python tools/get_deps.py stm32h7
.. note::
- For rp2040 `pico-sdk <https://github.com/raspberrypi/pico-sdk>`_ or `esp-idf <https://github.com/espressif/esp-idf>`_ for Espressif targets are required; install them per vendor instructions.
+ Some MCU families require additional SDKs:
+
+ * **rp2040**: Requires `pico-sdk <https://github.com/raspberrypi/pico-sdk>`_ - see `Building for RP2040`_ below
+ * **Espressif (esp32)**: Requires `esp-idf <https://github.com/espressif/esp-idf>`_ - see `Building for ESP32`_ below
Simple Device Example
---------------------
@@ -149,6 +152,130 @@ A MCU can support multiple operational speed. By default, the example build syst
$ make BOARD=stm32h743eval RHPORT_DEVICE_SPEED=OPT_MODE_FULL_SPEED all
+Building for RP2040
+-------------------
+
+RP2040 boards (like Raspberry Pi Pico) require the Pico SDK to be installed and configured before building.
+
+Install Pico SDK
+^^^^^^^^^^^^^^^^
+
+**Linux/macOS:**
+
+.. code-block:: bash
+
+ $ cd ~
+ $ git clone https://github.com/raspberrypi/pico-sdk.git
+ $ cd pico-sdk
+ $ git submodule update --init
+
+**Windows:**
+
+.. code-block:: bash
+
+ C:\> cd %USERPROFILE%
+ C:\Users\YourName> git clone https://github.com/raspberrypi/pico-sdk.git
+ C:\Users\YourName> cd pico-sdk
+ C:\Users\YourName\pico-sdk> git submodule update --init
+
+Set PICO_SDK_PATH
+^^^^^^^^^^^^^^^^^
+
+Before running cmake, export the SDK path:
+
+**Linux/macOS:**
+
+.. code-block:: bash
+
+ $ export PICO_SDK_PATH=~/pico-sdk
+
+**Windows (Command Prompt):**
+
+.. code-block:: bash
+
+ C:\> set PICO_SDK_PATH=%USERPROFILE%\pico-sdk
+
+**Windows (PowerShell):**
+
+.. code-block:: bash
+
+ PS C:\> $env:PICO_SDK_PATH = "$env:USERPROFILE\pico-sdk"
+
+Build Example for RP2040
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: bash
+
+ $ cd examples/device/cdc_msc
+ $ cmake -DBOARD=raspberry_pi_pico -B build
+ $ cmake --build build
+
+.. tip::
+ Add the PICO_SDK_PATH export to your shell's profile file (e.g., ``~/.bashrc``, ``~/.zshrc``) to make it permanent.
+
+
+Building for ESP32
+------------------
+
+ESP32 boards require the ESP-IDF (Espressif IoT Development Framework) to be installed and sourced before building.
+
+Install ESP-IDF
+^^^^^^^^^^^^^^^
+
+**Linux/macOS:**
+
+.. code-block:: bash
+
+ $ cd ~
+ $ git clone --recursive https://github.com/espressif/esp-idf.git
+ $ cd esp-idf
+ $ ./install.sh all
+
+**Windows:**
+
+.. code-block:: bash
+
+ C:\> cd %USERPROFILE%
+ C:\Users\YourName> git clone --recursive https://github.com/espressif/esp-idf.git
+ C:\Users\YourName> cd esp-idf
+ C:\Users\YourName\esp-idf> install.bat all
+
+Source ESP-IDF Environment
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Before running cmake, source the ESP-IDF export script:
+
+**Linux/macOS:**
+
+.. code-block:: bash
+
+ $ source ~/esp-idf/export.sh
+
+**Windows (Command Prompt):**
+
+.. code-block:: bash
+
+ C:\> %USERPROFILE%\esp-idf\export.bat
+
+**Windows (PowerShell):**
+
+.. code-block:: bash
+
+ PS C:\> . $env:USERPROFILE\esp-idf\export.ps1
+
+Build Example for ESP32
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: bash
+
+ $ cd examples/device/cdc_msc
+ $ cmake -DBOARD=espressif_s3_devkitc -B build
+ $ cmake --build build
+
+.. tip::
+ You need to source the ESP-IDF export script in each new terminal session. Consider creating an alias in your shell's profile file for convenience.
+
+
IAR Embedded Workbench
----------------------