2023-11-23 06:43:13 +01:00
|
|
|
MCU_FAMILY_DIR = hw/mcu/dialog/da1469x
|
|
|
|
|
2021-03-04 16:50:45 +01:00
|
|
|
CFLAGS += \
|
2020-06-19 14:02:09 +02:00
|
|
|
-flto \
|
|
|
|
-mthumb \
|
|
|
|
-mthumb-interwork \
|
|
|
|
-mabi=aapcs \
|
|
|
|
-mcpu=cortex-m33+nodsp \
|
|
|
|
-mfloat-abi=hard \
|
|
|
|
-mfpu=fpv5-sp-d16 \
|
|
|
|
-nostdlib \
|
|
|
|
-DCORE_M33 \
|
|
|
|
-DCFG_TUSB_MCU=OPT_MCU_DA1469X \
|
|
|
|
-DCFG_TUD_ENDPOINT0_SIZE=8\
|
|
|
|
|
2023-11-23 06:43:13 +01:00
|
|
|
LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
|
2020-06-19 14:02:09 +02:00
|
|
|
|
|
|
|
# All source paths should be relative to the top level.
|
|
|
|
LD_FILE = hw/bsp/$(BOARD)/da1469x.ld
|
|
|
|
|
2021-03-17 10:52:07 +01:00
|
|
|
# While this is for da1469x chip, there is chance that da1468x chip family will also work
|
2020-06-19 14:02:09 +02:00
|
|
|
SRC_C += \
|
2021-03-17 10:52:07 +01:00
|
|
|
src/portable/dialog/da146xx/dcd_da146xx.c \
|
2020-06-19 14:02:09 +02:00
|
|
|
$(MCU_FAMILY_DIR)/src/system_da1469x.c \
|
|
|
|
$(MCU_FAMILY_DIR)/src/da1469x_clock.c \
|
|
|
|
$(MCU_FAMILY_DIR)/src/hal_gpio.c \
|
|
|
|
|
2021-01-11 17:02:17 +01:00
|
|
|
SRC_S += hw/bsp/$(BOARD)/gcc_startup_da1469x.S
|
2020-06-19 14:02:09 +02:00
|
|
|
|
|
|
|
INC += \
|
2020-07-01 07:47:14 +02:00
|
|
|
$(TOP)/hw/bsp/$(BOARD) \
|
2020-06-19 14:02:09 +02:00
|
|
|
$(TOP)/$(MCU_FAMILY_DIR)/include \
|
2021-03-17 10:52:07 +01:00
|
|
|
$(TOP)/$(MCU_FAMILY_DIR)/SDK_10.0.8.105/sdk/bsp/include
|
2020-06-19 14:02:09 +02:00
|
|
|
|
|
|
|
# For freeRTOS port source
|
2023-03-16 17:11:11 +01:00
|
|
|
FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH)/ARM_CM33_NTZ/non_secure
|
2020-06-19 14:02:09 +02:00
|
|
|
|
|
|
|
# For flash-jlink target
|
|
|
|
JLINK_DEVICE = DA14699
|
|
|
|
|
|
|
|
# flash using jlink but with some twists
|
|
|
|
flash: flash-dialog
|
|
|
|
|
2021-01-26 06:46:24 +01:00
|
|
|
flash-dialog: $(BUILD)/$(PROJECT).bin
|
2020-06-19 14:02:09 +02:00
|
|
|
@echo '#define SW_VERSION "v_1.0.0.1"' >$(BUILD)/version.h
|
|
|
|
@echo '#define SW_VERSION_DATE "'`date +"%Y-%m-%d %H:%M"`'"' >>$(BUILD)/version.h
|
2021-01-26 06:46:24 +01:00
|
|
|
mkimage da1469x $(BUILD)/$(PROJECT).bin $(BUILD)/version.h $^.img
|
2020-06-19 14:02:09 +02:00
|
|
|
cp $(TOP)/hw/bsp/$(BOARD)/product_header.dump $(BUILD)/$(BOARD)-image.bin
|
|
|
|
cat $^.img >> $(BUILD)/$(BOARD)-image.bin
|
|
|
|
@echo r > $(BUILD)/$(BOARD).jlink
|
|
|
|
@echo halt >> $(BUILD)/$(BOARD).jlink
|
|
|
|
@echo loadfile $(BUILD)/$(BOARD)-image.bin 0x16000000 >> $(BUILD)/$(BOARD).jlink
|
|
|
|
@echo r >> $(BUILD)/$(BOARD).jlink
|
|
|
|
@echo go >> $(BUILD)/$(BOARD).jlink
|
|
|
|
@echo exit >> $(BUILD)/$(BOARD).jlink
|
|
|
|
$(JLINKEXE) -device $(JLINK_DEVICE) -if $(JLINK_IF) -JTAGConf -1,-1 -speed auto -CommandFile $(BUILD)/$(BOARD).jlink
|