Skip to content

Commit dab35f7

Browse files
authored
Merge pull request #5880 from jepler/espressif-serial-trick-uf2
Request ROM bootloader when resetting using the 'serial trick'
2 parents 19b59b0 + ea30a8a commit dab35f7

File tree

1 file changed

+3
-0
lines changed
  • ports/espressif/supervisor

1 file changed

+3
-0
lines changed

ports/espressif/supervisor/port.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151
#include "supervisor/background_callback.h"
5252
#include "supervisor/memory.h"
5353
#include "supervisor/shared/tick.h"
54+
#include "shared-bindings/microcontroller/__init__.h"
55+
#include "shared-bindings/microcontroller/RunMode.h"
5456
#include "shared-bindings/rtc/__init__.h"
5557

5658
#include "peripherals/rmt.h"
@@ -287,6 +289,7 @@ void reset_port(void) {
287289
}
288290

289291
void reset_to_bootloader(void) {
292+
common_hal_mcu_on_next_reset(RUNMODE_BOOTLOADER);
290293
esp_restart();
291294
}
292295

0 commit comments

Comments
 (0)