tinyusb/hw/bsp/nrf/family.mk

44 lines
1.2 KiB
Makefile
Raw Normal View History

UF2_FAMILY_ID = 0xADA52840
2021-03-18 16:28:44 +07:00
DEPS_SUBMODULES += lib/CMSIS_5 hw/mcu/nordic/nrfx
include $(TOP)/$(BOARD_PATH)/board.mk
CPU_CORE ?= cortex-m4
include $(TOP)/tools/make/cpu/$(CPU_CORE).mk
CFLAGS += \
-flto \
-DCFG_TUSB_MCU=OPT_MCU_NRF5X \
-DCONFIG_GPIO_AS_PINRESET
# suppress warning caused by vendor mcu driver
CFLAGS += -Wno-error=undef -Wno-error=unused-parameter -Wno-error=cast-align -Wno-error=cast-qual -Wno-error=redundant-decls
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 \
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 \
hw/mcu/nordic/nrfx/mdk/system_$(MCU_VARIANT).c
INC += \
2020-11-28 00:16:28 +07:00
$(TOP)/$(BOARD_PATH) \
$(TOP)/lib/CMSIS_5/CMSIS/Core/Include \
$(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 \
SRC_S += hw/mcu/nordic/nrfx/mdk/gcc_startup_$(MCU_VARIANT).S
ASFLAGS += -D__HEAP_SIZE=0
# For freeRTOS port source
FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH)/ARM_CM4F
# For flash-jlink target
JLINK_DEVICE ?= $(MCU_VARIANT)_xxaa