{"id":74911,"date":"2018-10-10T09:40:46","date_gmt":"2018-10-10T09:40:46","guid":{"rendered":"https:\/\/randomnerdtutorials.com\/?p=74911"},"modified":"2023-07-27T16:04:20","modified_gmt":"2023-07-27T16:04:20","slug":"flash-upload-micropython-firmware-esp32-esp8266","status":"publish","type":"post","link":"https:\/\/randomnerdtutorials.com\/flash-upload-micropython-firmware-esp32-esp8266\/","title":{"rendered":"Flash\/Upload MicroPython Firmware to ESP32 and ESP8266"},"content":{"rendered":"<p>This posts shows how to flash MicroPython firmware to ESP32\/ESP8266 boards using the uPyCraft IDE software. It works on Windows, Linux, and Mac OS X.<\/p>\n<p><!--more--><\/p>\n<p><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-74923\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/flashing-micropython-upycraft-ide-esp32-esp8266-featured.jpg?resize=1200%2C675&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"1200\" height=\"675\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/flashing-micropython-upycraft-ide-esp32-esp8266-featured.jpg?w=1280&amp;quality=100&amp;strip=all&amp;ssl=1 1280w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/flashing-micropython-upycraft-ide-esp32-esp8266-featured.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/flashing-micropython-upycraft-ide-esp32-esp8266-featured.jpg?resize=768%2C432&amp;quality=100&amp;strip=all&amp;ssl=1 768w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/flashing-micropython-upycraft-ide-esp32-esp8266-featured.jpg?resize=1024%2C576&amp;quality=100&amp;strip=all&amp;ssl=1 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>Before continuing with this tutorial, make sure you follow one of these guides to install uPyCraft IDE on your computer:<\/p>\n<ul>\n<li><a href=\"https:\/\/randomnerdtutorials.com\/install-upycraft-ide-windows-pc-instructions\/\">Windows PC &#8211; Install uPyCraft IDE<\/a><\/li>\n<li><a href=\"https:\/\/randomnerdtutorials.com\/install-upycraft-ide-mac-os-x-instructions\/\">Mac OS X &#8211; Install uPyCraft IDE<\/a><\/li>\n<li><a href=\"https:\/\/randomnerdtutorials.com\/install-upycraft-ide-linux-ubuntu-instructions\/\">Linux Ubuntu &#8211; Install uPyCraft IDE<\/a><\/li>\n<\/ul>\n<p>With uPyCraft IDE installed in your computer, you can easily flash your ESP32 or ESP8266 boards with the MicroPython firmware. This post is divided in two parts, read Part 1 or Part 2 depending on your board:<\/p>\n<ul>\n<li>Part 1 &#8211; ESP32<\/li>\n<li>Part 2 &#8211; ESP8266<\/li>\n<\/ul>\n<p><strong>Note<\/strong>: After installing MicroPython firmware on your ESP32 or ESP8266, you can go back and use Arduino IDE again. You just need to upload code using Arduino IDE. Then, if you want to use MicroPython again, you need to flash MicroPython firmware.<\/p>\n<h2>[Part 1 &#8211; ESP32] Downloading and Flashing the MicroPython Firmware on ESP32<\/h2>\n<p>To download the latest version of MicroPython firmware for the ESP32, go to the <a href=\"http:\/\/micropython.org\/download#esp32\" target=\"_blank\" rel=\"noopener noreferrer\">MicroPython Downloads page<\/a>\u00a0and scroll all the way down to the ESP32 section.<\/p>\n<p>You should see a similar web page (see figure below) with the latest link to download the ESP32<em> .bin<\/em> file &#8211; for example:<em> esp32-20181007-v1.9.4-631-g338635ccc.bin<\/em>.<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" class=\"aligncenter size-full wp-image-74948\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/micropython-firmware-download-esp32-1.png?resize=791%2C414&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"791\" height=\"414\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/micropython-firmware-download-esp32-1.png?w=791&amp;quality=100&amp;strip=all&amp;ssl=1 791w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/micropython-firmware-download-esp32-1.png?resize=300%2C157&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/micropython-firmware-download-esp32-1.png?resize=768%2C402&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 791px) 100vw, 791px\" \/><\/p>\n<p><strong>Note:<\/strong> if you&#8217;re using a different board (like a PyBoard, WiPy, or other), go to <a href=\"http:\/\/micropython.org\/downloads\" target=\"_blank\" rel=\"noopener noreferrer\">MicroPython Downloads<\/a> page and download the right firmware for your board.<\/p>\n<h3>Selecting Serial Port<\/h3>\n<p>Go to\u00a0<strong>Tools<\/strong> &gt; <strong>Serial<\/strong> and select your ESP32 COM port\u00a0(in our case it&#8217;s COM5).<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" class=\"aligncenter size-full wp-image-74920\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/uPyCraft-IDE-Select-Serial-Port-COM5.png?resize=692%2C576&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"692\" height=\"576\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/uPyCraft-IDE-Select-Serial-Port-COM5.png?w=692&amp;quality=100&amp;strip=all&amp;ssl=1 692w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/uPyCraft-IDE-Select-Serial-Port-COM5.png?resize=300%2C250&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 692px) 100vw, 692px\" \/><\/p>\n<p><span style=\"color: #ff0000;\"><strong>Important:<\/strong><\/span> if you plug your ESP32 board to your computer, but you can\u2019t find the ESP32 Port available in your uPyCraft IDE, it might be one of these two problems: <strong>1.<\/strong>\u00a0USB drivers missing or <strong>2.<\/strong>\u00a0USB cable without data wires.<\/p>\n<p><strong>1.<\/strong> If you don\u2019t see your ESP\u2019s COM port available, this often means you don\u2019t have the USB drivers installed. Take a closer look at the chip next to the voltage regulator on board and check its name.<\/p>\n<p>The <a href=\"https:\/\/makeradvisor.com\/tools\/esp32-dev-board-wi-fi-bluetooth\/\" target=\"_blank\" rel=\"noopener noreferrer\">ESP32 DEVKIT V1 DOIT<\/a> board uses the\u00a0<strong>CP2102<\/strong> chip.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-67783\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/07\/cp2102-chip-esp32.jpg?resize=750%2C379&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"750\" height=\"379\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/07\/cp2102-chip-esp32.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/07\/cp2102-chip-esp32.jpg?resize=300%2C152&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/p>\n<p>Go to Google and search for your specific chip to find the drivers and install them in your operating system.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-67784\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/07\/cp2102-driver-download-750.jpg?resize=750%2C311&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"750\" height=\"311\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/07\/cp2102-driver-download-750.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/07\/cp2102-driver-download-750.jpg?resize=300%2C124&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/p>\n<p>You can download the CP2102 drivers on the\u00a0<a href=\"https:\/\/www.silabs.com\/products\/development-tools\/software\/usb-to-uart-bridge-vcp-drivers\" target=\"_blank\" rel=\"noopener noreferrer\">Silicon Labs<\/a>\u00a0website.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-67785\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/07\/cp2102-drivers-download-site.jpg?resize=800%2C520&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"800\" height=\"520\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/07\/cp2102-drivers-download-site.jpg?w=800&amp;quality=100&amp;strip=all&amp;ssl=1 800w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/07\/cp2102-drivers-download-site.jpg?resize=300%2C195&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/07\/cp2102-drivers-download-site.jpg?resize=768%2C499&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/p>\n<p>After they are installed, restart the uPyCraft IDE and you should see the COM port in the <strong>Tools<\/strong> menu.<\/p>\n<p><strong>2.<\/strong> If you have the drivers installed, but you can&#8217;t see your device, double-check that you&#8217;re using a USB cable with data wires.<\/p>\n<p>USB cables from powerbanks often don&#8217;t have data wires (they are charge only). So, your computer will never establish a serial communication with your ESP32. Using a a proper USB cable should solve your problem.<\/p>\n<h3>Selecting the Board<\/h3>\n<p>Go to <strong>Tools<\/strong> &gt; <strong>Board<\/strong>. For this tutorial, we assume that you&#8217;re using the ESP32, so make sure you select the &#8220;<strong>esp32<\/strong>&#8221; option:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-74918\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/uPyCraft-IDE-Select-Board-ESP32.png?resize=692%2C576&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"692\" height=\"576\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/uPyCraft-IDE-Select-Board-ESP32.png?w=692&amp;quality=100&amp;strip=all&amp;ssl=1 692w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/uPyCraft-IDE-Select-Board-ESP32.png?resize=300%2C250&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 692px) 100vw, 692px\" \/><\/p>\n<h3>Flashing\/Uploading MicroPython Firmware<\/h3>\n<p>Finally, go to <strong>Tools<\/strong> &gt; <strong>BurnFirmware<\/strong> menu to flash your ESP32 with MicroPython.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-74921\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/uPyCraft-IDE-Tools-burn-Firmware.png?resize=693%2C576&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"693\" height=\"576\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/uPyCraft-IDE-Tools-burn-Firmware.png?w=693&amp;quality=100&amp;strip=all&amp;ssl=1 693w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/uPyCraft-IDE-Tools-burn-Firmware.png?resize=300%2C249&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 693px) 100vw, 693px\" \/><\/p>\n<p>Select all these options to flash the ESP32 board:<\/p>\n<ul>\n<li>board: <strong>esp32<\/strong><\/li>\n<li>burn_addr: <strong>0x1000<\/strong><\/li>\n<li>erase_flash: <strong>yes<\/strong><\/li>\n<li>com: <strong>COMX<\/strong> (in our case it&#8217;s COM5)<\/li>\n<li>Firmware: Select &#8220;<strong>Users<\/strong>&#8221; and choose the <strong>ESP32<em> .bin<\/em><\/strong> file downloaded earlier<\/li>\n<\/ul>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-74943\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/flash-firmware-esp32-prepare.png?resize=691%2C576&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"691\" height=\"576\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/flash-firmware-esp32-prepare.png?w=691&amp;quality=100&amp;strip=all&amp;ssl=1 691w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/flash-firmware-esp32-prepare.png?resize=300%2C250&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 691px) 100vw, 691px\" \/><\/p>\n<p>After pressing the &#8220;<strong>Choose<\/strong>&#8221; button, navigate to your Downloads folder and select the ESP32 <em>.bin<\/em> file:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-74915\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/select-esp32-bin-file-uPyCraft-IDE.png?resize=954%2C576&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"954\" height=\"576\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/select-esp32-bin-file-uPyCraft-IDE.png?w=954&amp;quality=100&amp;strip=all&amp;ssl=1 954w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/select-esp32-bin-file-uPyCraft-IDE.png?resize=300%2C181&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/select-esp32-bin-file-uPyCraft-IDE.png?resize=768%2C464&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 954px) 100vw, 954px\" \/><\/p>\n<p>Having all the settings selected, hold-down the &#8220;<strong>BOOT\/FLASH<\/strong>&#8221; button in your ESP32 board:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-67778\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/07\/boot-button.jpg?resize=750%2C435&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"750\" height=\"435\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/07\/boot-button.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/07\/boot-button.jpg?resize=300%2C174&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/p>\n<p>While holding down the &#8220;<strong>BOOT\/FLASH<\/strong>&#8220;, click the &#8220;<strong>ok<\/strong>&#8221; button in the burn firmware window:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-74946\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/OK-update-firmware-esp32.png?resize=452%2C282&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"452\" height=\"282\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/OK-update-firmware-esp32.png?w=452&amp;quality=100&amp;strip=all&amp;ssl=1 452w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/OK-update-firmware-esp32.png?resize=300%2C187&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 452px) 100vw, 452px\" \/><\/p>\n<p>When the &#8220;<strong>EraseFlash<\/strong>&#8221; process begins, you can release the &#8220;<strong>BOOT\/FLASH<\/strong>&#8221; button. After a few seconds, the firmware will be flashed into your ESP32 board.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-74913\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/esp8266-firmware-flashing-message.png?resize=602%2C182&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"602\" height=\"182\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/esp8266-firmware-flashing-message.png?w=602&amp;quality=100&amp;strip=all&amp;ssl=1 602w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/esp8266-firmware-flashing-message.png?resize=300%2C91&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 602px) 100vw, 602px\" \/><\/p>\n<p><strong>Note: <\/strong>if the &#8220;<strong>EraseFlash<\/strong>&#8221; bar doesn&#8217;t move and you see an error message saying &#8220;<strong>erase false.<\/strong>&#8220;, it means that your ESP32 wasn&#8217;t in flashing mode. You need to repeat all the steps described earlier and hold the &#8220;<strong>BOOT\/FLASH<\/strong>&#8221; button again to ensure that your ESP32 goes into flashing mode.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-74970\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/micropython-erase-false-message-failed.png?resize=143%2C120&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"143\" height=\"120\" \/><\/p>\n<h2>[Part 2 &#8211; ESP8266] Downloading and Flashing the MicroPython Firmware on ESP8266<\/h2>\n<p>To download the latest version of MicroPython firmware for the ESP8266, go to the <a href=\"http:\/\/micropython.org\/download#esp8266\" target=\"_blank\" rel=\"noopener noreferrer\">MicroPython Downloads page<\/a>\u00a0and scroll all the way down to the ESP8266 section.<\/p>\n<p>You should see a similar web page (see figure below) with the latest link to download the ESP8266<em> .bin<\/em> file &#8211; for example:<em> esp8266-20180511-v1.9.4.bin<\/em>.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-74942\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/micropython-firmware-download-esp8266.png?resize=791%2C398&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"791\" height=\"398\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/micropython-firmware-download-esp8266.png?w=791&amp;quality=100&amp;strip=all&amp;ssl=1 791w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/micropython-firmware-download-esp8266.png?resize=300%2C151&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/micropython-firmware-download-esp8266.png?resize=768%2C386&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 791px) 100vw, 791px\" \/><\/p>\n<p><strong>Note:<\/strong> if you&#8217;re using a different board (like a PyBoard, WiPy, or other), go to <a href=\"http:\/\/micropython.org\/downloads\" target=\"_blank\" rel=\"noopener noreferrer\">MicroPython Downloads<\/a> page and download the right firmware for your board.<\/p>\n<h3>Selecting Serial Port<\/h3>\n<p>Go to\u00a0<strong>Tools<\/strong> &gt; <strong>Serial<\/strong> and select your ESP8266 COM port\u00a0(in our case it&#8217;s COM5).<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" class=\"aligncenter size-full wp-image-74920\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/uPyCraft-IDE-Select-Serial-Port-COM5.png?resize=692%2C576&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"692\" height=\"576\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/uPyCraft-IDE-Select-Serial-Port-COM5.png?w=692&amp;quality=100&amp;strip=all&amp;ssl=1 692w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/uPyCraft-IDE-Select-Serial-Port-COM5.png?resize=300%2C250&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 692px) 100vw, 692px\" \/><\/p>\n<p><span style=\"color: #ff0000;\"><strong>Important:<\/strong><\/span> if you plug your ESP32 board to your computer, but you can\u2019t find the ESP32 Port available in your uPyCraft IDE, it might be one of these two problems: <strong>1.<\/strong>\u00a0USB drivers missing or <strong>2.<\/strong>\u00a0USB cable without data wires.<\/p>\n<p><strong>1.<\/strong> If you don\u2019t see your ESP\u2019s COM port available, this often means you don\u2019t have the USB drivers installed. Take a closer look at the chip next to the voltage regulator on board and check its name.<\/p>\n<p>The <a href=\"https:\/\/makeradvisor.com\/tools\/esp8266-esp-12e-nodemcu-wi-fi-development-board\/\" target=\"_blank\" rel=\"noopener noreferrer\">ESP8266 ESP-12E NodeMCU<\/a>\u00a0board uses the\u00a0<strong>CP2102<\/strong> chip.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-75010\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/esp8266-cp2102-driver.jpg?resize=750%2C388&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"750\" height=\"388\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/esp8266-cp2102-driver.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/esp8266-cp2102-driver.jpg?resize=300%2C155&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/p>\n<p>Go to Google and search for your specific chip to find the drivers and install them in your operating system.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-67784\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/07\/cp2102-driver-download-750.jpg?resize=750%2C311&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"750\" height=\"311\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/07\/cp2102-driver-download-750.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/07\/cp2102-driver-download-750.jpg?resize=300%2C124&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/p>\n<p>You can download the CP2102 drivers on the\u00a0<a href=\"https:\/\/www.silabs.com\/products\/development-tools\/software\/usb-to-uart-bridge-vcp-drivers\" target=\"_blank\" rel=\"noopener noreferrer\">Silicon Labs<\/a>\u00a0website.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-67785\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/07\/cp2102-drivers-download-site.jpg?resize=800%2C520&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"800\" height=\"520\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/07\/cp2102-drivers-download-site.jpg?w=800&amp;quality=100&amp;strip=all&amp;ssl=1 800w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/07\/cp2102-drivers-download-site.jpg?resize=300%2C195&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/07\/cp2102-drivers-download-site.jpg?resize=768%2C499&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/p>\n<p>After they are installed, restart the uPyCraft IDE and you should see the COM port in the <strong>Tools<\/strong> menu.<\/p>\n<p><strong>2.<\/strong> If you have the drivers installed, but you can&#8217;t see your device, double-check that you&#8217;re using a USB cable with data wires.<\/p>\n<p>USB cables from powerbanks often don&#8217;t have data wires (they are charge only). So, your computer will never establish a serial communication with your ESP8266. Using a a proper USB cable should solve your problem.<\/p>\n<h3>Selecting the Board<\/h3>\n<p>Go to <strong>Tools<\/strong> &gt; <strong>Board<\/strong>. For this tutorial, we assume that you&#8217;re using the ESP8266, so make sure you select the &#8220;<strong>esp8266<\/strong>&#8221; option:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-74919\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/uPyCraft-IDE-Select-Board-ESP8266.png?resize=692%2C576&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"692\" height=\"576\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/uPyCraft-IDE-Select-Board-ESP8266.png?w=692&amp;quality=100&amp;strip=all&amp;ssl=1 692w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/uPyCraft-IDE-Select-Board-ESP8266.png?resize=300%2C250&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 692px) 100vw, 692px\" \/><\/p>\n<h3>Flashing\/Uploading MicroPython Firmware<\/h3>\n<p>Finally, go to <strong>Tools<\/strong> &gt; <strong>BurnFirmware<\/strong> menu to flash your ESP32 with MicroPython.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-74921\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/uPyCraft-IDE-Tools-burn-Firmware.png?resize=693%2C576&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"693\" height=\"576\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/uPyCraft-IDE-Tools-burn-Firmware.png?w=693&amp;quality=100&amp;strip=all&amp;ssl=1 693w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/uPyCraft-IDE-Tools-burn-Firmware.png?resize=300%2C249&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 693px) 100vw, 693px\" \/><\/p>\n<p>Select all these options to flash the ESP8266 board:<\/p>\n<ul>\n<li>board: <strong>esp8266<\/strong><\/li>\n<li>burn_addr: <strong>0x0<\/strong><\/li>\n<li>erase_flash: <strong>yes<\/strong><\/li>\n<li>com: <strong>COMX<\/strong> (in our case it&#8217;s COM5)<\/li>\n<li>Firmware: Select &#8220;<strong>Users<\/strong>&#8221; and choose the <strong>ESP8266<em> .bin<\/em><\/strong> file downloaded earlier<\/li>\n<\/ul>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-74944\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/flash-firmware-esp8266-prepare.png?resize=692%2C576&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"692\" height=\"576\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/flash-firmware-esp8266-prepare.png?w=692&amp;quality=100&amp;strip=all&amp;ssl=1 692w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/flash-firmware-esp8266-prepare.png?resize=300%2C250&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 692px) 100vw, 692px\" \/><\/p>\n<p>After pressing the &#8220;<strong>Choose<\/strong>&#8221; button, navigate to your Downloads folder and select the ESP8266\u00a0<em>.bin<\/em> file:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-74916\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/select-esp8266-bin-file-uPyCraft-IDE.png?resize=954%2C574&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"954\" height=\"574\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/select-esp8266-bin-file-uPyCraft-IDE.png?w=954&amp;quality=100&amp;strip=all&amp;ssl=1 954w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/select-esp8266-bin-file-uPyCraft-IDE.png?resize=300%2C181&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/select-esp8266-bin-file-uPyCraft-IDE.png?resize=768%2C462&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 954px) 100vw, 954px\" \/><\/p>\n<p>Having all the settings selected, hold-down the &#8220;<strong>BOOT\/FLASH<\/strong>&#8221; button in your ESP8266 board:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-75011\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/esp8266-flash-button.jpg?resize=547%2C385&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"547\" height=\"385\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/esp8266-flash-button.jpg?w=547&amp;quality=100&amp;strip=all&amp;ssl=1 547w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/esp8266-flash-button.jpg?resize=300%2C211&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 547px) 100vw, 547px\" \/><\/p>\n<p>While holding down the &#8220;<strong>BOOT\/FLASH<\/strong>&#8220;, click the &#8220;<strong>ok<\/strong>&#8221; button in the burn firmware window:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-74945\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/OK-flash-firmware-esp8266.png?resize=452%2C282&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"452\" height=\"282\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/OK-flash-firmware-esp8266.png?w=452&amp;quality=100&amp;strip=all&amp;ssl=1 452w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/OK-flash-firmware-esp8266.png?resize=300%2C187&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 452px) 100vw, 452px\" \/><\/p>\n<p>When the &#8220;<strong>EraseFlash<\/strong>&#8221; process begins, you can release the &#8220;<strong>BOOT\/FLASH<\/strong>&#8221; button. After a few seconds, the firmware will be flashed into your ESP8266 board.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-74913\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/esp8266-firmware-flashing-message.png?resize=602%2C182&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"602\" height=\"182\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/esp8266-firmware-flashing-message.png?w=602&amp;quality=100&amp;strip=all&amp;ssl=1 602w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/esp8266-firmware-flashing-message.png?resize=300%2C91&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 602px) 100vw, 602px\" \/><\/p>\n<p><strong>Note: <\/strong>if the &#8220;<strong>EraseFlash<\/strong>&#8221; bar doesn&#8217;t move and you see an error message saying &#8220;<strong>erase false.<\/strong>&#8220;, it means that your ESP8266 wasn&#8217;t in flashing mode. You need to repeat all the steps described earlier and hold the &#8220;<strong>BOOT\/FLASH<\/strong>&#8221; button again to ensure that your ESP8266 goes into flashing mode.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-74970\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/micropython-erase-false-message-failed.png?resize=143%2C120&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"143\" height=\"120\" \/><\/p>\n<h2>Wrapping Up<\/h2>\n<p>We hope you\u2019ve found this tutorial useful. Your ESP32\/ESP8266 should now be flashed with MicroPython firmware. To learn more about MicroPython read:\u00a0<a href=\"https:\/\/randomnerdtutorials.com\/getting-started-micropython-esp32-esp8266\/\">Getting Started with MicroPython on ESP32 and ESP8266<\/a>.<\/p>\n<p>If you liked this post, you might like our next ones, so make sure you <a href=\"https:\/\/randomnerdtutorials.com\/download\/\">subscribe to the RNT blog<\/a> and download our free electronics eBooks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This posts shows how to flash MicroPython firmware to ESP32\/ESP8266 boards using the uPyCraft IDE software. It works on Windows, Linux, and Mac OS X.<\/p>\n","protected":false},"author":1,"featured_media":74923,"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":[281,265,310,309,264],"tags":[],"class_list":["post-74911","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-esp32-project","category-esp8266-project","category-micropython","category-0-esp32-micropython","category-project"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/flashing-micropython-upycraft-ide-esp32-esp8266-featured.jpg?fit=1280%2C720&quality=100&strip=all&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/74911","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=74911"}],"version-history":[{"count":4,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/74911\/revisions"}],"predecessor-version":[{"id":133774,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/74911\/revisions\/133774"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media\/74923"}],"wp:attachment":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media?parent=74911"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/categories?post=74911"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/tags?post=74911"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}