aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2018-05-06 22:37:28 -0700
committerGitHub <noreply@github.com>2018-05-06 22:37:28 -0700
commit6e95c90401e280f36bd4ba3260b2886da0009886 (patch)
tree17e330ab671a92ca72b22f4c76a0c28896779214
parent3814e9701016a4ce0815b187f885fbcb15dfd065 (diff)
parent44ea91d957beb645b249eb90095ceb2342eabf27 (diff)
Merge pull request #812 from dhalbert/2.x-filesystem-writability-on-boot2.3.1
2.x: Fix regression preventing remount as readwrite in boot.py
-rw-r--r--atmel-samd/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/atmel-samd/main.c b/atmel-samd/main.c
index 0eb5a3057..5c473b211 100644
--- a/atmel-samd/main.c
+++ b/atmel-samd/main.c
@@ -762,6 +762,11 @@ int main(void) {
// USB isn't up, so we can write the file.
flash_set_usb_writeable(false);
f_open(fs, boot_output_file, CIRCUITPY_BOOT_OUTPUT_FILE, FA_WRITE | FA_CREATE_ALWAYS);
+
+ // Switch the filesystem back to non-writable by Python now instead of later,
+ // since boot.py might change it back to writable.
+ flash_set_usb_writeable(true);
+
// Write version info to boot_out.txt.
mp_hal_stdout_tx_str(MICROPY_FULL_VERSION_INFO);
mp_hal_stdout_tx_str("\r\n");
@@ -779,7 +784,6 @@ int main(void) {
flash_flush();
boot_output_file = NULL;
}
- flash_set_usb_writeable(true);
#endif
// Reset to remove any state that boot.py setup. It should only be used to