<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="https://nodewaveblog.vercel.app/feed.xsl"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="https://search.yahoo.com/mrss/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
          <atom:link href="https://nodewaveblog.vercel.app/tags/esp32/rss.xml" rel="self" type="application/rss+xml" />
        <atom:link href="https://nodewaveblog.vercel.app/tags/rss.xml" rel="up" type="application/rss+xml" title="Tags Directory Feed" />
        <atom:link href="https://nodewaveblog.vercel.app/rss.xml" rel="up" type="application/rss+xml" title="Master Root Feed" />
        <title>NodeWave — Tag: #esp32</title>
        <link>https://nodewaveblog.vercel.app/</link>
        <description>RSS feed for articles and development logs tagged under #esp32 on NodeWave.</description>
        <lastBuildDate>Tue, 01 Dec 2026 21:31:09 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>Nodewave RSS Engine</generator>
        <language>en</language>
        <image>
            <title>NodeWave — Tag: #esp32</title>
            <url>https://nodewaveblog.vercel.app/logo.png</url>
            <link>https://nodewaveblog.vercel.app/</link>
        </image>
        <copyright>Copyright © 2026 NodeWave. All rights reserved.</copyright>
        <item>
            <title><![CDATA[Setting Up a PlatformIO Project with ESP-IDF - step-by-step Guide]]></title>
            <link>https://nodewaveblog.vercel.app/blogs/platformio-esp-idf-setup</link>
            <guid isPermaLink="false">https://nodewaveblog.vercel.app/blogs/platformio-esp-idf-setup</guid>
            <pubDate>Mon, 29 Jun 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Learn how to correctly scaffold, configure, and initialize an Espressif ESP-IDF project inside PlatformIO using both CLI tools and VS Code.]]></description>
            <content:encoded><![CDATA[<p>Microcontroller development moves fast. While the Arduino framework is great for rapid prototyping, production-grade hardware engineering often requires the raw optimization, power management features, and real-time operating system (FreeRTOS) integration native to Espressif’s official <strong>ESP-IDF</strong> (Espressif IoT Development Framework).</p><p>Managing toolchains directly inside ESP-IDF can be complex. This guide details how to build an isolated, reproducible development environment using <strong>PlatformIO</strong> to scaffold a project named <code>learn-gsm-esp32-dev</code>.</p><hr /><h2 id="choosing-your-scaffolding-workflow">Choosing Your Scaffolding Workflow</h2><p>PlatformIO offers two separate pathways to initialize a new runtime: an automated command-line tool or an integrated graphical user interface (GUI) inside Visual Studio Code. Both paths yield identical configuration structures.</p><h3 id="option-a-the-rapid-cli-initialization">Option A: The Rapid CLI Initialization</h3><p>For developers working directly inside standard shells or automated scripting workflows, the PlatformIO Core CLI is the fastest tool available.</p><p>Execute this single string to build the folder structure, enter the directory, and invoke the scaffolding engine:</p><pre class="language-bash shiki shiki-themes material-theme-lighter github-light github-dark" style=""><code><span class="line" line="1"><span class="sbgvK">mkdir</span><span class="s_sjI"> learn-gsm-esp32-dev</span><span class="sP7_E"> &amp;&amp;</span><span class="sptTA"> cd</span><span class="s_sjI"> learn-gsm-esp32-dev</span><span class="sP7_E"> &amp;&amp;</span><span class="sbgvK"> pio</span><span class="s_sjI"> project</span><span class="s_sjI"> init</span><span class="stzsN"> --board</span><span class="s_sjI"> esp32dev</span><span class="stzsN"> --project-option</span><span class="sjJ54"> &quot;</span><span class="s_sjI">framework=espidf</span><span class="sjJ54">&quot;
</span></span></code></pre><h3 id="option-b-the-vs-code-visual-wizard">Option B: The VS Code Visual Wizard</h3><p>If you prefer visual management tools within your IDE, follow these manual configuration steps:</p><ol><li>Open <strong>VS Code</strong>.</li><li>Click the <strong>PlatformIO Alien Head icon</strong> on your primary sidebar activity deck.</li><li>Locate the <strong>Quick Access</strong> panel and click <strong>PIO Home</strong> -&gt; <strong>Open</strong>.</li><li>Click the <strong>New Project</strong> button on the central control page.</li><li>Provide your project metrics within the wizard form:
<ul><li><strong>Name:</strong> <code>learn-gsm-esp32-dev</code></li><li><strong>Board:</strong> Select <code>Espressif ESP32 Dev Module</code></li><li><strong>Framework:</strong> Select <code>Espressif IoT Development Framework</code></li></ul></li><li>Click <strong>Finish</strong> to pull down necessary core compiler tools and create the space.</li></ol><h2 id="navigating-the-component-file-structure">Navigating the Component File Structure</h2><p>ESP-IDF relies heavily on a rigid configuration structure orchestrated by CMake compilation rules. Unlike traditional flat Arduino sketch structures, your initialized directory needs to mirror this system layout layout:</p><pre class="language-text"><code>learn-gsm-esp32-dev/
├── include/
│   └── README
├── src/
│   ├── CMakeLists.txt
│   └── main.c
├── platformio.ini
└── CMakeLists.txt
</code></pre><hr /><h2 id="configuring-the-system-manifest-files">Configuring the System Manifest Files</h2><p>To make sure your project compiles perfectly on your hardware target, overwrite your file structures using the standard boilerplate snippets below.</p><h3 id="_1-the-global-environment-manifest-platformioini">1. The Global Environment Manifest (<code>platformio.ini</code>)</h3><p>This root-level configuration defines how PlatformIO sets up its internal compilation pipelines, monitors outputs, and manages hardware flash targets.</p><pre class="language-ini shiki shiki-themes material-theme-lighter github-light github-dark" style=""><code><span class="line" line="1"><span>[env:esp32dev]
</span></span><span class="line" line="2"><span>platform = espressif32
</span></span><span class="line" line="3"><span>board = esp32dev
</span></span><span class="line" line="4"><span>framework = espidf
</span></span><span class="line" line="5"><span>monitor_speed = 115200
</span></span></code></pre><h3 id="_2-root-build-instructions-cmakeliststxt">2. Root Build Instructions (<code>CMakeLists.txt</code>)</h3><p>This tells the base system build wrapper to locate your current ESP-IDF installation directory and load the required platform tools.</p><pre class="language-cmake shiki shiki-themes material-theme-lighter github-light github-dark" style=""><code><span class="line" line="1"><span>cmake_minimum_required(VERSION 3.16.0)
</span></span><span class="line" line="2"><span>include(\$ENV{IDF_PATH}/tools/cmake/project.cmake)
</span></span><span class="line" line="3"><span>project(learn-gsm-esp32-dev)
</span></span></code></pre><h3 id="_3-component-build-targets-srccmakeliststxt">3. Component Build Targets (<code>src/CMakeLists.txt</code>)</h3><p>ESP-IDF views project folders as a series of modular items. This file registers your local code blocks as active targets for inclusion during compiler execution passes.</p><pre class="language-cmake shiki shiki-themes material-theme-lighter github-light github-dark" style=""><code><span class="line" line="1"><span>idf_component_register(SRCS &quot;main.c&quot;
</span></span><span class="line" line="2"><span>                    INCLUDE_DIRS &quot;.&quot;)
</span></span></code></pre><h3 id="_4-hardware-boilerplate-logic-srcmainc">4. Hardware Boilerplate Logic (<code>src/main.c</code>)</h3><p>Unlike ordinary code loops, ESP-IDF relies directly on a non-returning execution target called <code>app_main</code>. This code implements simple periodic console logs using the native multitasking utility engine FreeRTOS.</p><pre class="language-c shiki shiki-themes material-theme-lighter github-light github-dark" style=""><code><span class="line" line="1"><span>#include &lt;stdio.h&gt;
</span></span><span class="line" line="2"><span>#include &quot;freertos/FreeRTOS.h&quot;
</span></span><span class="line" line="3"><span>#include &quot;freertos/task.h&quot;
</span></span><span class="line" line="4"><span>#include &quot;esp_log.h&quot;
</span></span><span class="line" line="5"><span emptyLinePlaceholder>
</span></span><span class="line" line="6"><span>static const char *TAG = &quot;MAIN&quot;;
</span></span><span class="line" line="7"><span emptyLinePlaceholder>
</span></span><span class="line" line="8"><span>void app_main(void)
</span></span><span class="line" line="9"><span>{
</span></span><span class="line" line="10"><span>    ESP_LOGI(TAG, &quot;GSM ESP32 Project Initialized&quot;);
</span></span><span class="line" line="11"><span emptyLinePlaceholder>
</span></span><span class="line" line="12"><span>    while (1) {
</span></span><span class="line" line="13"><span>        ESP_LOGI(TAG, &quot;Hello World from GSM Dev Board!&quot;);
</span></span><span class="line" line="14"><span>        vTaskDelay(pd_TO_TICKS(2000));
</span></span><span class="line" line="15"><span>    }
</span></span><span class="line" line="16"><span>}
</span></span></code></pre><h2 id="compiling-and-running-code-on-your-device">Compiling and Running Code on Your Device</h2><p>With the project successfully configured, you can use these shortcuts to build and upload your code:</p><ul><li><strong>Compile the Binaries:</strong> Hit <code>Ctrl + Alt + B</code> (Windows/Linux) or <code>Cmd + Option + B</code> (macOS).</li><li><strong>Flash &amp; Open Logging Monitor:</strong> Press <code>Ctrl + Alt + T</code> to open your terminal menu shell, then select the <strong>Upload and Monitor</strong> task option.</li></ul><p>Your terminal tool will begin tracking lines of standard serial log messages coming straight from your physical ESP32 device every two seconds.</p>]]></content:encoded>
            <author>yebei@nodewave.net (Gideon Yebei)</author>
            <category domain="https://nodewaveblog.vercel.app/categories/iot">iot</category>
            <category domain="https://nodewaveblog.vercel.app/tags/esp32">ESP32</category>
            <category domain="https://nodewaveblog.vercel.app/tags/platformio">PlatformIO</category>
            <category domain="https://nodewaveblog.vercel.app/tags/esp-idf">ESP-IDF</category>
            <enclosure url="https://nodewaveblog.vercel.app/blogs/posts/platformio-esp-idf-setup/cover.png" length="0" type="image/png"/>
        </item>
        <item>
            <title><![CDATA[Getting Started with ESP32 - A Comprehensive Guide to Installing ESP-IDF on Ubuntu]]></title>
            <link>https://nodewaveblog.vercel.app/blogs/esp-idf-ubuntu-setup</link>
            <guid isPermaLink="false">https://nodewaveblog.vercel.app/blogs/esp-idf-ubuntu-setup</guid>
            <pubDate>Mon, 29 Jun 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Master the complete installation workflow for Espressif SoCs on Ubuntu. Learn to configure dependencies, purge line-ending bugs, compile firmware, and manage ports.]]></description>
            <content:encoded><![CDATA[<p>Setting up an embedded development ecosystem on Linux shouldn&apos;t feel like guesswork. While Espressif&apos;s IoT Development Framework (ESP-IDF) provides massive flexibility for targeting microcontrollers like the standard ESP32, ESP32-S3, or ESP32-C3, configuring the native tools requires a precise sequence of system dependency curation and shell workspace preparation.</p><p>This comprehensive guide details the absolute path to setting up a production-ready ESP-IDF development environment natively on an Ubuntu system, including fixes for line endings (CRLF), peripheral port configurations, and shell environment persistence.</p><h2 id="preparing-host-tools-and-dependencies">Preparing Host Tools and Dependencies</h2><p>The ESP-IDF toolchain requires specific host utility packages—ranging from build engines like CMake and Ninja to cross-compilation system modules. Update your internal package paths first using the <a href="https://ubuntu.com/server/docs/package-management" rel="nofollow">Advanced Package Tool (APT)</a>:</p><h3 id="refresh-system-software-index-repositories">Refresh system software index repositories</h3><pre class="language-bash shiki shiki-themes material-theme-lighter github-light github-dark" style=""><code><span class="line" line="1"><span class="sbgvK">sudo</span><span class="s_sjI"> apt</span><span class="s_sjI"> update
</span></span></code></pre><h3 id="install-required-build-tools-python-environments-and-underlying-usb-port-managers">Install required build tools, Python environments, and underlying USB port managers</h3><pre class="language-bash shiki shiki-themes material-theme-lighter github-light github-dark" style=""><code><span class="line" line="1"><span class="sbgvK">sudo</span><span class="s_sjI"> apt</span><span class="s_sjI"> install</span><span class="stzsN"> -y</span><span class="s_sjI"> git</span><span class="s_sjI"> wget</span><span class="s_sjI"> flex</span><span class="s_sjI"> bison</span><span class="s_sjI"> gperf</span><span class="s_sjI"> python3</span><span class="s_sjI"> python3-pip</span><span class="s_sjI"> python3-venv</span><span class="s_hVV"> \
</span></span><span class="line" line="2"><span class="su5hD">cmake </span><span class="s_sjI">ninja-build</span><span class="s_sjI"> ccache</span><span class="s_sjI"> libffi-dev</span><span class="s_sjI"> libssl-dev</span><span class="s_sjI"> dfu-util</span><span class="s_sjI"> libusb-1.0-0</span><span class="s_sjI"> dos2unix
</span></span></code></pre><p>Ensure your Python installation is functional before proceeding:</p><pre class="language-bash shiki shiki-themes material-theme-lighter github-light github-dark" style=""><code><span class="line" line="1"><span class="sbgvK">python3</span><span class="stzsN"> --version
</span></span></code></pre><h2 id="cloning-the-target-code-repository">Cloning the Target Code Repository</h2><p>Create a structured development folder inside your user home directory to house the framework workspace. To keep things highly compatible across active projects, clone the repository while explicitly retaining structural submodules:</p><h3 id="form-the-core-directory-path">Form the core directory path</h3><pre class="language-bash shiki shiki-themes material-theme-lighter github-light github-dark" style=""><code><span class="line" line="1"><span class="sbgvK">mkdir</span><span class="stzsN"> -p</span><span class="s_sjI"> ~/esp
</span></span><span class="line" line="2"><span class="sptTA">cd</span><span class="s_sjI"> ~/esp
</span></span></code></pre><h3 id="clone-the-main-repository-framework-into-a-local-folder-named-espidf">Clone the main repository framework into a local folder named espidf</h3><pre class="language-bash shiki shiki-themes material-theme-lighter github-light github-dark" style=""><code><span class="line" line="1"><span class="sbgvK">git</span><span class="s_sjI"> clone</span><span class="stzsN"> --recursive</span><span class="s_sjI"> https://github.com/espressif/esp-idf.git</span><span class="s_sjI"> espidf
</span></span></code></pre><h3 id="the-broken-submodule-catch-all">The Broken Submodule Catch-All</h3><p>If you previously pulled down the project files but skipped the submodule dependencies during initialization, your local repository tree will sit in an incomplete state. Repair it instantly by running:</p><pre class="language-bash shiki shiki-themes material-theme-lighter github-light github-dark" style=""><code><span class="line" line="1"><span class="sptTA">cd</span><span class="s_sjI"> ~/esp/espidf
</span></span><span class="line" line="2"><span class="sbgvK">git</span><span class="s_sjI"> submodule</span><span class="s_sjI"> update</span><span class="stzsN"> --init</span><span class="stzsN"> --recursive
</span></span></code></pre><h3 id="purging-cross-platform-shebang-line-issues">Purging Cross-Platform Shebang Line Issues</h3><p>If your repository configurations pass through host file servers or a Windows subsystem before arriving on your Ubuntu box, line endings can easily convert from Unix LF format to Windows CRLF formats. This hidden alteration triggers terminal script rejections like:</p><pre class="language-bash shiki shiki-themes material-theme-lighter github-light github-dark" style=""><code><span class="line" line="1"><span class="sbgvK">usr/bin/env:</span><span class="s_sjI"> ‘bash</span><span class="s_hVV">\r</span><span class="s_sjI">’:</span><span class="s_sjI"> No</span><span class="s_sjI"> such</span><span class="s_sjI"> file</span><span class="s_sjI"> or</span><span class="s_sjI"> directory
</span></span></code></pre><p>Fix this instantly across your whole localized repository tree before calling any internal installer scripts:</p><pre class="language-bash shiki shiki-themes material-theme-lighter github-light github-dark" style=""><code><span class="line" line="1"><span class="sptTA">cd</span><span class="s_sjI"> ~/esp/espidf
</span></span><span class="line" line="2"><span emptyLinePlaceholder>
</span></span><span class="line" line="3"><span class="sutJx">### Force any corrupted shell scripts back into proper native Unix layout parameters
</span></span><span class="line" line="4"><span class="sbgvK">find</span><span class="s_sjI"> .</span><span class="stzsN"> -name</span><span class="sjJ54"> &quot;</span><span class="s_sjI">*.sh</span><span class="sjJ54">&quot;</span><span class="stzsN"> -exec</span><span class="s_sjI"> dos2unix</span><span class="s_sjI"> {}</span><span class="s_sjI"> +
</span></span></code></pre><h3 id="triggering-the-toolchain-installation">Triggering the Toolchain Installation</h3><p>With clean formatting secured, execute the structural installation script. While you can opt to install tool sets for every single target variant via <code>./install.sh all</code>, targeting only your explicit board framework saves hours of disk read times and download space.</p><p>For standard boards such as the ESP32-DevKitC (esp32dev), pass the esp32 parameter directly:</p><pre class="language-bash shiki shiki-themes material-theme-lighter github-light github-dark" style=""><code><span class="line" line="1"><span class="sptTA">cd</span><span class="s_sjI"> ~/esp/espidf
</span></span><span class="line" line="2"><span class="sbgvK">./install.sh</span><span class="s_sjI"> esp32
</span></span></code></pre><p>This script builds an isolated Python environment and populates custom cross-compilation binaries (such as xtensa-esp32-elf) natively within a hidden directory layout (<code>~/.espressif</code>).</p><h2 id="mapping-the-active-shell-workspace">Mapping the Active Shell Workspace</h2><p>The environment tools are completely isolated by design to prevent conflicting with regular Linux operations. Consequently, you must load the active tool configuration paths into your shell workspace session before compilation.</p><h3 id="source-the-configuration-environment-map-directly">Source the configuration environment map directly</h3><pre class="language-bash shiki shiki-themes material-theme-lighter github-light github-dark" style=""><code><span class="line" line="1"><span class="sptTA">cd</span><span class="s_sjI"> ~/esp/espidf
</span></span><span class="line" line="2"><span class="sptTA">.</span><span class="s_sjI"> ./export.sh
</span></span></code></pre><h4 id="establishing-a-permanent-environment-shortcut">Establishing a Permanent Environment Shortcut</h4><p>Running that explicit script string manually every time you launch a fresh Ubuntu terminal window is tedious. Simplify your pathing by introducing a terminal profile alias:</p><ol><li>Open your native terminal profile configuration:</li></ol><pre class="language-bash shiki shiki-themes material-theme-lighter github-light github-dark" style=""><code><span class="line" line="1"><span class="sbgvK"> nano</span><span class="s_sjI"> ~/.bashrc
</span></span></code></pre><ol start="2"><li>Paste this macro line at the absolute bottom of the document space:</li></ol><pre class="language-bash shiki shiki-themes material-theme-lighter github-light github-dark" style=""><code><span class="line" line="1"><span class="sbsja">alias</span><span class="su5hD"> get_idf</span><span class="smGrS">=</span><span class="sjJ54">&apos;</span><span class="s_sjI">. ~/esp/espidf/export.sh</span><span class="sjJ54">&apos;
</span></span></code></pre><ol start="3"><li>Save the changes and exit (<kbd value="meta"></kbd> + <kbd value="O"></kbd> <kbd value="Enter"></kbd> <kbd value="Ctrl"></kbd> + <kbd value="X"></kbd>).</li></ol><p>Now, entering the lightweight command <code>get_idf</code> inside any new bash terminal session instantly prepares your environment workspace.</p><h2 id="project-compilation-flashing-and-port-access">Project Compilation, Flashing, and Port Access</h2><p>With your environment loaded cleanly, test the complete pipeline by spinning up a fresh workspace program outside of your framework code repository path:</p><h3 id="copy-a-foundational-template-application-to-your-workspace">Copy a foundational template application to your workspace</h3><pre class="language-bash shiki shiki-themes material-theme-lighter github-light github-dark" style=""><code><span class="line" line="1"><span class="sbgvK">cp</span><span class="stzsN"> -r</span><span class="s_sjI"> ~/esp/espidf/examples/get-started/hello_world</span><span class="s_sjI"> ~/esp/
</span></span><span class="line" line="2"><span class="sptTA">cd</span><span class="s_sjI"> ~/esp/hello_world
</span></span><span class="line" line="3"><span class="sutJx">## Clean up any lingering or corrupted configuration file configurations
</span></span><span class="line" line="4"><span class="sbgvK">rm</span><span class="stzsN"> -rf</span><span class="s_sjI"> build/
</span></span><span class="line" line="5"><span emptyLinePlaceholder>
</span></span><span class="line" line="6"><span class="sutJx">## Target your hardware profile layout parameters
</span></span><span class="line" line="7"><span class="sbgvK">idf.py</span><span class="s_sjI"> set-target</span><span class="s_sjI"> esp32
</span></span></code></pre><h3 id="managing-system-port-permissions">Managing System Port Permissions</h3><p>When you plug your ESP32 board into a USB port on Ubuntu, the kernel creates devices like <code>/dev/ttyUSB0</code> or <code>/dev/ttyACM0</code>.</p><p>However, standard Linux users lack read/write permissions for these devices by default, causing flashing attempts to fail with a Permission Denied error.</p><p>Grant your active system user profile permanent access privileges:</p><pre class="language-bash shiki shiki-themes material-theme-lighter github-light github-dark" style=""><code><span class="line" line="1"><span class="sbgvK">sudo</span><span class="s_sjI"> usermod</span><span class="stzsN"> -aG</span><span class="s_sjI"> dialout</span><span class="su5hD"> $USER
</span></span></code></pre><div><p>You must log out of your Ubuntu user session completely and log back in for this access mapping to apply to your terminal terminal.</p></div><h3 id="compiling-flashing-and-monitoring">Compiling, Flashing, and Monitoring</h3><p>Chain your final terminal steps together to execute compilation, flash binaries directly to your hardware, and capture serial terminal output in real time:</p><pre class="language-bash shiki shiki-themes material-theme-lighter github-light github-dark" style=""><code><span class="line" line="1"><span class="sbgvK">idf.py</span><span class="s_sjI"> build</span><span class="s_sjI"> flash</span><span class="s_sjI"> monitor
</span></span></code></pre><p>To exit the real-time serial monitor window safely at any time, press <kbd value="Ctrl"></kbd> + <kbd value="]"></kbd>.</p>]]></content:encoded>
            <author>yebei@nodewave.net (Gideon Yebei)</author>
            <category domain="https://nodewaveblog.vercel.app/categories/terminal-and-shells">terminal-and-shells</category>
            <category domain="https://nodewaveblog.vercel.app/tags/esp32">ESP32</category>
            <category domain="https://nodewaveblog.vercel.app/tags/embedded">Embedded</category>
            <category domain="https://nodewaveblog.vercel.app/tags/automation">Automation</category>
            <category domain="https://nodewaveblog.vercel.app/tags/linux">Linux</category>
            <enclosure url="https://nodewaveblog.vercel.app/blogs/posts/esp-idf-ubuntu-setup/cover.png" length="0" type="image/png"/>
        </item>
    </channel>
</rss>