diff --git a/ports/samd/Makefile b/ports/samd/Makefile index 581762091652..fc5fa9e4375d 100644 --- a/ports/samd/Makefile +++ b/ports/samd/Makefile @@ -117,6 +117,7 @@ SHARED_SRC_C += \ shared/runtime/stdout_helpers.c \ shared/runtime/sys_stdio_mphal.c \ shared/timeutils/timeutils.c \ + shared/tinyusb/mp_cdc_common.c \ ASF4_SRC_C += $(addprefix lib/asf4/$(MCU_SERIES_LOWER)/,\ hal/src/hal_atomic.c \ diff --git a/ports/samd/modmachine.c b/ports/samd/modmachine.c index 8adc06f52654..ec3e99f163a5 100644 --- a/ports/samd/modmachine.c +++ b/ports/samd/modmachine.c @@ -74,15 +74,14 @@ STATIC mp_obj_t machine_reset(void) { } MP_DEFINE_CONST_FUN_OBJ_0(machine_reset_obj, machine_reset); -STATIC mp_obj_t machine_bootloader(void) { +NORETURN mp_obj_t machine_bootloader(size_t n_args, const mp_obj_t *args) { *DBL_TAP_ADDR = DBL_TAP_MAGIC_LOADER; #ifdef DBL_TAP_ADDR_ALT *DBL_TAP_ADDR_ALT = DBL_TAP_MAGIC_LOADER; #endif NVIC_SystemReset(); - return mp_const_none; } -MP_DEFINE_CONST_FUN_OBJ_0(machine_bootloader_obj, machine_bootloader); +STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(machine_bootloader_obj, 0, 1, machine_bootloader); STATIC mp_obj_t machine_freq(size_t n_args, const mp_obj_t *args) { if (n_args == 0) { diff --git a/ports/samd/modmachine.h b/ports/samd/modmachine.h index 792fca1b9292..e8738df4b5ed 100644 --- a/ports/samd/modmachine.h +++ b/ports/samd/modmachine.h @@ -41,4 +41,6 @@ extern const mp_obj_type_t machine_wdt_type; extern const mp_obj_type_t machine_rtc_type; #endif +NORETURN mp_obj_t machine_bootloader(size_t n_args, const mp_obj_t *args); + #endif // MICROPY_INCLUDED_SAMD_MODMACHINE_H diff --git a/ports/samd/mpconfigport.h b/ports/samd/mpconfigport.h index 878f481f4f3f..b3ca67caec61 100644 --- a/ports/samd/mpconfigport.h +++ b/ports/samd/mpconfigport.h @@ -58,7 +58,9 @@ #define MICROPY_PY_BUILTINS_HELP_TEXT samd_help_text #define MICROPY_PY_BUILTINS_HELP_MODULES (1) #define MICROPY_ENABLE_SCHEDULER (1) +#define MICROPY_SCHEDULER_STATIC_NODES (1) #define MICROPY_MODULE_WEAK_LINKS (1) +#define MICROPY_HW_USB_CDC_1200BPS_TOUCH (1) // Control over Python builtins #define MICROPY_PY_BUILTINS_BYTES_HEX (1)