{"id":170029,"date":"2025-05-22T13:10:18","date_gmt":"2025-05-22T13:10:18","guid":{"rendered":"https:\/\/randomnerdtutorials.com\/?p=170029"},"modified":"2025-05-28T15:10:52","modified_gmt":"2025-05-28T15:10:52","slug":"programming-esp32-esp-idf-vs-code","status":"publish","type":"post","link":"https:\/\/randomnerdtutorials.com\/programming-esp32-esp-idf-vs-code\/","title":{"rendered":"Programming ESP32 with ESP-IDF using VS Code &#8211; Getting Started Guide"},"content":{"rendered":"\n<p>Learn how to program the ESP32 boards with the ESP-IDF (Espressif IoT Development Framework). The ESP-IDF was developed by Espressif and it is intended for development of Internet of Things (IoT) applications with Wi-Fi, Bluetooth, power management and several other features. <\/p>\n\n\n\n<p>We recommend installing the ESP-IDF on VS Code IDE (Microsoft Visual Studio Code). In this guide, we&#8217;ll cover how to prepare the ESP-IDF on Windows, Mac OS X or Linux Ubuntu operating systems to program ESP32 boards.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" width=\"1200\" height=\"675\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/ESP32-ESP-IDF-Getting-Started.jpg?resize=1200%2C675&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Programming ESP32 with ESP-IDF using VS Code - Getting Started Guide\" class=\"wp-image-170352\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/ESP32-ESP-IDF-Getting-Started.jpg?w=1920&amp;quality=100&amp;strip=all&amp;ssl=1 1920w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/ESP32-ESP-IDF-Getting-Started.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/ESP32-ESP-IDF-Getting-Started.jpg?resize=1024%2C576&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/ESP32-ESP-IDF-Getting-Started.jpg?resize=768%2C432&amp;quality=100&amp;strip=all&amp;ssl=1 768w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/ESP32-ESP-IDF-Getting-Started.jpg?resize=1536%2C864&amp;quality=100&amp;strip=all&amp;ssl=1 1536w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\">Introduction to ESP-IDF (Espressif IoT Development Framework)<\/h2>\n\n\n\n<p>ESP-IDF, Espressif IoT Development Framework, is the original framework developed by Espressif (the developer of ESP32 chips) to program the ESP32. It is an SDK to develop applications for ESP332 chips using C and C++ programming languages that gives you low-level access to the hardware.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"486\" height=\"352\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/what-you-need-program-ESP32-ESP-IDF.png?resize=486%2C352&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"What you need to program ESP32 ESP-IDF\" class=\"wp-image-170349\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/what-you-need-program-ESP32-ESP-IDF.png?w=486&amp;quality=100&amp;strip=all&amp;ssl=1 486w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/what-you-need-program-ESP32-ESP-IDF.png?resize=300%2C217&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 486px) 100vw, 486px\" \/><figcaption class=\"wp-element-caption\"><a href=\"https:\/\/docs.espressif.com\/projects\/esp-idf\/en\/stable\/esp32\/get-started\/index.html\" target=\"_blank\" rel=\"noopener\" title=\"\">Image source<\/a><\/figcaption><\/figure><\/div>\n\n\n<p>Being the &#8220;official&#8221; way to program the ESP32, it means the SDK is frequently updated to support the release of newer versions of ESP32 chips. On the other hand, it may take a while for new chips to be supported in the Arduino IDE. The following table shows the current supported ESP32 SoC series by ESP-IDF:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>ESP32<\/li>\n\n\n\n<li>ESP32-S2, ESP32-S3<\/li>\n\n\n\n<li>ESP32-C2, ESP32-C3, ESP32-C5, ESP32-C6, ESP32-C61<\/li>\n\n\n\n<li>ESP32-H2<\/li>\n\n\n\n<li>ESP32-P4<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">ESP-IDF or Arduino IDE?<\/h3>\n\n\n\n<p>Compared with <a href=\"https:\/\/randomnerdtutorials.com\/installing-esp32-arduino-ide-2-0\/\" title=\"\">Arduino IDE<\/a>, ESP-IDF gives you more options for customization, performance, and control over ESP32 peripherals, configurations, and tasks. It uses RealTime OS (FreeRTOS) using programming based on tasks, while the Arduino IDE uses the setup() and loop() configuration.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"750\" height=\"275\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/ESP-IDF-vs-Arduino-IDE.jpg?resize=750%2C275&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP-IDF vs Arduino IDE\" class=\"wp-image-170350\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/ESP-IDF-vs-Arduino-IDE.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/ESP-IDF-vs-Arduino-IDE.jpg?resize=300%2C110&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>ESP-IDF is much more complex to use than Arduino IDE. You need to understand a lot more about how the system and hardware work, and you&#8217;ll need to build and understand configurations for memory management, FreeRTOS tasks, peripheral initialization, and more.<\/p>\n\n\n\n<p>This complexity gives you more control over your boards, but you&#8217;re also more likely to run into errors, configuration problems, etc. With that said, if you&#8217;re not familiar with Arduino IDE or if you&#8217;re just getting started with the ESP32, we don&#8217;t recommend getting into ESP-IDF at the moment. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"install-vs-code\">Installing VS Code<\/h2>\n\n\n\n<p>Follow the next instructions to install VS Code on your Operating System:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A) <a href=\"#vs-code-windows\">Windows<\/a><\/li>\n\n\n\n<li>B) <a href=\"#vs-code-macosx\">MacOS X<\/a><\/li>\n\n\n\n<li>C) <a href=\"#vs-code-linux\">Linux<\/a><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"vs-code-windows\">A) Installing VS Code on Windows (Visual Studio Code)<\/h4>\n\n\n\n<p>Go to <a href=\"https:\/\/code.visualstudio.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">code.visualstudio.com<\/a> and download the stable build for your operating system (Windows).<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"569\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/09\/Download-VS-Code.jpg?resize=750%2C569&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Download VS Code for Windows\" class=\"wp-image-169218\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/09\/Download-VS-Code.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/09\/Download-VS-Code.jpg?resize=300%2C228&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>Click on the installation wizard to start the installation and follow all the steps to complete the installation. Accept the agreement and press the <strong>Next <\/strong>button.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"598\" height=\"464\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/2-Install-VS-Code.png?resize=598%2C464&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Microsoft Visual Studio Code VS Code Installation wizard\" class=\"wp-image-99206\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/2-Install-VS-Code.png?w=598&amp;quality=100&amp;strip=all&amp;ssl=1 598w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/2-Install-VS-Code.png?resize=300%2C233&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 598px) 100vw, 598px\" \/><\/figure><\/div>\n\n\n<p>Select the following options and click <strong>Next<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"598\" height=\"464\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/3-Install-VS-Code.png?resize=598%2C464&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Microsoft Visual Studio Code VS Code Installation wizard step 2\" class=\"wp-image-99207\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/3-Install-VS-Code.png?w=598&amp;quality=100&amp;strip=all&amp;ssl=1 598w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/3-Install-VS-Code.png?resize=300%2C233&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 598px) 100vw, 598px\" \/><\/figure><\/div>\n\n\n<p>Press the <strong>Install <\/strong>button.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"598\" height=\"464\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/4-Install-VS-Code.png?resize=598%2C464&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Microsoft Visual Studio Code VS Code Installation wizard step 3\" class=\"wp-image-99208\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/4-Install-VS-Code.png?w=598&amp;quality=100&amp;strip=all&amp;ssl=1 598w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/4-Install-VS-Code.png?resize=300%2C233&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 598px) 100vw, 598px\" \/><\/figure><\/div>\n\n\n<p>Finally, click <strong>Finish <\/strong>to finish the installation.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"598\" height=\"464\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/5-Install-VS-Code.png?resize=598%2C464&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Microsoft Visual Studio Code VS Code Installation wizard final step\" class=\"wp-image-99204\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/5-Install-VS-Code.png?w=598&amp;quality=100&amp;strip=all&amp;ssl=1 598w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/5-Install-VS-Code.png?resize=300%2C233&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 598px) 100vw, 598px\" \/><\/figure><\/div>\n\n\n<p>Open VS Code, and you\u2019ll be greeted by a Welcome tab with the released notes of the newest version.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"558\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/09\/1-VS-Code-Welcome-screen.jpg?resize=750%2C558&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"VS Code Welcome Screen\" class=\"wp-image-169220\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/09\/1-VS-Code-Welcome-screen.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/09\/1-VS-Code-Welcome-screen.jpg?resize=300%2C223&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>That\u2019s it. Visual Studio Code was successfully installed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"vs-code-macosx\">B) Installing VS Code on Mac OS X (Visual Studio Code)<\/h3>\n\n\n\n<p>Go to <a href=\"https:\/\/code.visualstudio.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">code.visualstudio.com<\/a> and download the stable build for your operating system (Mac OS X).<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1167\" height=\"592\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/3-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-download-Mac-OS-X.png?resize=1167%2C592&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Microsoft Visual Studio Code VS Code Download Page for Mac OS X\" class=\"wp-image-99336\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/3-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-download-Mac-OS-X.png?w=1167&amp;quality=100&amp;strip=all&amp;ssl=1 1167w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/3-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-download-Mac-OS-X.png?resize=300%2C152&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/3-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-download-Mac-OS-X.png?resize=1024%2C519&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/3-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-download-Mac-OS-X.png?resize=768%2C390&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 1167px) 100vw, 1167px\" \/><\/figure><\/div>\n\n\n<p>After downloading the Visual Studio Code application file, you&#8217;ll be prompted with the following message. Press the &#8220;<strong>Open<\/strong>&#8221; button.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"487\" height=\"158\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/5-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-save-file.png?resize=487%2C158&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Microsoft Visual Studio Code VS Code Downloading application file for Mac OS X\" class=\"wp-image-99338\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/5-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-save-file.png?w=487&amp;quality=100&amp;strip=all&amp;ssl=1 487w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/5-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-save-file.png?resize=300%2C97&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 487px) 100vw, 487px\" \/><\/figure><\/div>\n\n\n<p>Or open your Downloads folder and open Visual Studio Code.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"214\" height=\"140\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/4-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-file-downloaded-Mac-OS-X.png?resize=214%2C140&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Microsoft Visual Studio Code VS Code Downloading application file for Mac OS X\" class=\"wp-image-99337\"\/><\/figure><\/div>\n\n\n<p>After that, you\u2019ll be greeted by a Welcome tab with the released notes of the newest version.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"767\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/6-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-installed.png?resize=1024%2C767&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Microsoft Visual Studio Code VS Code Installation wizard welcome screen on Max OS X\" class=\"wp-image-99339\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/6-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-installed.png?w=1024&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/6-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-installed.png?resize=300%2C225&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/6-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-installed.png?resize=768%2C575&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>That\u2019s it. Visual Studio Code was successfully installed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"vs-code-linux\">C) Installing VS Code on Linux Ubuntu (Visual Studio Code)<\/h3>\n\n\n\n<p>Go to <a href=\"https:\/\/code.visualstudio.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">code.visualstudio.com<\/a> and download the stable build for your operating system (Linux Ubuntu).<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"961\" height=\"438\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/3-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-downloading-VS-Code-Linux-Ubuntu.png?resize=961%2C438&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Microsoft Visual Studio Code VS Code Download Page for Linux Ubuntu\" class=\"wp-image-99324\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/3-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-downloading-VS-Code-Linux-Ubuntu.png?w=961&amp;quality=100&amp;strip=all&amp;ssl=1 961w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/3-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-downloading-VS-Code-Linux-Ubuntu.png?resize=300%2C137&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/3-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-downloading-VS-Code-Linux-Ubuntu.png?resize=768%2C350&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 961px) 100vw, 961px\" \/><\/figure><\/div>\n\n\n<p>Save the installation file:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"495\" height=\"350\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/4-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-downloading-VS-Code-Linux-Ubuntu.png?resize=495%2C350&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Microsoft Visual Studio Code VS Code Save installation file for Linux Ubuntu\" class=\"wp-image-99325\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/4-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-downloading-VS-Code-Linux-Ubuntu.png?w=495&amp;quality=100&amp;strip=all&amp;ssl=1 495w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/4-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-downloading-VS-Code-Linux-Ubuntu.png?resize=300%2C212&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 495px) 100vw, 495px\" \/><\/figure><\/div>\n\n\n<p>To install it, open a Terminal window, navigate to your Downloads folder and run the following command to install VS Code.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ cd Downloads\n~\/Downloads $ sudo apt install .\/code_1.49.1-1600299189_amd64.deb<\/code><\/pre>\n\n\n\n<p>When the installation is finished, VS Code should be available in your applications menu.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"516\" height=\"326\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/5-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-run-VS-Code-Linux-Ubuntu.png?resize=516%2C326&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Microsoft Visual Studio Code VS Code Open application Linux Ubuntu\" class=\"wp-image-99326\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/5-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-run-VS-Code-Linux-Ubuntu.png?w=516&amp;quality=100&amp;strip=all&amp;ssl=1 516w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/5-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-run-VS-Code-Linux-Ubuntu.png?resize=300%2C190&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 516px) 100vw, 516px\" \/><\/figure><\/div>\n\n\n<p>Open VS Code, and you\u2019ll be greeted by a Welcome tab with the released notes of the newest version.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"632\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/6-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-downloading-VS-Code-Linux-Ubuntu-Testing.png?resize=1024%2C632&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Microsoft Visual Studio Code VS Code Installation wizard welcome screen on Linux Ubuntu\" class=\"wp-image-99327\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/6-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-downloading-VS-Code-Linux-Ubuntu-Testing.png?w=1024&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/6-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-downloading-VS-Code-Linux-Ubuntu-Testing.png?resize=300%2C185&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/6-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-downloading-VS-Code-Linux-Ubuntu-Testing.png?resize=768%2C474&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>That\u2019s it. Visual Studio Code was successfully installed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing Python<\/h2>\n\n\n\n<p>To program the ESP32 with ESP-IDF, you need Python 3.5 or a later version installed on your computer. Follow the instructions according to your operating system:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#installing-python-windows\" title=\"\">A) Installing Python on Windows<\/a><\/li>\n\n\n\n<li><a href=\"#install-python-macos\" title=\"\">B) Installing Python on MacOS<\/a><\/li>\n\n\n\n<li><a href=\"#install-python-linux\" title=\"\">C) Installing Python on Ubuntu Linux<\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"installing-python-windows\">A) Installing Python on Windows<\/h3>\n\n\n\n<p>Go to <a href=\"https:\/\/www.python.org\/downloads\/\" target=\"_blank\" rel=\"noopener\" title=\"\">python.org\/downloads<\/a> and download Python 3.13.3 or a later version.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"429\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/download-python-for-windows.png?resize=750%2C429&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Download Python for Windows\" class=\"wp-image-169311\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/download-python-for-windows.png?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/download-python-for-windows.png?resize=300%2C172&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>Open the downloaded file to start the Python installation wizard. The following windows show up.<\/p>\n\n\n\n<p><strong>Important:<\/strong> make sure you check the option <strong>Add Python to PATH<\/strong>. Then, you can click on the <strong>Install Now<\/strong> button. You may also need to check the &#8220;Use admin privileges when installing py.exe&#8221;.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"656\" height=\"405\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/add-python-path-installation.png?resize=656%2C405&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"add python to path - installation\" class=\"wp-image-169312\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/add-python-path-installation.png?w=656&amp;quality=100&amp;strip=all&amp;ssl=1 656w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/add-python-path-installation.png?resize=300%2C185&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 656px) 100vw, 656px\" \/><\/figure><\/div>\n\n\n<p>If the installation is successful, you&#8217;ll get the following message.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"656\" height=\"405\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/Python-setup-successful.png?resize=656%2C405&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Python installation successful\" class=\"wp-image-169313\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/Python-setup-successful.png?w=656&amp;quality=100&amp;strip=all&amp;ssl=1 656w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/Python-setup-successful.png?resize=300%2C185&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 656px) 100vw, 656px\" \/><\/figure><\/div>\n\n\n<p>Finally, click the <strong>Close<\/strong> button.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-python-macos\">Installing Python on Mac OS X<\/h3>\n\n\n\n<p>Open a Terminal window. You can open it through Spotlight Search. To launch Spotlight, click the small magnifying glass icon in your menu bar (or press <strong>Cmd<\/strong>+<strong>Space<\/strong>).<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"674\" height=\"70\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/Mac-OS-spotlight.png?resize=674%2C70&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"MacOS spotlight\" class=\"wp-image-169316\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/Mac-OS-spotlight.png?w=674&amp;quality=100&amp;strip=all&amp;ssl=1 674w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/Mac-OS-spotlight.png?resize=300%2C31&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 674px) 100vw, 674px\" \/><\/figure><\/div>\n\n\n<p>Then, type &#8220;terminal&#8221; and click on the Terminal icon to launch it.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"114\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/mac-os-launch-terminal.png?resize=750%2C114&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Mac OS Launch terminal\" class=\"wp-image-169318\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/mac-os-launch-terminal.png?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/mac-os-launch-terminal.png?resize=300%2C46&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>To install Python, I&#8217;ll be using <em>Homebrew<\/em>. &nbsp;If you don&#8217;t have the <em>brew<\/em> command available, type the next command in the Terminal window:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/bin\/bash -c \"$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/master\/install.sh)\"<\/code><\/pre>\n\n\n\n<p>Here&#8217;s how it looks on the Terminal window:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"860\" height=\"110\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/image.png?resize=860%2C110&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" class=\"wp-image-169320\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/image.png?w=860&amp;quality=100&amp;strip=all&amp;ssl=1 860w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/image.png?resize=300%2C38&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/04\/image.png?resize=768%2C98&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 860px) 100vw, 860px\" \/><\/figure><\/div>\n\n\n<p>Then, run the brew command to install Python 3.13:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>brew install python3<\/code><\/pre>\n\n\n\n<p>Here&#8217;s how it looks on the Terminal window:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"632\" height=\"210\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/2-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-install-Python3.png?resize=632%2C210&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Microsoft Visual Studio Code VS Code installing Python 3 with brew command\" class=\"wp-image-99335\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/2-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-install-Python3.png?w=632&amp;quality=100&amp;strip=all&amp;ssl=1 632w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/2-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-install-Python3.png?resize=300%2C100&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 632px) 100vw, 632px\" \/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"install-python-linux\">Installing Python on Linux Ubuntu<\/h3>\n\n\n\n<p>To program the ESP32 boards with ESP-IDF, you need Python 3.5 or a later version installed on your computer.<\/p>\n\n\n\n<p>Open the Terminal window and check that you already have Python 3 installed. Run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>python3 --version<\/strong><\/code><\/pre>\n\n\n\n<p>It should return the current installed version:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>python 3.13.3<\/code><\/pre>\n\n\n\n<p>If you don&#8217;t have Python installed, run the next command to install it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install python3<\/code><\/pre>\n\n\n\n<p>Whether you already have Python installed or not, you need to run the following command to install Python utilities.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install python3-distutils<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"452\" height=\"91\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/2-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-Python3-installed-distutils.png?resize=452%2C91&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Installing python3-distutils Linux Ubuntu for PlatformIO IDE\" class=\"wp-image-99323\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/2-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-Python3-installed-distutils.png?w=452&amp;quality=100&amp;strip=all&amp;ssl=1 452w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2020\/09\/2-Getting-Started-VS-Code-PlatformIO-IDE-ESP32-ESP8266-Python3-installed-distutils.png?resize=300%2C60&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 452px) 100vw, 452px\" \/><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"install-pioarduino\">Installing the ESP-IDF Extension for VS Code<\/h2>\n\n\n\n<p>To access the ESP-IDF tools, you need to install the official <strong>ESP-IDF<\/strong> extension on VS Code. Open VS Code and click the <strong>Extensions<\/strong> icon in the left sidebar or click <strong>Ctrl<\/strong>+<strong>Shift<\/strong>+<strong>X<\/strong> to open the <strong>Extensions<\/strong> tab.<\/p>\n\n\n\n<p>Search for &#8220;<strong>ESP-IDF<\/strong>&#8220;,&nbsp;select the <em><strong>ESP-IDF by Espressif Systems<\/strong><\/em> and click the <strong>Install<\/strong> button.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"908\" height=\"401\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/Installing-ESP-IDF-Extension-VS-Code.png?resize=908%2C401&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Installing ESP-IDF Extension VS Code\" class=\"wp-image-170143\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/Installing-ESP-IDF-Extension-VS-Code.png?w=908&amp;quality=100&amp;strip=all&amp;ssl=1 908w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/Installing-ESP-IDF-Extension-VS-Code.png?resize=300%2C132&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/Installing-ESP-IDF-Extension-VS-Code.png?resize=768%2C339&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 908px) 100vw, 908px\" \/><\/figure><\/div>\n\n\n<p>Press the &#8220;<strong>Trust Publisher &amp; Install<\/strong>&#8221; button. The installation will take some time to complete.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"589\" height=\"338\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/Installing-ESP-IDF-Extension-VS-Code-Trust-Espressif-Systems.png?resize=589%2C338&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Installing ESP-IDF Extension VS Code Trust Espressif Systems\" class=\"wp-image-170144\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/Installing-ESP-IDF-Extension-VS-Code-Trust-Espressif-Systems.png?w=589&amp;quality=100&amp;strip=all&amp;ssl=1 589w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/Installing-ESP-IDF-Extension-VS-Code-Trust-Espressif-Systems.png?resize=300%2C172&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 589px) 100vw, 589px\" \/><\/figure><\/div>\n\n\n<p>That&#8217;s it! The ESP-IDF extension by Espressif Systems is now installed in your IDE, the following welcome screen should appear.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"614\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Preparing-ESP-IDF-Installation-preparing.jpg?resize=900%2C614&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"VS Code Preparing ESP-IDF Installation\" class=\"wp-image-170159\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Preparing-ESP-IDF-Installation-preparing.jpg?w=900&amp;quality=100&amp;strip=all&amp;ssl=1 900w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Preparing-ESP-IDF-Installation-preparing.jpg?resize=300%2C205&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Preparing-ESP-IDF-Installation-preparing.jpg?resize=768%2C524&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/figure><\/div>\n\n\n<p>Next, follow these instructions to configure the ESP-IDF Extension:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open the ESP-IDF Espressif extension panel<\/li>\n\n\n\n<li>Expand the &#8220;<strong>Advanced<\/strong>&#8221; menu<\/li>\n\n\n\n<li>Click the &#8220;<strong>Configure ESP-IDF Extension<\/strong>&#8221; option<\/li>\n\n\n\n<li>Choose the &#8220;<strong>EXPRESS<\/strong>&#8221; setup mode to configure the ESP-IDF Tools<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"649\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Configure-ESP-IDF-Extension-Express-Option.jpg?resize=900%2C649&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"VS Code Configure ESP-IDF Extension Express Option\" class=\"wp-image-170148\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Configure-ESP-IDF-Extension-Express-Option.jpg?w=900&amp;quality=100&amp;strip=all&amp;ssl=1 900w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Configure-ESP-IDF-Extension-Express-Option.jpg?resize=300%2C216&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Configure-ESP-IDF-Extension-Express-Option.jpg?resize=768%2C554&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/figure><\/div>\n\n\n<p>During the ESP-IDF Express Setup screen, you&#8217;ll be prompted to select the ESP-IDF version. At the time of writing this guide, the latest released version is v5.4.1. We recommend using version 5.X to follow along. Press the &#8220;<strong>Install<\/strong>&#8221; button.<\/p>\n\n\n\n<p><strong>Note:<\/strong> you can leave all other default options or change the ESP-IDF directory if you need to.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"669\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Configure-ESP-IDF-Extension-Express-Seletct-Release-Version-and-Install.jpg?resize=900%2C669&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"VS Code Configure ESP-IDF Extension Express Select Release Version and Install\" class=\"wp-image-170149\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Configure-ESP-IDF-Extension-Express-Seletct-Release-Version-and-Install.jpg?w=900&amp;quality=100&amp;strip=all&amp;ssl=1 900w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Configure-ESP-IDF-Extension-Express-Seletct-Release-Version-and-Install.jpg?resize=300%2C223&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Configure-ESP-IDF-Extension-Express-Seletct-Release-Version-and-Install.jpg?resize=768%2C571&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/figure><\/div>\n\n\n<p>That&#8217;s it, you&#8217;ll see a similar screen while the ESP-IDF extension is being configured. Wait a few minutes until this process is completed.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"610\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Configuring-ESP-IDF-Extension-Express-Seletct-Release-Version-Completing-Instalation-ESP-IDF-Tools-Python-Virtual-Environment.jpg?resize=900%2C610&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"VS Code Configuring ESP-IDF Extension Express Select Release Version Completing Installation ESP IDF Tools Python Virtual Environment\" class=\"wp-image-170150\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Configuring-ESP-IDF-Extension-Express-Seletct-Release-Version-Completing-Instalation-ESP-IDF-Tools-Python-Virtual-Environment.jpg?w=900&amp;quality=100&amp;strip=all&amp;ssl=1 900w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Configuring-ESP-IDF-Extension-Express-Seletct-Release-Version-Completing-Instalation-ESP-IDF-Tools-Python-Virtual-Environment.jpg?resize=300%2C203&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Configuring-ESP-IDF-Extension-Express-Seletct-Release-Version-Completing-Instalation-ESP-IDF-Tools-Python-Virtual-Environment.jpg?resize=768%2C521&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"install-pioarduino\">Installing the C\/C++ Extensions for VS Code (optional)<\/h2>\n\n\n\n<p>This step is optional, but since you&#8217;ll be using the C++ language with the ESP-IDF framework to program the ESP32 boards, we recommend installing these C\/C++ extensions for VS Code. Open VS Code and click on the <strong>Extensions<\/strong> icon to open the <strong>Extensions<\/strong> tab.<\/p>\n\n\n\n<p>Search for &#8220;<strong>C\/C++<\/strong>&#8220;, select the first option and click the <strong>Install<\/strong> button.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"919\" height=\"337\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/Installing-C-and-C-plus-plus-VS-Code.png?resize=919%2C337&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Installing C and C plus plus VS Code\" class=\"wp-image-170141\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/Installing-C-and-C-plus-plus-VS-Code.png?w=919&amp;quality=100&amp;strip=all&amp;ssl=1 919w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/Installing-C-and-C-plus-plus-VS-Code.png?resize=300%2C110&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/Installing-C-and-C-plus-plus-VS-Code.png?resize=768%2C282&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 919px) 100vw, 919px\" \/><\/figure><\/div>\n\n\n<p>You can also install the &#8220;<strong>C\/C++ Extension Pack<\/strong>&#8220;.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1020\" height=\"363\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/Installing-C-and-C-plus-plus-VS-Code-Extension-Pack.png?resize=1020%2C363&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Installing C and C plus plus VS Code Extension Pack\" class=\"wp-image-170142\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/Installing-C-and-C-plus-plus-VS-Code-Extension-Pack.png?w=1020&amp;quality=100&amp;strip=all&amp;ssl=1 1020w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/Installing-C-and-C-plus-plus-VS-Code-Extension-Pack.png?resize=300%2C107&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/Installing-C-and-C-plus-plus-VS-Code-Extension-Pack.png?resize=768%2C273&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 1020px) 100vw, 1020px\" \/><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\">Programming ESP32 with ESP-IDF using VS Code &#8211; Hello World Code<\/h2>\n\n\n\n<p>The ESP-IDF installation comes with a vast examples folder that you can experiment with. For this initial getting started guide, we&#8217;ll build and flash a basic &#8220;Hello World&#8221; code to the ESP32 board.<\/p>\n\n\n\n<p>To open the examples folder, follow these steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open the ESP-IDF Espressif extension<\/li>\n\n\n\n<li>Expand the &#8220;<strong>Advanced<\/strong>&#8221; menu<\/li>\n\n\n\n<li>Click the &#8220;<strong>Show Examples<\/strong>&#8221; option<\/li>\n\n\n\n<li>Choose the &#8220;<strong>Use ESP-IDF v5.4.1<\/strong>&#8221; to select the framework version<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"930\" height=\"690\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Open-ESP-IDF-Menu-Show-Examples.png?resize=930%2C690&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"VS Code Open ESP-IDF Menu Show Examples\" class=\"wp-image-170156\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Open-ESP-IDF-Menu-Show-Examples.png?w=930&amp;quality=100&amp;strip=all&amp;ssl=1 930w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Open-ESP-IDF-Menu-Show-Examples.png?resize=300%2C223&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Open-ESP-IDF-Menu-Show-Examples.png?resize=768%2C570&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 930px) 100vw, 930px\" \/><\/figure><\/div>\n\n\n<p>In the left sidebar, under the &#8220;<strong>get-started<\/strong>&#8221; section open the &#8220;<strong>hello_world<\/strong>&#8221; example.<\/p>\n\n\n\n<p>A new page opens in the IDE with the information about the example: which chips are supported, general information about the example and instructions on how to use it.<\/p>\n\n\n\n<p>On the top of the page, click the button &#8220;<strong>Select location for creating hello_world project<\/strong>&#8220;.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"473\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-ESP-IDF-Show-Examples-Open-Hello-World-Project-Select-Location.png?resize=1024%2C473&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"VS Code ESP-IDF Show Examples Open Hello World Project Select Location\" class=\"wp-image-170152\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-ESP-IDF-Show-Examples-Open-Hello-World-Project-Select-Location.png?resize=1024%2C473&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-ESP-IDF-Show-Examples-Open-Hello-World-Project-Select-Location.png?resize=300%2C139&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-ESP-IDF-Show-Examples-Open-Hello-World-Project-Select-Location.png?resize=768%2C355&amp;quality=100&amp;strip=all&amp;ssl=1 768w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-ESP-IDF-Show-Examples-Open-Hello-World-Project-Select-Location.png?w=1264&amp;quality=100&amp;strip=all&amp;ssl=1 1264w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>A new window opens to select the target folder to save all your project file, you can use any directory. Create a new folder or navigate to the desired workplace, then &#8220;<strong>Select Folder for New Project<\/strong>&#8220;.<\/p>\n\n\n\n<p><strong>Note: do NOT use a Google Drive \/ One Drive \/ Dropbox folder<\/strong>, because while your code is building it will write\/create many files and if it&#8217;s on a cloud folder this process might be extremely slow.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"868\" height=\"488\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-ESP-IDF-Show-Examples-Open-Hello-World-Project-Select-Location-Folder-for-New-Project.png?resize=868%2C488&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"VS Code ESP-IDF Show Examples Open Hello World Project Select Location Folder for New Project\" class=\"wp-image-170153\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-ESP-IDF-Show-Examples-Open-Hello-World-Project-Select-Location-Folder-for-New-Project.png?w=868&amp;quality=100&amp;strip=all&amp;ssl=1 868w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-ESP-IDF-Show-Examples-Open-Hello-World-Project-Select-Location-Folder-for-New-Project.png?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-ESP-IDF-Show-Examples-Open-Hello-World-Project-Select-Location-Folder-for-New-Project.png?resize=768%2C432&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 868px) 100vw, 868px\" \/><\/figure><\/div>\n\n\n<p>After selecting the folder for your new <strong>Hello World<\/strong> project, you&#8217;ll need allow those files to be accessed. Press the &#8220;<strong>Yes, I trust the authors<\/strong>&#8221; button to continue with the correct permissions.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"875\" height=\"525\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-ESP-IDF-Hello-World-Project-Trust-Authors.png?resize=875%2C525&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"VS Code ESP-IDF Hello World Project Trust Authors\" class=\"wp-image-170151\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-ESP-IDF-Hello-World-Project-Trust-Authors.png?w=875&amp;quality=100&amp;strip=all&amp;ssl=1 875w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-ESP-IDF-Hello-World-Project-Trust-Authors.png?resize=300%2C180&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-ESP-IDF-Hello-World-Project-Trust-Authors.png?resize=768%2C461&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 875px) 100vw, 875px\" \/><\/figure><\/div>\n\n\n<p>To find the Hello World code example, follow these steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open the project explorer by clicking the first icon on the left sidebar<\/li>\n\n\n\n<li>Select the <strong>HELLO_WORLD<\/strong> folder and expand the &#8220;<strong>main<\/strong>&#8221; section<\/li>\n\n\n\n<li>Click the &#8220;<strong><em>hello_world_main.c<\/em><\/strong>&#8221; file<\/li>\n\n\n\n<li>The example loads in the code tab<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"551\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Open-Hello-World-Project-ESP32-ESP-IDF.jpg?resize=900%2C551&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"VS Code Open Hello World Project ESP32 ESP-IDF\" class=\"wp-image-170164\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Open-Hello-World-Project-ESP32-ESP-IDF.jpg?w=900&amp;quality=100&amp;strip=all&amp;ssl=1 900w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Open-Hello-World-Project-ESP32-ESP-IDF.jpg?resize=300%2C184&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Open-Hello-World-Project-ESP32-ESP-IDF.jpg?resize=768%2C470&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/figure><\/div>\n\n\n<p>Here&#8217;s the full <em>hello_world_main.c<\/em> code:<\/p>\n\n\n<pre style=\"max-height: 40em; margin-bottom: 20px;\"><code class=\"language-c\">\/\/ SPDX-FileCopyrightText: 2010-2022 Espressif Systems (Shanghai) CO LTD * SPDX-License-Identifier: CC0-1.0\n\n#include &lt;stdio.h&gt;\n#include &lt;inttypes.h&gt;\n#include &quot;sdkconfig.h&quot;\n#include &quot;freertos\/FreeRTOS.h&quot;\n#include &quot;freertos\/task.h&quot;\n#include &quot;esp_chip_info.h&quot;\n#include &quot;esp_flash.h&quot;\n#include &quot;esp_system.h&quot;\n\nvoid app_main(void)\n{\n    printf(&quot;Hello world!\\n&quot;);\n\n    \/* Print chip information *\/\n    esp_chip_info_t chip_info;\n    uint32_t flash_size;\n    esp_chip_info(&amp;chip_info);\n    printf(&quot;This is %s chip with %d CPU core(s), %s%s%s%s, &quot;,\n           CONFIG_IDF_TARGET,\n           chip_info.cores,\n           (chip_info.features &amp; CHIP_FEATURE_WIFI_BGN) ? &quot;WiFi\/&quot; : &quot;&quot;,\n           (chip_info.features &amp; CHIP_FEATURE_BT) ? &quot;BT&quot; : &quot;&quot;,\n           (chip_info.features &amp; CHIP_FEATURE_BLE) ? &quot;BLE&quot; : &quot;&quot;,\n           (chip_info.features &amp; CHIP_FEATURE_IEEE802154) ? &quot;, 802.15.4 (Zigbee\/Thread)&quot; : &quot;&quot;);\n\n    unsigned major_rev = chip_info.revision \/ 100;\n    unsigned minor_rev = chip_info.revision % 100;\n    printf(&quot;silicon revision v%d.%d, &quot;, major_rev, minor_rev);\n    if(esp_flash_get_size(NULL, &amp;flash_size) != ESP_OK) {\n        printf(&quot;Get flash size failed&quot;);\n        return;\n    }\n\n    printf(&quot;%&quot; PRIu32 &quot;MB %s flash\\n&quot;, flash_size \/ (uint32_t)(1024 * 1024),\n           (chip_info.features &amp; CHIP_FEATURE_EMB_FLASH) ? &quot;embedded&quot; : &quot;external&quot;);\n\n    printf(&quot;Minimum free heap size: %&quot; PRIu32 &quot; bytes\\n&quot;, esp_get_minimum_free_heap_size());\n\n    for (int i = 10; i &gt;= 0; i--) {\n        printf(&quot;Restarting in %d seconds...\\n&quot;, i);\n        vTaskDelay(1000 \/ portTICK_PERIOD_MS);\n    }\n    printf(&quot;Restarting now.\\n&quot;);\n    fflush(stdout);\n    esp_restart();\n}\n<\/code><\/pre>\n\t<p style=\"text-align:center\"><a class=\"rntwhite\" href=\"https:\/\/github.com\/RuiSantosdotme\/Random-Nerd-Tutorials\/raw\/master\/Projects\/ESP-IDF\/hello_world\/hello_world.c\" target=\"_blank\">View raw code<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Build and Flash Hello World ESP-IDF Code Example to the ESP32 Board<\/h3>\n\n\n\n<p>In order to build and flash ESP-IDF code to the ESP32, you&#8217;ll need to always follow this procedure. You need to select the flash method (UART), the COM port number, the target device (ESP32), build the code, and the flash it to the board. All these commands are available in the bottom menu bar of VS Code.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1013\" height=\"23\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/ESP-IDF-Espressif-Systems-Task-Bar-Menu-Functions.png?resize=1013%2C23&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP-IDF Espressif Systems Task Bar Menu Functions\" class=\"wp-image-170326\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/ESP-IDF-Espressif-Systems-Task-Bar-Menu-Functions.png?w=1013&amp;quality=100&amp;strip=all&amp;ssl=1 1013w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/ESP-IDF-Espressif-Systems-Task-Bar-Menu-Functions.png?resize=300%2C7&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/ESP-IDF-Espressif-Systems-Task-Bar-Menu-Functions.png?resize=768%2C17&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 1013px) 100vw, 1013px\" \/><\/figure><\/div>\n\n\n<p>First, click the &#8220;<strong>Star<\/strong>&#8221; icon and select the flash method as <strong>UART<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"584\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Select-Flash-UART-Option-to-Program-Flash-ESP32-1024x584.png?resize=1024%2C584&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"VS Code ESP-IDF Select Flash UART Option to Program Flash ESP32\" class=\"wp-image-170161\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Select-Flash-UART-Option-to-Program-Flash-ESP32.png?resize=1024%2C584&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Select-Flash-UART-Option-to-Program-Flash-ESP32.png?resize=300%2C171&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Select-Flash-UART-Option-to-Program-Flash-ESP32.png?resize=768%2C438&amp;quality=100&amp;strip=all&amp;ssl=1 768w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Select-Flash-UART-Option-to-Program-Flash-ESP32.png?w=1030&amp;quality=100&amp;strip=all&amp;ssl=1 1030w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>While having your ESP32 board connected to your computer, click the COM Port (plug icon) and select the correct port number that refers to your ESP32.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"582\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Programming-ESP32-Board-Select-Correct-COM-Port-Number.png?resize=1024%2C582&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"VS Code ESP-IDF Programming ESP32 Board Select Correct COM Port Number\" class=\"wp-image-170160\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Programming-ESP32-Board-Select-Correct-COM-Port-Number.png?resize=1024%2C582&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Programming-ESP32-Board-Select-Correct-COM-Port-Number.png?resize=300%2C171&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Programming-ESP32-Board-Select-Correct-COM-Port-Number.png?resize=768%2C437&amp;quality=100&amp;strip=all&amp;ssl=1 768w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Programming-ESP32-Board-Select-Correct-COM-Port-Number.png?w=1032&amp;quality=100&amp;strip=all&amp;ssl=1 1032w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>You also need to select the target device, click the chip icon on the bottom bar. In my case, I have an ESP32 with the <strong>esp32s3<\/strong> chip.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"579\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Select-the-ESP32-S3-or-Correct-Target-Device.png?resize=1024%2C579&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"VS Code Select the ESP32 S3 or Correct Target Device ESP-IDF\" class=\"wp-image-170163\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Select-the-ESP32-S3-or-Correct-Target-Device.png?resize=1024%2C579&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Select-the-ESP32-S3-or-Correct-Target-Device.png?resize=300%2C170&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Select-the-ESP32-S3-or-Correct-Target-Device.png?resize=768%2C434&amp;quality=100&amp;strip=all&amp;ssl=1 768w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Select-the-ESP32-S3-or-Correct-Target-Device.png?w=1031&amp;quality=100&amp;strip=all&amp;ssl=1 1031w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>For this board, I also need to select the configuration: <strong>ESP32-S chip (via builtin USB-JTAG)<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"757\" height=\"579\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Select-the-ESP32-S3-chip-via-built-in-USB-JTAG-Target-Device.png?resize=757%2C579&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"VS Code ESP-IDF Select the ESP32 S3 chip via built in USB JTAG Target Device\" class=\"wp-image-170162\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Select-the-ESP32-S3-chip-via-built-in-USB-JTAG-Target-Device.png?w=757&amp;quality=100&amp;strip=all&amp;ssl=1 757w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Select-the-ESP32-S3-chip-via-built-in-USB-JTAG-Target-Device.png?resize=300%2C229&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 757px) 100vw, 757px\" \/><\/figure><\/div>\n\n\n<p>Finally, your command bar on the bottom of VS Code should have similar options selected.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"498\" height=\"28\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Check-All-the-Configured-Settings-UART-COM-Port-Target-Board.png?resize=498%2C28&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"VS Code ESP-IDF Check All the Configured Settings UART COM Port Target Board\" class=\"wp-image-170147\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Check-All-the-Configured-Settings-UART-COM-Port-Target-Board.png?w=498&amp;quality=100&amp;strip=all&amp;ssl=1 498w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Check-All-the-Configured-Settings-UART-COM-Port-Target-Board.png?resize=300%2C17&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 498px) 100vw, 498px\" \/><\/figure><\/div>\n\n\n<p>For this guide we won&#8217;t be writing any code or modifying the existing example code, so you can just <strong>Build Project<\/strong> by clicking the wrench icon as shown in the image below.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"940\" height=\"535\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Build-Project-Hello-World-ESP32-ESP-IDF.png?resize=940%2C535&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"VS Code Build Project Hello World ESP32 ESP-IDF\" class=\"wp-image-170146\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Build-Project-Hello-World-ESP32-ESP-IDF.png?w=940&amp;quality=100&amp;strip=all&amp;ssl=1 940w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Build-Project-Hello-World-ESP32-ESP-IDF.png?resize=300%2C171&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Build-Project-Hello-World-ESP32-ESP-IDF.png?resize=768%2C437&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 940px) 100vw, 940px\" \/><\/figure><\/div>\n\n\n<p>The first time you build a project it usually takes a bit more time, but once completed it should print a similar message in the <strong>Terminal<\/strong> menu and show a &#8220;<strong>Build Successfully<\/strong>&#8221; message.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"836\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Build-Hello-Wolrd-Project-ESP32-ESP-IDF-Success-Message.jpg?resize=900%2C836&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"VS Code Build Hello World Project ESP32 ESP-IDF Success Message\" class=\"wp-image-170145\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Build-Hello-Wolrd-Project-ESP32-ESP-IDF-Success-Message.jpg?w=900&amp;quality=100&amp;strip=all&amp;ssl=1 900w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Build-Hello-Wolrd-Project-ESP32-ESP-IDF-Success-Message.jpg?resize=300%2C279&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Build-Hello-Wolrd-Project-ESP32-ESP-IDF-Success-Message.jpg?resize=768%2C713&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/figure><\/div>\n\n\n<p>This is the final step, you can now Flash the Hello World ESP-IDF project to the ESP32 by clicking the &#8220;<strong>Flash Device<\/strong>&#8221; button that has a thunder icon.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"848\" height=\"170\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Flash-Hello-World-Code-Project-to-ESP32-ESP-IDF.png?resize=848%2C170&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"VS Code Flash Hello World Code Project to ESP32 ESP-IDF\" class=\"wp-image-170294\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Flash-Hello-World-Code-Project-to-ESP32-ESP-IDF.png?w=848&amp;quality=100&amp;strip=all&amp;ssl=1 848w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Flash-Hello-World-Code-Project-to-ESP32-ESP-IDF.png?resize=300%2C60&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Flash-Hello-World-Code-Project-to-ESP32-ESP-IDF.png?resize=768%2C154&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 848px) 100vw, 848px\" \/><\/figure><\/div>\n\n\n<p>Depending on your board, you might need to hold the on-board BOOT button on your ESP32 to put into flashing mode and once the process is completed, it will popup a info message saying &#8220;<strong>Flash Done<\/strong>&#8220;.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"575\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Flash-Hello-Wolrd-Project-to-ESP32-ESP-IDF-Done-Success-Message.png?resize=1024%2C575&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"VS Code Flash Hello World Project to ESP32 ESP-IDF Done Success Message\" class=\"wp-image-170155\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Flash-Hello-Wolrd-Project-to-ESP32-ESP-IDF-Done-Success-Message.png?resize=1024%2C575&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Flash-Hello-Wolrd-Project-to-ESP32-ESP-IDF-Done-Success-Message.png?resize=300%2C168&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Flash-Hello-Wolrd-Project-to-ESP32-ESP-IDF-Done-Success-Message.png?resize=768%2C431&amp;quality=100&amp;strip=all&amp;ssl=1 768w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Flash-Hello-Wolrd-Project-to-ESP32-ESP-IDF-Done-Success-Message.png?w=1039&amp;quality=100&amp;strip=all&amp;ssl=1 1039w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>If you followed all the steps, the Hello World Code should be running successfully in your board. This example only gives you feedback by printing a message in the &#8220;Terminal&#8221; window, so you need to open it. Click the &#8220;<strong>Monitor Device<\/strong>&#8221; tool that is illustrated with a screen icon.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"780\" height=\"77\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Open-Terminal-Window-Monitor-Device-ESP32-ESP-IDF.png?resize=780%2C77&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"VS Code Open Terminal Window Monitor Device ESP32 ESP-IDF\" class=\"wp-image-170157\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Open-Terminal-Window-Monitor-Device-ESP32-ESP-IDF.png?w=780&amp;quality=100&amp;strip=all&amp;ssl=1 780w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Open-Terminal-Window-Monitor-Device-ESP32-ESP-IDF.png?resize=300%2C30&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Open-Terminal-Window-Monitor-Device-ESP32-ESP-IDF.png?resize=768%2C76&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 780px) 100vw, 780px\" \/><\/figure><\/div>\n\n\n<p>The terminal should be printing a message saying &#8220;<strong>Hello world!<\/strong>&#8220;, some details about your board, and then it restarts after 10 seconds. This process is repeated indefinitely.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"906\" height=\"550\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Open-Terminal-Window-Test-Hellow-World-ESP32-ESP-IDF-Project.png?resize=906%2C550&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"VS Code Open Terminal Window Test Hello World ESP32 ESP-IDF Project\" class=\"wp-image-170158\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Open-Terminal-Window-Test-Hellow-World-ESP32-ESP-IDF-Project.png?w=906&amp;quality=100&amp;strip=all&amp;ssl=1 906w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Open-Terminal-Window-Test-Hellow-World-ESP32-ESP-IDF-Project.png?resize=300%2C182&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/VS-Code-Open-Terminal-Window-Test-Hellow-World-ESP32-ESP-IDF-Project.png?resize=768%2C466&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 906px) 100vw, 906px\" \/><\/figure><\/div>\n\n\n<p>Your board is now running a basic example. You can modify this line in the <em>hello_world_main.c<\/em> file to print a different message in the Terminal window:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>printf(\"Hello world!\\n\");<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting &#8211; Common Problems Solved<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">COM Port Not Available &#8211; Installing Drivers<\/h4>\n\n\n\n<p>If you don&#8217;t see your ESP&#8217;s COM port available, it means you don&#8217;t have the drivers installed. Take a closer look at the chip next to the voltage regulator on the board and check its name. The ESP32 DEVKIT V1 DOIT board uses the&nbsp;CP2102 chip. Alternatively, many ESP32 boards also use the CH340 drivers.<\/p>\n\n\n\n<p>After they are installed, restart VS Code, and you should see the COM port in the <strong>Devices<\/strong> menu.<\/p>\n\n\n\n<p>If you\u2019re having trouble installing the CP210x drivers, you can check the following tutorials:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/randomnerdtutorials.com\/install-esp32-esp8266-usb-drivers-cp210x-windows\/\">Install ESP32 USB Drivers \u2013 CP210x USB to UART Bridge (Windows PC)<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/install-esp32-esp8266-usb-drivers-cp210x-mac-os\/\">Install ESP32 USB Drivers \u2013 CP210x USB to UART Bridge (Mac OS X)<\/a><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Failed to Flash Your Board<\/h4>\n\n\n\n<p>If you get the following error while uploading the code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\"<strong>Connecting........... <em>A fatal error occurred: Failed to connect to ESP32-S3: No serial data received.<\/em><\/strong>\" <\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1013\" height=\"346\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/ESP-IDF-Connecting-A-fatal-error-occurred-failed-to-connect-to-ESP32-S3.png?resize=1013%2C346&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP-IDF Connecting A fatal error occurred failed to connect to ESP32-S3\" class=\"wp-image-170309\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/ESP-IDF-Connecting-A-fatal-error-occurred-failed-to-connect-to-ESP32-S3.png?w=1013&amp;quality=100&amp;strip=all&amp;ssl=1 1013w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/ESP-IDF-Connecting-A-fatal-error-occurred-failed-to-connect-to-ESP32-S3.png?resize=300%2C102&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/ESP-IDF-Connecting-A-fatal-error-occurred-failed-to-connect-to-ESP32-S3.png?resize=768%2C262&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 1013px) 100vw, 1013px\" \/><\/figure><\/div>\n\n\n<p>It usually means that your board is not in flashing mode when you&#8217;re uploading the code.&nbsp;<\/p>\n\n\n\n<p>When this happens, you need to press the ESP32 on-board BOOT button when you start seeing many dots in the debugging window.<\/p>\n\n\n\n<p>For more information about this issue, you can follow this guide:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/randomnerdtutorials.com\/solved-failed-to-connect-to-esp32-timed-out-waiting-for-packet-header\/\">[SOLVED] Failed to connect to ESP32: Timed out waiting for packet header<\/a><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Wrong Chip Argument<\/h4>\n\n\n\n<p>If you get the following error while uploading the code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong><em>A fatal error occurred: This chip is ESP32-S3 not ESP32. Wrong --chip argument?<\/em><\/strong><\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"821\" height=\"361\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/ESP-IDF-A-fatal-error-occurred-This-chip-is-ESP32-S3-not-ESP32-Wrong-chip.png?resize=821%2C361&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP-IDF A fatal error occurred This chip is ESP32-S3 not ESP32 Wrong chip\" class=\"wp-image-170310\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/ESP-IDF-A-fatal-error-occurred-This-chip-is-ESP32-S3-not-ESP32-Wrong-chip.png?w=821&amp;quality=100&amp;strip=all&amp;ssl=1 821w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/ESP-IDF-A-fatal-error-occurred-This-chip-is-ESP32-S3-not-ESP32-Wrong-chip.png?resize=300%2C132&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/ESP-IDF-A-fatal-error-occurred-This-chip-is-ESP32-S3-not-ESP32-Wrong-chip.png?resize=768%2C338&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 821px) 100vw, 821px\" \/><\/figure><\/div>\n\n\n<p>You might need to confirm if you&#8217;ve selected the correct target device, or check the exact chip that your ESP32 board has. Then, select the correct chip, build the code again and flash it to your board.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Wrapping Up<\/h2>\n\n\n\n<p>In this tutorial, you learned how to program the ESP32 with the ESP-IDF framework using VS Code. ESP-IDF is the official way, developed by Espressif, to program ESP32 boards. While it gives you more control over your hardware, it&#8217;s also much more complex to use and requires more knowledge about the hardware and configurations.<\/p>\n\n\n\n<p>This was a basic guide to get you started. We hope you found it useful. Let us know if you&#8217;d like to see more tutorials for ESP-IDF.<\/p>\n\n\n\n<p>Meanwhile, you can check our ESP32 resources (with Arduino IDE) to learn more about the ESP32 board:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/randomnerdtutorials.com\/esp32-cam-projects-ebook\/\">Learn ESP32 with Arduino IDE (eBook)<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/projects-esp32\/\">More ESP32 Projects and Tutorials\u2026<\/a><\/li>\n<\/ul>\n\n\n\n<p>Thanks for reading.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to program the ESP32 boards with the ESP-IDF (Espressif IoT Development Framework). The ESP-IDF was developed by Espressif and it is intended for development of Internet of Things &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Programming ESP32 with ESP-IDF using VS Code &#8211; Getting Started Guide\" class=\"read-more button\" href=\"https:\/\/randomnerdtutorials.com\/programming-esp32-esp-idf-vs-code\/#more-170029\" aria-label=\"Read more about Programming ESP32 with ESP-IDF using VS Code &#8211; Getting Started Guide\">CONTINUE READING \u00bb<\/a><\/p>\n","protected":false},"author":1,"featured_media":170352,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[305,327,328,264],"tags":[],"class_list":["post-170029","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-0-other","category-esp-idf","category-esp32-esp-idf","category-project"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2025\/05\/ESP32-ESP-IDF-Getting-Started.jpg?fit=1920%2C1080&quality=100&strip=all&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/170029","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/comments?post=170029"}],"version-history":[{"count":16,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/170029\/revisions"}],"predecessor-version":[{"id":170546,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/170029\/revisions\/170546"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media\/170352"}],"wp:attachment":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media?parent=170029"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/categories?post=170029"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/tags?post=170029"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}