We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3814e97 commit 44ea91dCopy full SHA for 44ea91d
1 file changed
atmel-samd/main.c
@@ -762,6 +762,11 @@ int main(void) {
762
// USB isn't up, so we can write the file.
763
flash_set_usb_writeable(false);
764
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
770
// Write version info to boot_out.txt.
771
mp_hal_stdout_tx_str(MICROPY_FULL_VERSION_INFO);
772
mp_hal_stdout_tx_str("\r\n");
@@ -779,7 +784,6 @@ int main(void) {
779
784
flash_flush();
780
785
boot_output_file = NULL;
781
786
}
782
- flash_set_usb_writeable(true);
783
787
#endif
788
789
// Reset to remove any state that boot.py setup. It should only be used to
0 commit comments