Files
lk/platform/nrf52xxx/rules.mk
Eric Holland 668be9d9fa [nrf52][i2c] Add nrfx i2c driver
Use twim(i2c) driver from nrfx library.  See comments and patterns in
target/nrf-pca10056 for info on how to properly utilize driver as it
requires some GLOBAL_DEFINES and gpio defines.
2020-09-28 09:07:27 -04:00

60 lines
1.0 KiB
Makefile

LOCAL_DIR := $(GET_LOCAL_DIR)
MODULE := $(LOCAL_DIR)
# ROMBASE, MEMBASE, and MEMSIZE are required for the linker script
ROMBASE := 0x0
MEMBASE := 0x20000000
# can be overridden by target
ARCH := arm
ARM_CPU := cortex-m4
ifeq ($(NRF52_CHIP),nrf52832-qfaa)
GLOBAL_DEFINES +=
MEMSIZE ?= 65536
endif
ifeq ($(NRF52_CHIP),nrf52832-qfab)
GLOBAL_DEFINES +=
MEMSIZE ?= 32768
endif
ifeq ($(NRF52_CHIP),nrf52832-chaa)
GLOBAL_DEFINES +=
MEMSIZE ?= 65536
endif
ifeq ($(NRF52_CHIP),nrf52832-chab)
GLOBAL_DEFINES +=
MEMSIZE ?= 32768
endif
ifeq ($(NRF52_CHIP),nrf52840-qiaa)
GLOBAL_DEFINES +=
MEMSIZE ?= 262144
endif
GLOBAL_INCLUDES += $(LOCAL_DIR)
GLOBAL_DEFINES += \
MEMSIZE=$(MEMSIZE)
# Other important defines
#GLOBAL_DEFINES += \
# NRFX_ENABLE_LOGGING=1 \
MODULE_SRCS += \
$(LOCAL_DIR)/i2c_master.c \
$(LOCAL_DIR)/init.c \
$(LOCAL_DIR)/debug.c \
$(LOCAL_DIR)/uart.c \
$(LOCAL_DIR)/vectab.c \
$(LOCAL_DIR)/gpio.c \
$(LOCAL_DIR)/timer.c \
LINKER_SCRIPT += \
$(BUILDDIR)/system-twosegment.ld
MODULE_DEPS += \
platform/nrfx \
lib/cbuf
include make/module.mk