Skip to content

Commit 55fbbdc

Browse files
committed
Allow enabling async on samd21
It was just disabled, possibly because of size considerations, but it's useful to be able to enable it explicitly for selected boards. This requires some of the settings to use ?= instead of =, and fixing a bug in the traceback module, where the chain variable is unused if exception chaining is not enabled.
1 parent acc4ee9 commit 55fbbdc

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ports/atmel-samd/mpconfigport.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ CIRCUITPY_RE ?= 0
4848
CIRCUITPY_SDCARDIO ?= 0
4949
CIRCUITPY_SYNTHIO ?= 0
5050
CIRCUITPY_TOUCHIO_USE_NATIVE ?= 1
51-
CIRCUITPY_TRACEBACK = 0
51+
CIRCUITPY_TRACEBACK ?= 0
5252
CIRCUITPY_ULAB = 0
5353
CIRCUITPY_VECTORIO = 0
5454
CIRCUITPY_ZLIB = 0
@@ -61,7 +61,7 @@ CIRCUITPY_SAFEMODE_PY ?= 0
6161
CIRCUITPY_USB_IDENTIFICATION ?= 0
6262
endif
6363

64-
MICROPY_PY_ASYNC_AWAIT = 0
64+
MICROPY_PY_ASYNC_AWAIT ?= 0
6565

6666
# We don't have room for the fonts for terminalio for certain languages,
6767
# so turn off terminalio, and if it's off and displayio is on,

shared-bindings/traceback/__init__.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ STATIC void traceback_exception_common(bool is_print_exception, mp_print_t *prin
5959
}
6060
mp_obj_t tb_obj = args[ARG_tb].u_obj;
6161
mp_obj_t limit_obj = args[ARG_limit].u_obj;
62-
bool chain = args[ARG_chain].u_bool;
6362

6463
if (args[ARG_file].u_obj != mp_const_none) {
6564
if (!is_print_exception) {
@@ -93,6 +92,8 @@ STATIC void traceback_exception_common(bool is_print_exception, mp_print_t *prin
9392
mp_obj_exception_t *exc = mp_obj_exception_get_native(value);
9493
mp_obj_traceback_t *trace_backup = exc->traceback;
9594
#if MICROPY_CPYTHON_EXCEPTION_CHAIN
95+
bool chain = args[ARG_chain].u_bool;
96+
9697
mp_obj_exception_t *context_backup = exc->context;
9798
mp_obj_exception_t *cause_backup = exc->cause;
9899

0 commit comments

Comments
 (0)