diff --git a/ports/nrf/main.c b/ports/nrf/main.c index 091aa73f45..83466626fc 100644 --- a/ports/nrf/main.c +++ b/ports/nrf/main.c @@ -257,16 +257,16 @@ soft_reset: led_state(1, 0); + #if MICROPY_HW_USB_CDC + usb_cdc_init(); + #endif + #if MICROPY_VFS || MICROPY_MBFS || MICROPY_MODULE_FROZEN // run boot.py and main.py if they exist. pyexec_file_if_exists("boot.py"); pyexec_file_if_exists("main.py"); #endif - #if MICROPY_HW_USB_CDC - usb_cdc_init(); - #endif - for (;;) { if (pyexec_mode_kind == PYEXEC_MODE_RAW_REPL) { if (pyexec_raw_repl() != 0) {