adding makefile support for nrf5x

got undefined reference to `_start'
This commit is contained in:
hathach
2019-01-02 22:35:42 +07:00
parent 4bcd3f9a8f
commit e6224bccf9
5 changed files with 51 additions and 167 deletions
+40
View File
@@ -0,0 +1,40 @@
CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_NRF5X \
-DNRF52840_XXAA \
-mthumb \
-Wno-error=undef \
-Wno-error=cast-align \
-mabi=aapcs \
-mcpu=cortex-m4 \
-mfloat-abi=hard \
-mfpu=fpv4-sp-d16
# All source paths should be relative to the top level.
LD_FILE = hw/mcu/nordic/nrfx/mdk/nrf52840_xxaa.ld
LDFLAGS += -L$(TOP)/hw/mcu/nordic/nrfx/mdk
SRC_C += \
hw/mcu/nordic/nrfx/drivers/src/nrfx_power.c \
hw/mcu/nordic/nrfx/mdk/system_nrf52840.c \
INC += \
-I$(TOP)/hw/cmsis/Include \
-I$(TOP)/hw/mcu/nordic \
-I$(TOP)/hw/mcu/nordic/nrfx \
-I$(TOP)/hw/mcu/nordic/nrfx/mdk \
-I$(TOP)/hw/mcu/nordic/nrfx/hal \
-I$(TOP)/hw/mcu/nordic/nrfx/drivers/include \
SRC_S += hw/mcu/nordic/nrfx/mdk/gcc_startup_nrf52840.S
ASFLAGS += -D__HEAP_SIZE=0
ASFLAGS += -DCONFIG_GPIO_AS_PINRESET
ASFLAGS += -DBLE_STACK_SUPPORT_REQD
ASFLAGS += -DSWI_DISABLE0
ASFLAGS += -DFLOAT_ABI_HARD
ASFLAGS += -DNRF52840_XXAA
VENDOR = nordic
CHIP_FAMILY = nrf5x
+1 -1
View File
@@ -105,7 +105,7 @@ void board_init(void)
#endif
// 64 Mbit qspi flash
#ifdef BOARD_MSC_FLASH_QSPI
#if 0 // def BOARD_MSC_FLASH_QSPI
nrfx_qspi_config_t qspi_cfg = {
.xip_offset = 0,
.pins = {