Back to Troubleshooting

ESP32 Upload Success But No Code Execution

Fix cases where your ESP32 uploads code successfully but fails to start the sketch. Learn how to troubleshoot bootloader hangups, reset circuit issues, and startup code that causes silent reboots or sleep before output appears.

Common Causes

  • ⏹️

    Board Stuck in Bootloader Mode

    Some ESP32 boards remain in bootloader mode after upload and require a manual reset to begin running the sketch.

  • 🧰

    Faulty or Missing EN/RESET Circuit

    Custom or minimal boards may lack proper circuitry to automatically exit programming mode after flashing.

  • ⚙️

    Sketch Never Reaches `setup()`

    A crash or watchdog reset early in execution may prevent visible signs of code running, even though upload succeeds.

  • 🔄

    Code Immediately Triggers Deep Sleep or Reboot

    Some sketches intentionally enter sleep or reset too quickly to show any output unless carefully timed.

Symptoms

Upload Succeeds But No Output or Behavior

IDE confirms code upload, but the ESP32 shows no signs of running — no LED activity, no serial output, no expected behavior. However, in case of no serial output, it could be issue with the Serial.

Manual Reset Starts the Sketch

Pressing the RESET/EN button after uploading causes the sketch to run correctly, confirming the board stayed in bootloader mode.

Board Always Resets to Bootloader After Power-On

The board enters flashing mode on every boot due to pull-down on GPIO0 or improper EN/IO0 handling.

Solutions

Press RESET Manually After Upload

Press the EN (RESET) button on your ESP32 to exit bootloader mode and start running the sketch if it doesn’t auto-start.

Check EN and IO0 Circuit

Ensure proper pull-ups, capacitors, and transistor reset logic on EN and IO0 pins. Some clone or minimal boards omit these components.

Add Serial Debugging and Delay at Start

Add a delay and serial prints to confirm whether setup() is reached and to give time for the serial monitor to connect:

void setup() {
  Serial.begin(115200);
  delay(1000);
  Serial.println("Setup started");
}

Inspect Sketch for Sleep or Reset Behavior

Check for calls to esp_deep_sleep_start(), ESP.restart(), or unhandled exceptions that may cause silent reboot or shutdown.

More Details

ESP32 Upload Success But No Code Execution #

You've successfully uploaded your sketch, but... nothing happens. No LED blink, no serial output, no expected behavior.

This issue often points to the ESP32 staying in bootloader mode after flashing, or silently crashing on startup before reaching setup().

Let’s go step-by-step to figure out what’s going on.

What You’ll See #

  • Upload completes normally in Arduino IDE or PlatformIO
  • Serial monitor shows nothing after upload
  • RESET/EN button does start the program
  • LED doesn’t blink or respond even if you’re sure the code is correct
  • Board powers up into bootloader every time it resets

Common Causes #

⏹️ Stuck in Bootloader #

The ESP32 may remain in bootloader mode after uploading firmware, especially on boards without proper reset circuitry or when upload timing fails.

🧰 Faulty EN/IO0 Circuit #

Minimal boards (like some ESP32-CAMs or hand-soldered modules) may lack proper pull-up resistors, capacitors, or the auto-reset circuit required to toggle EN and IO0 properly.

⚙️ Sketch Never Starts #

A crash or infinite loop before Serial.begin() can make it seem like nothing happened. In rare cases, a misconfigured memory layout or out-of-bounds array can reset the CPU before any visible effect.

🔄 Code Sleeps or Resets Immediately #

If the code immediately enters deep sleep or triggers ESP.restart(), you might miss the startup activity entirely.

How to Fix It #

✅ 1. Press the RESET/EN Button
After upload, press the EN (reset) button on your board to force it to exit bootloader and run your sketch.

✅ 2. Add Serial Output and Delay at Startup

void setup() {
Serial.begin(115200);
delay(1000); // let Serial stabilize
Serial.println("Setup started");
}

This helps confirm if setup() runs at all.

✅ 3. Check for Deep Sleep or Restart Calls

Look for any lines like:

esp_deep_sleep_start();
ESP.restart();

If these are executed immediately, your board will reboot or sleep before you see anything.

✅ 4. Inspect Your Hardware Reset Circuit

Ensure the EN pin has:

  • A 10kΩ pull-up resistor
  • A 0.1µF capacitor between EN and GND
  • A functioning auto-reset transistor if your board supports it

Boards without these may not exit bootloader without a manual reset.

✅ 5. Test with Known-Good Sketch

Try uploading the classic Blink sketch or another minimal example to eliminate firmware-specific causes.

Summary #

If your ESP32 uploads but doesn’t seem to run, it’s probably staying in bootloader mode or crashing early. Start with a manual reset, add debugging output, and check your hardware configuration.

Still Stuck with an ESP32 Issue? Let's solve it together.

Our interactive troubleshooting wizard will guide you through common ESP32 problems and their solutions, step by step.

No registration required. Start solving issues right away!