nrf/main: Call usb_cdc_init() before executing boot.py and main.py.

Otherwise, there is no USB available when running main.py, and main.py
cannot be interrupted with Ctrl-C.
pull/8936/head
robert-hh 2022-07-20 08:08:24 +02:00 zatwierdzone przez Damien George
rodzic 768cbea507
commit 2e2fc8f60f
1 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -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) {