File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -311,6 +311,10 @@ int __attribute__((used)) main(void) {
311311 filesystem_writable_by_python (true);
312312 f_open (fs , boot_output_file , CIRCUITPY_BOOT_OUTPUT_FILE , FA_WRITE | FA_CREATE_ALWAYS );
313313
314+ // Switch the filesystem back to non-writable now instead of later,
315+ // since boot.py might change it back to writable.
316+ filesystem_writable_by_python (false);
317+
314318 // Write version info to boot_out.txt.
315319 mp_hal_stdout_tx_str (MICROPY_FULL_VERSION_INFO );
316320 mp_hal_stdout_tx_str ("\r\n" );
@@ -327,7 +331,6 @@ int __attribute__((used)) main(void) {
327331 filesystem_flush ();
328332 boot_output_file = NULL ;
329333 }
330- filesystem_writable_by_python (false);
331334 #endif
332335
333336 // 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