atmel-samd/samd21: Enable long int on Express boards
This is necessary for using 1970 epoch in the time module.
This commit is contained in:
parent
1eb412b44d
commit
cf33ad9a54
@ -1,6 +1,9 @@
|
||||
#define MICROPY_HW_BOARD_NAME "Adafruit CircuitPlayground Express"
|
||||
#define MICROPY_HW_MCU_NAME "samd21g18"
|
||||
|
||||
#define MICROPY_LONGINT_IMPL MICROPY_LONGINT_IMPL_MPZ
|
||||
#define MP_SSIZE_MAX 0x7fffffff
|
||||
|
||||
// Don't allow touch on A0 (PA02), because it's connected to the speaker.
|
||||
#define PA02_NO_TOUCH (true)
|
||||
|
||||
|
@ -9,6 +9,8 @@ SPI_FLASH_FILESYSTEM = 1
|
||||
CHIP_VARIANT = SAMD21G18A
|
||||
CHIP_FAMILY = samd21
|
||||
|
||||
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz
|
||||
|
||||
# Include these Python libraries in firmware.
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_CircuitPlayground
|
||||
|
@ -1,6 +1,9 @@
|
||||
#define MICROPY_HW_BOARD_NAME "Adafruit Feather M0 Express"
|
||||
#define MICROPY_HW_MCU_NAME "samd21g18"
|
||||
|
||||
#define MICROPY_LONGINT_IMPL MICROPY_LONGINT_IMPL_MPZ
|
||||
#define MP_SSIZE_MAX 0x7fffffff
|
||||
|
||||
#define MICROPY_HW_NEOPIXEL (&pin_PA06)
|
||||
|
||||
// Clock rates are off: Salae reads 12MHz which is the limit even though we set it to the safer 8MHz.
|
||||
|
@ -8,3 +8,5 @@ SPI_FLASH_FILESYSTEM = 1
|
||||
|
||||
CHIP_VARIANT = SAMD21G18A
|
||||
CHIP_FAMILY = samd21
|
||||
|
||||
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz
|
||||
|
@ -1,6 +1,9 @@
|
||||
#define MICROPY_HW_BOARD_NAME "Adafruit Itsy Bitsy M0 Express"
|
||||
#define MICROPY_HW_MCU_NAME "samd21g18"
|
||||
|
||||
#define MICROPY_LONGINT_IMPL MICROPY_LONGINT_IMPL_MPZ
|
||||
#define MP_SSIZE_MAX 0x7fffffff
|
||||
|
||||
#define CIRCUITPY_BITBANG_APA102
|
||||
#define MICROPY_HW_APA102_MOSI (&pin_PA01)
|
||||
#define MICROPY_HW_APA102_SCK (&pin_PA00)
|
||||
|
@ -9,3 +9,4 @@ SPI_FLASH_FILESYSTEM = 1
|
||||
CHIP_VARIANT = SAMD21G18A
|
||||
CHIP_FAMILY = samd21
|
||||
|
||||
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz
|
||||
|
@ -1,6 +1,9 @@
|
||||
#define MICROPY_HW_BOARD_NAME "Adafruit Metro M0 Express"
|
||||
#define MICROPY_HW_MCU_NAME "samd21g18"
|
||||
|
||||
#define MICROPY_LONGINT_IMPL MICROPY_LONGINT_IMPL_MPZ
|
||||
#define MP_SSIZE_MAX 0x7fffffff
|
||||
|
||||
#define MICROPY_HW_LED_TX PIN_PA27
|
||||
//#define MICROPY_HW_LED_RX PIN_PA31
|
||||
|
||||
|
@ -8,3 +8,5 @@ SPI_FLASH_FILESYSTEM = 1
|
||||
|
||||
CHIP_VARIANT = SAMD21G18A
|
||||
CHIP_FAMILY = samd21
|
||||
|
||||
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz
|
||||
|
@ -141,8 +141,10 @@ typedef long mp_off_t;
|
||||
#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.
|
||||
#ifndef MICROPY_LONGINT_IMPL
|
||||
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_NONE)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef SAMD51
|
||||
#define CIRCUITPY_MCU_FAMILY samd51
|
||||
|
@ -2,8 +2,10 @@
|
||||
# $(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)
|
||||
ifndef MPY_TOOL_LONGINT_IMPL
|
||||
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=none
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CHIP_FAMILY), samd51)
|
||||
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz
|
||||
|
Loading…
x
Reference in New Issue
Block a user