Hi, I would like to create a new target,but nRF52810 only can be compiled with makefile and I don't know makefile too much.
I try to edit the makefile with my own target name:
PROJECT_NAME := Smart_Remote_3_nRF52_Firmware_nRF52810
Before:
TARGETS := PCA20031-SR3_nRF52810_Product_Example
After:
TARGETS := ABCDEFG
OUTPUT_DIRECTORY := _build
#_build
SDK_ROOT := ../../../../../..
PROJ_DIR := ../../..
Before:
$(OUTPUT_DIRECTORY)/PCA20031-SR3_nRF52810_Product_Example.out: \
After:
$(OUTPUT_DIRECTORY)/ABCDEFG.out: \
LINKER_SCRIPT := Smart_Remote_3_nRF52_gcc_nrf52.ld
# Source files common to all targets
SRC_FILES += \
$(PROJ_DIR)/Source/Drivers/drv_acc_lis3dh.c \
$(PROJ_DIR)/Source/Drivers/drv_audio_anr.c \
.........
# Include folders common to all targets
INC_FOLDERS += \
$(PROJ_DIR)/Source/Modules \
$(PROJ_DIR)/Source/Libraries/bv32fp-1.2 \
........
# Libraries common to all targets
LIB_FILES += \
$(SDK_ROOT)/external/nrf_cc310/lib/libcc310_gcc_0.9.0.a \
$(PROJ_DIR)/Source/Libraries/vocal_anr_gcc.a \
$(SDK_ROOT)/external/micro-ecc/nrf52nf_armgcc/armgcc/micro_ecc_lib_nrf52.a \
# Optimization flags
OPT = -O1 -g3
# Uncomment the line below to enable link time optimization
#OPT += -flto
# C flags common to all targets
CFLAGS += $(OPT)
CFLAGS += -DCONFIG_DEBUG_BUILD=0
................
# C++ flags common to all targets
CXXFLAGS += $(OPT)
# Assembler flags common to all targets
ASMFLAGS += -g3
ASMFLAGS += -mcpu=cortex-m4
................
# Linker flags
LDFLAGS += $(OPT)
LDFLAGS += -mthumb -mabi=aapcs -L $(TEMPLATE_PATH) -T$(LINKER_SCRIPT)
LDFLAGS += -mcpu=cortex-m4
# let linker dump unused sections
LDFLAGS += -Wl,--gc-sections
LDFLAGS += -flto -specs=nano.specs
before:
PCA20031-SR3_nRF52810_Product_Example: CFLAGS += -DCONFIG_BOARD_NRF52810_PCA20031
PCA20031-SR3_nRF52810_Product_Example: ASMFLAGS += -DCONFIG_BOARD_NRF52810_PCA20031
after:
ABCDEFG: CFLAGS += -DCONFIG_BOARD_ABCDEFG
ABCDEFG: ASMFLAGS += -DCONFIG_BOARD_ABCDEFG
And it seems that the CONFIG_BOARD_ABCDEFG is not defined ,according to compile error message.
What else should I do?