8000 Merge pull request #812 from dhalbert/2.x-filesystem-writability-on-boot · flummer/circuitpython@6e95c90 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6e95c90

Browse files
authored
Merge pull request adafruit#812 from dhalbert/2.x-filesystem-writability-on-boot
2.x: Fix regression preventing remount as readwrite in boot.py
2 parents 3814e97 + 44ea91d commit 6e95c90

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

atmel-samd/main.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,11 @@ int main(void) {
762762
// USB isn't up, so we can write the file.
763763
flash_set_usb_writeable(false);
764764
f_open(fs, boot_output_file, CIRCUITPY_BOOT_OUTPUT_FILE, FA_WRITE | FA_CREATE_ALWAYS);
765+
766+
// Switch the filesystem back to non-writable by Python now instead of later,
767+
// since boot.py might change it back to writable.
768+
flash_set_usb_writeable(true);
769+
765770
// Write version info to boot_out.txt.
766771
mp_hal_stdout_tx_str(MICROPY_FULL_VERSION_INFO);
767772
mp_hal_stdout_tx_str("\r\n");
@@ -779,7 +784,6 @@ int main(void) {
779784
flash_flush();
780785
boot_output_file = NULL;
781786
}
782-
flash_set_usb_writeable(true);
783787
#endif
784788

785789
// Reset to remove any state that boot.py setup. It should only be used to

0 commit comments

Comments
 (0)
0