blob: 46d3f917bf3147d8d87d85d6fde016e7c89eb940 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001LOCAL_DIR := $(GET_LOCAL_DIR)
2
3MODULE := $(LOCAL_DIR)
4
5# ROMBASE, MEMBASE, and MEMSIZE are required for the linker script
6ROMBASE := 0x0
7MEMBASE := 0x20000000
8# can be overridden by target
9
10ARCH := arm
11ARM_CPU := cortex-m0
12
13ifeq ($(NRF51_CHIP),nrf51822-qfaa)
14GLOBAL_DEFINES +=
15MEMSIZE ?= 16384
16endif
17ifeq ($(NRF51_CHIP),nrf51822-ceaa)
18GLOBAL_DEFINES +=
19MEMSIZE ?= 16384
20endif
21ifeq ($(NRF51_CHIP),nrf51822-qfab)
22GLOBAL_DEFINES +=
23MEMSIZE ?= 16384
24endif
25ifeq ($(NRF51_CHIP),nrf51822-cdab)
26GLOBAL_DEFINES +=
27MEMSIZE ?= 16384
28endif
29ifeq ($(NRF51_CHIP),nrf51822-qfac)
30GLOBAL_DEFINES +=
31MEMSIZE ?= 32768
32endif
33ifeq ($(NRF51_CHIP),nrf51822-cfac)
34GLOBAL_DEFINES +=
35MEMSIZE ?= 32768
36endif
37
38GLOBAL_INCLUDES += $(LOCAL_DIR)
39
40GLOBAL_DEFINES += \
41 MEMSIZE=$(MEMSIZE)
42
43MODULE_SRCS += \
44 $(LOCAL_DIR)/init.c \
45 $(LOCAL_DIR)/debug.c \
46 $(LOCAL_DIR)/uart.c \
47 $(LOCAL_DIR)/vectab.c \
48 $(LOCAL_DIR)/gpio.c \
49 $(LOCAL_DIR)/timer.c \
50 $(LOCAL_DIR)/system_nrf51.c
51
52
53LINKER_SCRIPT += \
54 $(BUILDDIR)/system-twosegment.ld
55
56MODULE_DEPS += \
57 lib/cbuf
58
59include make/module.mk