From 4df083a961ab11290808549ac1f356a467d70d4d Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 21 Jan 2022 12:37:10 -0800 Subject: [PATCH] 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 --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 9bda03f844..b4537b1d69 100644 --- a/main.c +++ b/main.c @@ -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);