Only make CIRCUITPY readonly with USB

CIRCUITPY will be writable from CP on all non-USB boards now. This
includes micro:bit v2 and C3 boards. It should allow it to work
with serial file loading programs.

Fixes #5901
This commit is contained in:
Scott Shawcroft 2022-01-21 12:37:10 -08:00
parent 9a353a4f56
commit 4df083a961
No known key found for this signature in database
GPG Key ID: 0DFD512649C052DA
1 changed files with 1 additions and 1 deletions

2
main.c
View File

@ -838,7 +838,7 @@ int __attribute__((used)) main(void) {
// By default our internal flash is readonly to local python code and
// writable over USB. Set it here so that boot.py can change it.
filesystem_set_internal_concurrent_write_protection(true);
filesystem_set_internal_writable_by_usb(true);
filesystem_set_internal_writable_by_usb(CIRCUITPY_USB == 1);
run_boot_py(safe_mode);