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 ?= 0x10000000 |
| 6 | MEMBASE ?= 0x10080000 |
| 7 | MEMSIZE ?= 40960 |
| 8 | |
| 9 | ARCH := arm |
| 10 | ARM_CPU := cortex-m4 |
| 11 | |
| 12 | GLOBAL_DEFINES += \ |
| 13 | MEMSIZE=$(MEMSIZE) |
| 14 | |
| 15 | MODULE_SRCS += \ |
| 16 | $(LOCAL_DIR)/init.c \ |
| 17 | $(LOCAL_DIR)/gpio.c \ |
| 18 | $(LOCAL_DIR)/vectab.c \ |
| 19 | $(LOCAL_DIR)/debug.c \ |
| 20 | $(LOCAL_DIR)/udc.c \ |
| 21 | $(LOCAL_DIR)/udc-common.c |
| 22 | |
| 23 | LINKER_SCRIPT += \ |
| 24 | $(BUILDDIR)/system-twosegment.ld |
| 25 | |
| 26 | MODULE_DEPS += \ |
| 27 | arch/arm/arm-m/systick \ |
| 28 | lib/cbuf |
| 29 | |
| 30 | LPCSIGNEDBIN := $(OUTBIN).sign |
| 31 | LPCCHECK := $(LKROOT)/platform/lpc15xx/lpccheck.py |
| 32 | EXTRA_BUILDDEPS += $(LPCSIGNEDBIN) |
| 33 | GENERATED += $(LPCSIGNEDBIN) |
| 34 | |
| 35 | $(LPCSIGNEDBIN): $(OUTBIN) $(LPCCHECK) |
| 36 | @$(MKDIR) |
| 37 | $(NOECHO)echo generating $@; \ |
| 38 | cp $< $@.tmp; \ |
| 39 | $(LPCCHECK) $@.tmp; \ |
| 40 | mv $@.tmp $@ |
| 41 | |
| 42 | include make/module.mk |