File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -762,6 +762,11 @@ int main(void) {
762
762
// USB isn't up, so we can write the file.
763
763
flash_set_usb_writeable (false);
764
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
+
765
770
// Write version info to boot_out.txt.
766
771
mp_hal_stdout_tx_str (MICROPY_FULL_VERSION_INFO );
767
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
784
788
785
789
// Reset to remove any state that boot.py setup. It should only be used to
You can’t perform that action at this time.
0 commit comments