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) {
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
You can’t perform that action at this time.
0 commit comments