rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | LOCAL_DIR := $(GET_LOCAL_DIR) |
| 2 | |
| 3 | MODULE := $(LOCAL_DIR) |
| 4 | |
| 5 | # ROMBASE, MEMBASE, and MEMSIZE are required for the linker script |
| 6 | ROMBASE := 0x0 |
| 7 | MEMBASE := 0x20000000 |
| 8 | # can be overridden by target |
| 9 | |
| 10 | ARCH := arm |
| 11 | ARM_CPU := cortex-m0 |
| 12 | |
| 13 | ifeq ($(NRF51_CHIP),nrf51822-qfaa) |
| 14 | GLOBAL_DEFINES += |
| 15 | MEMSIZE ?= 16384 |
| 16 | endif |
| 17 | ifeq ($(NRF51_CHIP),nrf51822-ceaa) |
| 18 | GLOBAL_DEFINES += |
| 19 | MEMSIZE ?= 16384 |
| 20 | endif |
| 21 | ifeq ($(NRF51_CHIP),nrf51822-qfab) |
| 22 | GLOBAL_DEFINES += |
| 23 | MEMSIZE ?= 16384 |
| 24 | endif |
| 25 | ifeq ($(NRF51_CHIP),nrf51822-cdab) |
| 26 | GLOBAL_DEFINES += |
| 27 | MEMSIZE ?= 16384 |
| 28 | endif |
| 29 | ifeq ($(NRF51_CHIP),nrf51822-qfac) |
| 30 | GLOBAL_DEFINES += |
| 31 | MEMSIZE ?= 32768 |
| 32 | endif |
| 33 | ifeq ($(NRF51_CHIP),nrf51822-cfac) |
| 34 | GLOBAL_DEFINES += |
| 35 | MEMSIZE ?= 32768 |
| 36 | endif |
| 37 | |
| 38 | GLOBAL_INCLUDES += $(LOCAL_DIR) |
| 39 | |
| 40 | GLOBAL_DEFINES += \ |
| 41 | MEMSIZE=$(MEMSIZE) |
| 42 | |
| 43 | MODULE_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 | |
| 53 | LINKER_SCRIPT += \ |
| 54 | $(BUILDDIR)/system-twosegment.ld |
| 55 | |
| 56 | MODULE_DEPS += \ |
| 57 | lib/cbuf |
| 58 | |
| 59 | include make/module.mk |