Skip to content

Commit 49b8579

Browse files
committed
Request UF2 bootloader when resetting using the 'serial trick'
1 parent 9b32d54 commit 49b8579

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"
@@ -263,6 +265,7 @@ void reset_port(void) {
263265
}
264266

265267
void reset_to_bootloader(void) {
268+
common_hal_mcu_on_next_reset(RUNMODE_UF2);
266269
esp_restart();
267270
}
268271

0 commit comments

Comments
 (0)