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
|
|
|
|
|
2019-05-02 18:10:06 +07:00
|
|
|
CFLAGS += \
|
2019-11-20 16:06:40 +07:00
|
|
|
-flto \
|
|
|
|
-mthumb \
|
|
|
|
-mabi=aapcs \
|
|
|
|
-mcpu=cortex-m4 \
|
|
|
|
-mfloat-abi=hard \
|
|
|
|
-mfpu=fpv4-sp-d16 \
|
|
|
|
-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
|
2021-10-15 17:35:05 +07:00
|
|
|
CFLAGS += -Wno-error=undef -Wno-error=unused-parameter -Wno-error=cast-align -Wno-error=cast-qual
|
2019-05-02 18:10:06 +07:00
|
|
|
|
|
|
|
# All source paths should be relative to the top level.
|
2020-11-28 00:45:44 +07:00
|
|
|
LD_FILE ?= hw/bsp/nrf/boards/$(BOARD)/nrf52840_s140_v6.ld
|
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 \
|
|
|
|
$(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
|
2022-03-09 12:14:55 +00:00
|
|
|
FREERTOS_PORT = $(FREERTOS_PORT_PATH)/ARM_CM4F
|
2019-05-02 18:10:06 +07:00
|
|
|
|
|
|
|
# For flash-jlink target
|
2020-11-28 10:48:44 +07:00
|
|
|
JLINK_DEVICE = $(MCU_VARIANT)_xxaa
|