2021-01-26 21:19:14 +07:00
|
|
|
UF2_FAMILY_ID = 0xADA52840
|
2021-03-18 16:28:44 +07:00
|
|
|
DEPS_SUBMODULES += lib/CMSIS_5 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 16:02:26 +07:00
|
|
|
CPU_CORE ?= cortex-m4
|
|
|
|
|
|
|
|
include $(TOP)/tools/make/cpu/$(CPU_CORE).mk
|
|
|
|
|
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-05-15 16:51:06 +07:00
|
|
|
CFLAGS += -Wno-error=undef -Wno-error=unused-parameter -Wno-error=cast-align -Wno-error=cast-qual -Wno-error=redundant-decls
|
2019-05-02 18:10:06 +07:00
|
|
|
|
|
|
|
LDFLAGS += -L$(TOP)/hw/mcu/nordic/nrfx/mdk
|
|
|
|
|
|
|
|
SRC_C += \
|
2021-03-17 21:36:52 +07:00
|
|
|
src/portable/nordic/nrf5x/dcd_nrf5x.c \
|
2019-11-20 16:06:40 +07:00
|
|
|
hw/mcu/nordic/nrfx/drivers/src/nrfx_power.c \
|
2020-03-08 13:25:14 +07:00
|
|
|
hw/mcu/nordic/nrfx/drivers/src/nrfx_uarte.c \
|
2020-11-28 10:48:44 +07:00
|
|
|
hw/mcu/nordic/nrfx/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 \
|
2019-11-20 16:06:40 +07:00
|
|
|
$(TOP)/hw/mcu/nordic/nrfx \
|
|
|
|
$(TOP)/hw/mcu/nordic/nrfx/mdk \
|
|
|
|
$(TOP)/hw/mcu/nordic/nrfx/hal \
|
|
|
|
$(TOP)/hw/mcu/nordic/nrfx/drivers/include \
|
|
|
|
$(TOP)/hw/mcu/nordic/nrfx/drivers/src \
|
2019-05-02 18:10:06 +07:00
|
|
|
|
2020-11-28 10:48:44 +07:00
|
|
|
SRC_S += hw/mcu/nordic/nrfx/mdk/gcc_startup_$(MCU_VARIANT).S
|
2019-05-02 18:10:06 +07:00
|
|
|
|
|
|
|
ASFLAGS += -D__HEAP_SIZE=0
|
|
|
|
|
|
|
|
# For freeRTOS port source
|
2023-03-16 23:11:11 +07:00
|
|
|
FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH)/ARM_CM4F
|
2019-05-02 18:10:06 +07:00
|
|
|
|
|
|
|
# For flash-jlink target
|
2023-05-15 16:51:06 +07:00
|
|
|
JLINK_DEVICE ?= $(MCU_VARIANT)_xxaa
|