user80781: I have designed and manufactured a custom PCB, with an ESP32 chip on it.
I use my FTDI cable to upload my firmware.
I have no problem to flash my firmware, and it runs with no problem. So far so good.
But then, any successive attempts to flash again is a dead end as it results into a timeout (of course I still press the boot button on my PCB).
If I take a new PCB, the first flash is OK but I cannot do it again.
Note: to make thing as simple as possible, I simply use the Arduino IDE and my do-nothing code as my firmware replacement:

void setup() {
  Serial.begin(115200);
  //Serial.setDebugOutput(true);
  Serial.println("Yo from SDL!");
}

// the loop function runs over and over again forever
int _loop = 1;

void loop() {
  Serial.print("Loop #");
  Serial.println(_loop++);  
  Serial.println();
  delay(3000); 
}

[UPDATED] Here is the schematic regarding the ESP32 and the GPIO0, GPIO2:
The schematic of the PCB regarding the boot loader
Do you have any clue?!

user4143: IO2 needs to be connected to a pulldown resistor (your buzzer FET has a pulldown on its input which does the job, which is fortunate). I would consider moving the buzzer elsewhere and keeping IO2 just for the pulldown resistor if possible.
IO0 needs a pullup resistor.
You need some way of resetting the ESP32 through pulling the EN pin low when you want to reprogram it.
Both IO0 and the EN pin are usually controlled through a combination of the DTR and RTS pins of the USB to UART adapter to do the resetting automatically. Without that you will have to manually hold IO0 LOW while briefly pulling EN low to reset the chip.

80781: <p>I have designed and manufactured a custom PCB, with an ESP32 chip on it.
I use my FTDI cable to upload my firmware.
I have no problem to flash my firmware, and it runs with no problem. So far so good.
But then, any successive attempts to flash again is a dead end as it results into a timeout (of course I still press the boot button on my PCB).</p>
<p>If I take a new PCB, the first flash is OK but I cannot do it again.</p>
<p>Note: to make thing as simple as possible, I simply use the Arduino IDE and my do-nothing code as my firmware replacement:</p>
<pre><code>
void setup() {
  Serial.begin(115200);
  //Serial.setDebugOutput(true);
  Serial.println(&quot;Yo from SDL!&quot;);
}

// the loop function runs over and over again forever
int _loop = 1;

void loop() {
  Serial.print(&quot;Loop #&quot;);
  Serial.println(_loop++);  
  Serial.println();
  delay(3000); 
}
</code></pre>
<p>[UPDATED] Here is the schematic regarding the ESP32 and the GPIO0, GPIO2:</p>
<p><a href="https://i.stack.imgur.com/3mDkP.jpg" rel="nofollow noreferrer">The schematic of the PCB regarding the boot loader</a></p>
<p>Do you have any clue?!</p>
 4143: <p>IO2 needs to be connected to a pulldown resistor (your buzzer FET has a pulldown on its input which does the job, which is fortunate). I would consider moving the buzzer elsewhere and keeping IO2 just for the pulldown resistor if possible.</p>
<p>IO0 needs a pullup resistor.</p>
<p>You need some way of resetting the ESP32 through pulling the EN pin low when you want to reprogram it.</p>
<p>Both IO0 and the EN pin are usually controlled through a combination of the DTR and RTS pins of the USB to UART adapter to do the resetting automatically. Without that you will have to manually hold IO0 LOW while briefly pulling EN low to reset the chip.</p>
