Skip to content

Commit 2eb26a6

Browse files
authored
Merge pull request adafruit#2457 from hierophect/stm32-cpython-compat
STM32: Cpython compatibility flag 2
2 parents 6ea1785 + 10eed78 commit 2eb26a6

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

ports/stm32f4/mpconfigport.mk

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ ifndef CIRCUITPY_DISPLAYIO
6969
CIRCUITPY_DISPLAYIO = 1
7070
endif
7171

72-
ifndef MICROPY_CPYTHON_COMPAT
73-
MICROPY_CPYTHON_COMPAT = 1
74-
endif
72+
CFLAGS += -DMICROPY_CPYTHON_COMPAT=1
7573

7674
#ifeq ($(MCU_SUB_VARIANT), stm32f412zx)
7775
#endif

py/circuitpy_mpconfig.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,10 @@ typedef long mp_off_t;
182182

183183
// Remove some lesser-used functionality to make small builds fit.
184184
#define MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG (CIRCUITPY_FULL_BUILD)
185-
#define MICROPY_CPYTHON_COMPAT (CIRCUITPY_FULL_BUILD)
185+
//TODO: replace this with a rework of the FULL_BUILD system
186+
#if !defined(MICROPY_CPYTHON_COMPAT)
187+
#define MICROPY_CPYTHON_COMPAT (CIRCUITPY_FULL_BUILD)
188+
#endif
186189
#define MICROPY_MODULE_WEAK_LINKS (CIRCUITPY_FULL_BUILD)
187190
#define MICROPY_PY_ALL_SPECIAL_METHODS (CIRCUITPY_FULL_BUILD)
188191
#define MICROPY_PY_BUILTINS_COMPLEX (CIRCUITPY_FULL_BUILD)

0 commit comments

Comments
 (0)