2021-01-26 21:19:14 +07:00
|
|
|
UF2_FAMILY_ID = 0xADA52840
|
2023-09-11 16:44:06 +07:00
|
|
|
|
|
|
|
NRFX_DIR = hw/mcu/nordic/nrfx
|
2021-01-26 21:19:14 +07:00
|
|
|
|
2020-11-28 10:48:44 +07:00
|
|
|
include $(TOP)/$(BOARD_PATH)/board.mk
|
|
|
|
|
2023-05-19 18:04:08 +07:00
|
|
|
# nRF52 is cortex-m4, nRF53 is cortex-m33
|
2023-05-19 16:02:26 +07:00
|
|
|
CPU_CORE ?= cortex-m4
|
|
|
|
|
2019-05-02 18:10:06 +07:00
|
|
|
CFLAGS += \
|
2019-11-20 16:06:40 +07:00
|
|
|
-flto \
|
|
|
|
-DCFG_TUSB_MCU=OPT_MCU_NRF5X \
|
2019-05-02 18:10:06 +07:00
|
|
|
-DCONFIG_GPIO_AS_PINRESET
|
|
|
|
|
2020-05-17 14:24:15 +07:00
|
|
|
# suppress warning caused by vendor mcu driver
|
2023-11-23 12:43:13 +07:00
|
|
|
CFLAGS += \
|
|
|
|
-Wno-error=undef \
|
|
|
|
-Wno-error=unused-parameter \
|
|
|
|
-Wno-error=cast-align \
|
|
|
|
-Wno-error=cast-qual \
|
|
|
|
-Wno-error=redundant-decls
|
|
|
|
|
|
|
|
LDFLAGS += \
|
|
|
|
-specs=nosys.specs -specs=nano.specs \
|
|
|
|
-L$(TOP)/${NRFX_DIR}/mdk
|
2019-05-02 18:10:06 +07:00
|
|
|
|
|
|
|
SRC_C += \
|
2021-03-17 21:36:52 +07:00
|
|
|
src/portable/nordic/nrf5x/dcd_nrf5x.c \
|
2023-09-11 16:44:06 +07:00
|
|
|
${NRFX_DIR}/helpers/nrfx_flag32_allocator.c \
|
|
|
|
${NRFX_DIR}/drivers/src/nrfx_gpiote.c \
|
|
|
|
${NRFX_DIR}/drivers/src/nrfx_power.c \
|
|
|
|
${NRFX_DIR}/drivers/src/nrfx_spim.c \
|
|
|
|
${NRFX_DIR}/drivers/src/nrfx_uarte.c \
|
|
|
|
${NRFX_DIR}/mdk/system_$(MCU_VARIANT).c
|
2019-05-02 18:10:06 +07:00
|
|
|
|
|
|
|
INC += \
|
2020-11-28 00:16:28 +07:00
|
|
|
$(TOP)/$(BOARD_PATH) \
|
2021-03-02 01:18:05 +07:00
|
|
|
$(TOP)/lib/CMSIS_5/CMSIS/Core/Include \
|
2023-09-11 16:44:06 +07:00
|
|
|
$(TOP)/${NRFX_DIR} \
|
|
|
|
$(TOP)/${NRFX_DIR}/mdk \
|
|
|
|
$(TOP)/${NRFX_DIR}/hal \
|
|
|
|
$(TOP)/${NRFX_DIR}/drivers/include \
|
|
|
|
$(TOP)/${NRFX_DIR}/drivers/src \
|
2019-05-02 18:10:06 +07:00
|
|
|
|
2023-09-11 16:44:06 +07:00
|
|
|
SRC_S += ${NRFX_DIR}/mdk/gcc_startup_$(MCU_VARIANT).S
|
2019-05-02 18:10:06 +07:00
|
|
|
|
|
|
|
ASFLAGS += -D__HEAP_SIZE=0
|
|
|
|
|
|
|
|
# For flash-jlink target
|
2023-05-15 16:51:06 +07:00
|
|
|
JLINK_DEVICE ?= $(MCU_VARIANT)_xxaa
|