diff options
| author | Scott Shawcroft <scott@adafruit.com> | 2020-01-13 13:47:55 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-13 13:47:55 -0800 |
| commit | 2eb26a6d0b48fb82932190f67475ec101969d3ac (patch) | |
| tree | e41bbf88c1b54beca70ffedff3e72bf4713de922 | |
| parent | 6ea1785457057e83ce9892f7227fbed3e55b22ab (diff) | |
| parent | 10eed78dd8047f406d3be26f540e39eecba437c7 (diff) | |
Merge pull request #2457 from hierophect/stm32-cpython-compat
STM32: Cpython compatibility flag 2
| -rw-r--r-- | ports/stm32f4/mpconfigport.mk | 4 | ||||
| -rw-r--r-- | py/circuitpy_mpconfig.h | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/ports/stm32f4/mpconfigport.mk b/ports/stm32f4/mpconfigport.mk index 42f390572..f214282cb 100644 --- a/ports/stm32f4/mpconfigport.mk +++ b/ports/stm32f4/mpconfigport.mk @@ -69,9 +69,7 @@ ifndef CIRCUITPY_DISPLAYIO CIRCUITPY_DISPLAYIO = 1 endif -ifndef MICROPY_CPYTHON_COMPAT -MICROPY_CPYTHON_COMPAT = 1 -endif +CFLAGS += -DMICROPY_CPYTHON_COMPAT=1 #ifeq ($(MCU_SUB_VARIANT), stm32f412zx) #endif diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 8c7454cf2..5b705a088 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -182,7 +182,10 @@ typedef long mp_off_t; // Remove some lesser-used functionality to make small builds fit. #define MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG (CIRCUITPY_FULL_BUILD) -#define MICROPY_CPYTHON_COMPAT (CIRCUITPY_FULL_BUILD) +//TODO: replace this with a rework of the FULL_BUILD system +#if !defined(MICROPY_CPYTHON_COMPAT) + #define MICROPY_CPYTHON_COMPAT (CIRCUITPY_FULL_BUILD) +#endif #define MICROPY_MODULE_WEAK_LINKS (CIRCUITPY_FULL_BUILD) #define MICROPY_PY_ALL_SPECIAL_METHODS (CIRCUITPY_FULL_BUILD) #define MICROPY_PY_BUILTINS_COMPLEX (CIRCUITPY_FULL_BUILD) |
