# ESP32-S2 Wont flash

**URL:** <https://wled.discourse.group/t/esp32-s2-wont-flash/11132>\
**Category:** Issues\
**Created:** [February 15, 2024, 7:32pm UTC](https://wled.discourse.group/t/esp32-s2-wont-flash/11132 "2024-02-15T19:32:16Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![blazoncek](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/blazoncek/32/1886_2.png) [@blazoncek](https://wled.discourse.group/u/blazoncek)\
**Post date:** [February 16, 2024, 11:09am UTC](https://wled.discourse.group/t/esp32-s2-wont-flash/11132/8 "2024-02-16T11:09:08Z")

</div>

You need to:

1. esptool erase\_flash (optional, if flash contains non WLED code)
2. esptool write\_flash 0x0 bootloader.bin (optional, if bootloader is too old or missing after erase\_flash)
3. esptool write\_flash 0x8000 partitions.bin (optional, if partitions are incompatible with WLED)
4. esptool write\_flash 0x10000 wled.bin

You **don’t** need to disconnect or reboot ESP after each operation.  
You may need to compile bootloader binary and/or partition map yourself.

Please see:  
[https://docs.espressif.com/projects/esptool/en/latest/esp32/esptool/basic-commands.html](https://docs.espressif.com/projects/esptool/en/latest/esp32/esptool/basic-commands.html)  
[https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/bootloader.html](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/bootloader.html)  
[https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/partition-tables.html](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/partition-tables.html)

---

_[View the full topic](https://wled.discourse.group/t/esp32-s2-wont-flash/11132)._
