Skip to content

Commit

Permalink
enable max3421 host for feather nrf52840 with makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
hathach committed Sep 11, 2023
1 parent 1eb0cb0 commit f55052b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion hw/bsp/nrf/boards/feather_nrf52840_express/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ MCU_VARIANT = nrf52840
CFLAGS += -DNRF52840_XXAA

# enable max3421 host driver for this board
#MAX3421_HOST = 1
MAX3421_HOST = 1

# All source paths should be relative to the top level.
LD_FILE = hw/bsp/nrf/linker/nrf52840_s140_v6.ld
Expand Down
26 changes: 15 additions & 11 deletions hw/bsp/nrf/family.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
UF2_FAMILY_ID = 0xADA52840
DEPS_SUBMODULES += lib/CMSIS_5 hw/mcu/nordic/nrfx

NRFX_DIR = hw/mcu/nordic/nrfx

include $(TOP)/$(BOARD_PATH)/board.mk

Expand All @@ -14,24 +15,27 @@ CFLAGS += \
# 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
LDFLAGS += -L$(TOP)/${NRFX_DIR}/mdk

SRC_C += \
src/portable/nordic/nrf5x/dcd_nrf5x.c \
hw/mcu/nordic/nrfx/drivers/src/nrfx_power.c \
hw/mcu/nordic/nrfx/drivers/src/nrfx_uarte.c \
hw/mcu/nordic/nrfx/mdk/system_$(MCU_VARIANT).c
${NRFX_DIR}/helpers/nrfx_flag32_allocator.c \
${NRFX_DIR}/drivers/src/nrfx_gpiote.c \
${NRFX_DIR}/drivers/src/nrfx_power.c \
${NRFX_DIR}/drivers/src/nrfx_spim.c \
${NRFX_DIR}/drivers/src/nrfx_uarte.c \
${NRFX_DIR}/mdk/system_$(MCU_VARIANT).c

INC += \
$(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 \
$(TOP)/${NRFX_DIR} \
$(TOP)/${NRFX_DIR}/mdk \
$(TOP)/${NRFX_DIR}/hal \
$(TOP)/${NRFX_DIR}/drivers/include \
$(TOP)/${NRFX_DIR}/drivers/src \

SRC_S += hw/mcu/nordic/nrfx/mdk/gcc_startup_$(MCU_VARIANT).S
SRC_S += ${NRFX_DIR}/mdk/gcc_startup_$(MCU_VARIANT).S

ASFLAGS += -D__HEAP_SIZE=0

Expand Down

0 comments on commit f55052b

Please sign in to comment.