diff options
| author | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-10-31 15:46:42 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-10-31 15:46:42 -0700 |
| commit | 9db321d50550fbe4fb1348a97d34f4df86ed0981 (patch) | |
| tree | 8b2614d92c76fec938556406dcde7eb65ade6e5c | |
| parent | 268bf6f99e325acf1385b7b1dfe4ac0584c1667f (diff) | |
atmel-samd: Enable longints for M4 builds.
Fixes #110
| -rw-r--r-- | ports/atmel-samd/mpconfigport.h | 7 | ||||
| -rw-r--r-- | ports/atmel-samd/mpconfigport.mk | 7 |
2 files changed, 11 insertions, 3 deletions
diff --git a/ports/atmel-samd/mpconfigport.h b/ports/atmel-samd/mpconfigport.h index 94f4172f5..ac834acb6 100644 --- a/ports/atmel-samd/mpconfigport.h +++ b/ports/atmel-samd/mpconfigport.h @@ -58,8 +58,6 @@ #define MICROPY_PY_URANDOM_EXTRA_FUNCS (0) #define MICROPY_PY_STRUCT (0) #define MICROPY_PY_SYS (1) -// If you change MICROPY_LONGINT_IMPL, also change MPY_TOOL_LONGINT_IMPL in mpconfigport.mk. -#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_NONE) #define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT) #define MICROPY_STREAMS_NON_BLOCK (1) @@ -140,12 +138,17 @@ typedef long mp_off_t; #define CIRCUITPY_MCU_FAMILY samd21 #define MICROPY_PY_SYS_PLATFORM "Atmel SAMD21" #define PORT_HEAP_SIZE (16384 + 4096) +// If you change MICROPY_LONGINT_IMPL, also change MPY_TOOL_LONGINT_IMPL in mpconfigport.mk. +#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_NONE) #endif #ifdef SAMD51 #define CIRCUITPY_MCU_FAMILY samd51 #define MICROPY_PY_SYS_PLATFORM "MicroChip SAMD51" #define PORT_HEAP_SIZE (0x20000) // 128KiB +// If you change MICROPY_LONGINT_IMPL, also change MPY_TOOL_LONGINT_IMPL in mpconfigport.mk. +#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ) +#define MP_SSIZE_MAX (0x7fffffff) #endif // extra built in modules to add to the list of known ones diff --git a/ports/atmel-samd/mpconfigport.mk b/ports/atmel-samd/mpconfigport.mk index c3b2f22d4..0f3f399e2 100644 --- a/ports/atmel-samd/mpconfigport.mk +++ b/ports/atmel-samd/mpconfigport.mk @@ -1,7 +1,12 @@ # Define an equivalent for MICROPY_LONGINT_IMPL, to pass to $(MPY-TOOL) in py/mkrules.mk # $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers. # This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h. +ifeq ($(CHIP_FAMILY), samd21) MPY_TOOL_LONGINT_IMPL = -mlongint-impl=none +endif -INTERNAL_LIBM = 1 +ifeq ($(CHIP_FAMILY), samd51) +MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz +endif +INTERNAL_LIBM = 1 |
