From 83542ce912f902d78908eac7e0b0bb8830cb7741 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 28 Dec 2025 14:18:17 +0000 Subject: 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 <4375114+HiFiPhile@users.noreply.github.com> --- docs/getting_started.rst | 129 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 128 insertions(+), 1 deletion(-) (limited to 'docs') 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 `_ or `esp-idf `_ for Espressif targets are required; install them per vendor instructions. + Some MCU families require additional SDKs: + + * **rp2040**: Requires `pico-sdk `_ - see `Building for RP2040`_ below + * **Espressif (esp32)**: Requires `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 ---------------------- -- cgit v1.3.1 From 1bb1efa8202c0cb5e49fa3fc50c608ac03daaa71 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 28 Dec 2025 14:19:52 +0000 Subject: Use appropriate syntax highlighting for Windows commands - Changed Windows Command Prompt blocks from bash to bat for proper highlighting - Changed PowerShell blocks from bash to powershell for proper highlighting - Improves documentation readability and accuracy Co-authored-by: HiFiPhile <4375114+HiFiPhile@users.noreply.github.com> --- docs/getting_started.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'docs') diff --git a/docs/getting_started.rst b/docs/getting_started.rst index 9f558bfa4..7ab3116df 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -171,7 +171,7 @@ Install Pico SDK **Windows:** -.. code-block:: bash +.. code-block:: bat C:\> cd %USERPROFILE% C:\Users\YourName> git clone https://github.com/raspberrypi/pico-sdk.git @@ -191,13 +191,13 @@ Before running cmake, export the SDK path: **Windows (Command Prompt):** -.. code-block:: bash +.. code-block:: bat C:\> set PICO_SDK_PATH=%USERPROFILE%\pico-sdk **Windows (PowerShell):** -.. code-block:: bash +.. code-block:: powershell PS C:\> $env:PICO_SDK_PATH = "$env:USERPROFILE\pico-sdk" @@ -233,7 +233,7 @@ Install ESP-IDF **Windows:** -.. code-block:: bash +.. code-block:: bat C:\> cd %USERPROFILE% C:\Users\YourName> git clone --recursive https://github.com/espressif/esp-idf.git @@ -253,13 +253,13 @@ Before running cmake, source the ESP-IDF export script: **Windows (Command Prompt):** -.. code-block:: bash +.. code-block:: bat C:\> %USERPROFILE%\esp-idf\export.bat **Windows (PowerShell):** -.. code-block:: bash +.. code-block:: powershell PS C:\> . $env:USERPROFILE\esp-idf\export.ps1 -- cgit v1.3.1 From db08f5f3fefb91ef59526558ad79bf9d8ae84e7c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 28 Dec 2025 14:26:06 +0000 Subject: Fix trailing whitespace in getting_started.rst - Removed trailing whitespace from line 37 as detected by pre-commit check - Documentation builds successfully Co-authored-by: HiFiPhile <4375114+HiFiPhile@users.noreply.github.com> --- docs/getting_started.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/getting_started.rst b/docs/getting_started.rst index 7ab3116df..d9d81f23f 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -35,7 +35,7 @@ Get the Code .. note:: Some MCU families require additional SDKs: - + * **rp2040**: Requires `pico-sdk `_ - see `Building for RP2040`_ below * **Espressif (esp32)**: Requires `esp-idf `_ - see `Building for ESP32`_ below -- cgit v1.3.1 From 320d0f88bf7f3c8fb9e2e8c86e55051a0d0980aa Mon Sep 17 00:00:00 2001 From: hathach Date: Sat, 7 Feb 2026 21:53:51 +0700 Subject: remove sdk setup instruction for rp2040 and espressif --- docs/getting_started.rst | 130 ++--------------------------------------------- 1 file changed, 3 insertions(+), 127 deletions(-) (limited to 'docs') diff --git a/docs/getting_started.rst b/docs/getting_started.rst index d9d81f23f..b7a962d50 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -34,10 +34,10 @@ Get the Code $ python tools/get_deps.py -b stm32h743eval # or python tools/get_deps.py stm32h7 .. note:: - Some MCU families require additional SDKs: + Some MCU families require additional SDKs, please follow their instructions to install and set it up - * **rp2040**: Requires `pico-sdk `_ - see `Building for RP2040`_ below - * **Espressif (esp32)**: Requires `esp-idf `_ - see `Building for ESP32`_ below + * **rp2040**: Requires `pico-sdk `_ + * **Espressif (esp32)**: Requires `esp-idf `_ Simple Device Example --------------------- @@ -152,130 +152,6 @@ 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:: bat - - 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:: bat - - C:\> set PICO_SDK_PATH=%USERPROFILE%\pico-sdk - -**Windows (PowerShell):** - -.. code-block:: powershell - - 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:: bat - - 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:: bat - - C:\> %USERPROFILE%\esp-idf\export.bat - -**Windows (PowerShell):** - -.. code-block:: powershell - - 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 ---------------------- -- cgit v1.3.1 From e7c71fefa7576e971c6bb05c1a5bab6075bd044f Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 10 Feb 2026 11:25:46 +0700 Subject: update getting_started.rst and get_deps.py for clarity and improved dependency handling --- docs/getting_started.rst | 2 +- tools/get_deps.py | 24 +++++++----------------- 2 files changed, 8 insertions(+), 18 deletions(-) (limited to 'docs') diff --git a/docs/getting_started.rst b/docs/getting_started.rst index b7a962d50..8442305d4 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -37,7 +37,7 @@ Get the Code Some MCU families require additional SDKs, please follow their instructions to install and set it up * **rp2040**: Requires `pico-sdk `_ - * **Espressif (esp32)**: Requires `esp-idf `_ + * **Espressif (esp32)**: Requires `esp-idf `_. Only a few examples support the ESP-IDF build system. Look for ones with `src/CMakeLists.txt` that contain `idf_component_register()`, such as `cdc_msc_freertos`. Simple Device Example --------------------- diff --git a/tools/get_deps.py b/tools/get_deps.py index deacbb23b..51c2b1012 100755 --- a/tools/get_deps.py +++ b/tools/get_deps.py @@ -327,18 +327,16 @@ def main(): parser.add_argument('-b', '--board', action='append', default=[], help='Boards to fetch') parser.add_argument('-D', '--define', action='append', default=[], help='Have no effect') parser.add_argument('-f1', '--build-flags-on', action='append', default=[], help='Have no effect') - parser.add_argument('--print', action='store_true', help='Print commit hash only') args = parser.parse_args() families = args.families boards = args.board - print_only = args.print status = 0 - deps = list(deps_mandatory.keys()) + deps = [] if 'all' in families: - deps += deps_optional.keys() + deps.extend(deps_optional.keys()) else: families = list(families) if boards is not None: @@ -346,24 +344,16 @@ def main(): f = find_family(b) if f is not None: families.append(f) - for f in families: for d in deps_optional: if d not in deps and f in deps_optional[d][2].split(): deps.append(d) + if len(deps) == 0: + print('WARN: no additional dependencies found for given boards or families') - if print_only: - pvalue = {} - # print only without arguments, always add CMSIS_5 - if len(families) == 0 and len(boards) == 0: - deps.append('lib/CMSIS_5') - for d in deps: - commit = deps_all[d][1] - pvalue[d] = commit - print(pvalue) - else: - with Pool() as pool: - status = sum(pool.map(get_a_dep, deps)) + deps.extend(deps_mandatory.keys()) + with Pool() as pool: + status = sum(pool.map(get_a_dep, deps)) return status -- cgit v1.3.1