2019-12-05 22:45:53 -05:00
|
|
|
# All linking can be done with this common templated linker script, which has
|
|
|
|
# parameters that vary based on chip and/or board.
|
|
|
|
LD_TEMPLATE_FILE = boards/common.template.ld
|
|
|
|
|
2019-02-15 18:55:10 -05:00
|
|
|
INTERNAL_LIBM = 1
|
2018-01-02 21:25:41 -05:00
|
|
|
|
2021-02-04 19:23:40 -05:00
|
|
|
# Number of USB endpoint pairs.
|
2021-05-13 21:49:04 -04:00
|
|
|
USB_NUM_ENDPOINT_PAIRS = 8
|
2021-02-04 19:23:40 -05:00
|
|
|
|
2019-02-17 17:29:28 -05:00
|
|
|
# All nRF ports have longints.
|
|
|
|
LONGINT_IMPL = MPZ
|
|
|
|
|
2020-04-29 23:31:34 -04:00
|
|
|
# The ?='s allow overriding in mpconfigboard.mk.
|
2019-11-22 15:44:51 -05:00
|
|
|
|
2020-04-29 23:31:34 -04:00
|
|
|
# Audio via PWM
|
2019-02-15 18:55:10 -05:00
|
|
|
CIRCUITPY_AUDIOIO = 0
|
2020-04-29 23:31:34 -04:00
|
|
|
CIRCUITPY_AUDIOBUSIO ?= 1
|
|
|
|
CIRCUITPY_AUDIOCORE ?= 1
|
|
|
|
CIRCUITPY_AUDIOMIXER ?= 1
|
|
|
|
CIRCUITPY_AUDIOPWMIO ?= 1
|
2019-11-22 15:44:51 -05:00
|
|
|
|
2020-10-15 11:15:48 -04:00
|
|
|
# Native BLEIO is not compatible with HCI _bleio.
|
|
|
|
CIRCUITPY_BLEIO_HCI = 0
|
|
|
|
|
2020-04-29 23:31:34 -04:00
|
|
|
CIRCUITPY_BLEIO ?= 1
|
2019-02-15 18:55:10 -05:00
|
|
|
|
2020-06-23 09:45:15 -04:00
|
|
|
# No I2CPeripheral implementation
|
|
|
|
CIRCUITPY_I2CPERIPHERAL = 0
|
2019-02-15 18:55:10 -05:00
|
|
|
|
2020-04-29 23:31:34 -04:00
|
|
|
CIRCUITPY_RTC ?= 1
|
2019-03-01 23:46:57 -05:00
|
|
|
|
|
|
|
# frequencyio not yet implemented
|
|
|
|
CIRCUITPY_FREQUENCYIO = 0
|
2019-03-21 11:22:58 -04:00
|
|
|
|
2021-04-08 17:36:10 -04:00
|
|
|
CIRCUITPY_ROTARYIO_SOFTENCODER = 1
|
2020-05-05 01:23:38 -04:00
|
|
|
|
2021-02-17 06:53:18 -05:00
|
|
|
# Sleep and Wakeup
|
2021-04-25 06:57:21 -04:00
|
|
|
CIRCUITPY_ALARM ?= 1
|
2021-02-17 06:53:18 -05:00
|
|
|
|
2021-05-19 19:22:07 -04:00
|
|
|
# Turn on the BLE file service
|
|
|
|
CIRCUITPY_BLE_FILE_SERVICE ?= 1
|
|
|
|
|
2021-06-25 17:58:32 -04:00
|
|
|
# Turn on the BLE serial service
|
|
|
|
CIRCUITPY_SERIAL_BLE ?= 1
|
|
|
|
|
2021-05-19 19:22:07 -04:00
|
|
|
CIRCUITPY_COMPUTED_GOTO_SAVE_SPACE ?= 1
|
|
|
|
|
2019-12-05 22:45:53 -05:00
|
|
|
# nRF52840-specific
|
|
|
|
|
2019-12-10 17:57:17 -05:00
|
|
|
ifeq ($(MCU_CHIP),nrf52840)
|
2019-12-05 22:45:53 -05:00
|
|
|
MCU_SERIES = m4
|
|
|
|
MCU_VARIANT = nrf52
|
|
|
|
MCU_SUB_VARIANT = nrf52840
|
|
|
|
|
2020-05-29 11:06:30 -04:00
|
|
|
# Fits on nrf52840 but space is tight on nrf52833.
|
|
|
|
CIRCUITPY_AESIO ?= 1
|
|
|
|
|
2022-06-13 18:36:15 -04:00
|
|
|
CIRCUITPY_RGBMATRIX ?= 1
|
|
|
|
CIRCUITPY_FRAMEBUFFERIO ?= 1
|
|
|
|
|
|
|
|
CIRCUITPY_COUNTIO ?= 1
|
|
|
|
CIRCUITPY_WATCHDOG ?= 1
|
|
|
|
|
2019-12-05 22:45:53 -05:00
|
|
|
SD ?= s140
|
|
|
|
SOFTDEV_VERSION ?= 6.1.0
|
|
|
|
|
|
|
|
BOOT_SETTING_ADDR = 0xFF000
|
|
|
|
NRF_DEFINES += -DNRF52840_XXAA -DNRF52840
|
|
|
|
|
2019-03-21 11:22:58 -04:00
|
|
|
# CircuitPython doesn't yet support NFC so force the NFC antenna pins to be GPIO.
|
|
|
|
# See https://github.com/adafruit/circuitpython/issues/1300
|
|
|
|
# Defined here because system_nrf52840.c doesn't #include any of our own include files.
|
|
|
|
CFLAGS += -DCONFIG_NFCT_PINS_AS_GPIOS
|
2019-12-05 22:45:53 -05:00
|
|
|
|
2022-05-27 15:59:54 -04:00
|
|
|
ifeq ($(INTERNAL_FLASH_FILESYSTEM),1)
|
|
|
|
OPTIMIZATION_FLAGS ?= -Os
|
2022-06-01 14:12:14 -04:00
|
|
|
CIRCUITPY_LTO = 1
|
|
|
|
CIRCUITPY_LTO_PARTITION = balanced
|
2022-05-27 15:59:54 -04:00
|
|
|
endif
|
|
|
|
|
2020-04-16 22:35:33 -04:00
|
|
|
else
|
|
|
|
ifeq ($(MCU_CHIP),nrf52833)
|
|
|
|
MCU_SERIES = m4
|
|
|
|
MCU_VARIANT = nrf52
|
|
|
|
MCU_SUB_VARIANT = nrf52833
|
|
|
|
|
2022-05-26 13:47:54 -04:00
|
|
|
# Need the space
|
|
|
|
SUPEROPT_GC ?= 0
|
|
|
|
SUPEROPT_VM ?= 0
|
|
|
|
|
2022-06-13 18:36:15 -04:00
|
|
|
CIRCUITPY_SYNTHIO ?= 0
|
|
|
|
|
2020-04-16 22:35:33 -04:00
|
|
|
SD ?= s140
|
2020-04-22 01:34:11 -04:00
|
|
|
SOFTDEV_VERSION ?= 7.0.1
|
2020-04-16 22:35:33 -04:00
|
|
|
|
|
|
|
BOOT_SETTING_ADDR = 0x7F000
|
|
|
|
NRF_DEFINES += -DNRF52833_XXAA -DNRF52833
|
|
|
|
|
2022-05-27 15:59:54 -04:00
|
|
|
OPTIMIZATION_FLAGS ?= -Os
|
|
|
|
|
2022-06-01 14:12:14 -04:00
|
|
|
CIRCUITPY_LTO = 1
|
|
|
|
CIRCUITPY_LTO_PARTITION = one
|
2022-06-13 18:36:15 -04:00
|
|
|
ifeq ($(INTERNAL_FLASH_FILESYSTEM),1)
|
|
|
|
CIRCUITPY_FULL_BUILD ?= 0
|
|
|
|
CIRCUITPY_PULSEIO ?= 1
|
|
|
|
endif
|
2020-04-16 22:35:33 -04:00
|
|
|
endif
|
2019-12-05 22:45:53 -05:00
|
|
|
endif
|