Skip to content

Commit 51701e6

Browse files
committed
Merge remote-tracking branch 'adafruit/7.2.x' into merge_7.2.2
2 parents c098474 + 704a50a commit 51701e6

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,12 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool first_run, bool *simulate_re
413413

414414
if (result.return_code & PYEXEC_RELOAD) {
415415
next_code_stickiness_situation |= SUPERVISOR_NEXT_CODE_OPT_STICKY_ON_RELOAD;
416+
// Reload immediately unless the reload is due to autoreload. In that
417+
// case, we wait below to see if any other writes occur.
418+
if (supervisor_get_run_reason() != RUN_REASON_AUTO_RELOAD) {
419+
skip_repl = true;
420+
skip_wait = true;
421+
}
416422
} else if (result.return_code == 0) {
417423
next_code_stickiness_situation |= SUPERVISOR_NEXT_CODE_OPT_STICKY_ON_SUCCESS;
418424
if (next_code_options & SUPERVISOR_NEXT_CODE_OPT_RELOAD_ON_SUCCESS) {

ports/nrf/boards/bluemicro833/mpconfigboard.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ CIRCUITPY_RE = 0
3636
CIRCUITPY_RGBMATRIX = 0
3737
CIRCUITPY_SDCARDIO = 0
3838
CIRCUITPY_SYNTHIO = 0
39+
CIRCUITPY_TRACEBACK = 0
3940
CIRCUITPY_TOUCHIO = 0
4041
CIRCUITPY_TRACEBACK = 0
4142
CIRCUITPY_ULAB = 0

supervisor/shared/reload.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ inline bool autoreload_is_enabled() {
8080
}
8181

8282
void autoreload_trigger() {
83-
if (autoreload_enabled) {
83+
if (autoreload_enabled & !autoreload_suspended) {
8484
last_autoreload_trigger = supervisor_ticks_ms32();
8585
// Guard against the rare time that ticks is 0;
8686
if (last_autoreload_trigger == 0) {

supervisor/shared/usb/usb_msc_flash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ void tud_msc_write10_complete_cb(uint8_t lun) {
216216
(void)lun;
217217

218218
// This write is complete; initiate an autoreload.
219-
autoreload_trigger();
220219
autoreload_resume(AUTORELOAD_SUSPEND_USB);
220+
autoreload_trigger();
221221
}
222222

223223
// Invoked when received SCSI_CMD_INQUIRY

0 commit comments

Comments
 (0)