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 | |
| 7 | ARCH := arm |
| 8 | |
| 9 | # TI's driverlib wants this |
| 10 | MODULE_COMPILEFLAGS += -Dgcc |
| 11 | |
| 12 | ifeq ($(STELLARIS_CHIP),LM4F120H5QR) |
| 13 | MEMSIZE ?= 32768 |
| 14 | MEMBASE := 0x20000000 |
| 15 | ROMBASE := 0x00000000 |
| 16 | ARM_CPU := cortex-m3 |
| 17 | # should this be here? |
| 18 | MODULE_DEFINES += TARGET_IS_BLIZZARD_RA1 |
| 19 | endif |
| 20 | |
| 21 | MODULE_DEFINES += PART_$(STELLARIS_CHIP) |
| 22 | |
| 23 | ifeq ($(MEMSIZE),) |
| 24 | $(error need to define MEMSIZE) |
| 25 | endif |
| 26 | |
| 27 | MODULE_SRCS += \ |
| 28 | $(LOCAL_DIR)/debug.c \ |
| 29 | $(LOCAL_DIR)/gpio.c \ |
| 30 | $(LOCAL_DIR)/init.c \ |
| 31 | $(LOCAL_DIR)/usbc.c \ |
| 32 | $(LOCAL_DIR)/vectab.c \ |
| 33 | |
| 34 | |
| 35 | # $(LOCAL_DIR)/debug.c \ |
| 36 | $(LOCAL_DIR)/interrupts.c \ |
| 37 | $(LOCAL_DIR)/platform_early.c \ |
| 38 | $(LOCAL_DIR)/platform.c \ |
| 39 | $(LOCAL_DIR)/timer.c \ |
| 40 | $(LOCAL_DIR)/init_clock.c \ |
| 41 | $(LOCAL_DIR)/init_clock_48mhz.c \ |
| 42 | $(LOCAL_DIR)/mux.c \ |
| 43 | $(LOCAL_DIR)/emac_dev.c |
| 44 | |
| 45 | # use a two segment memory layout, where all of the read-only sections |
| 46 | # of the binary reside in rom, and the read/write are in memory. The |
| 47 | # ROMBASE, MEMBASE, and MEMSIZE make variables are required to be set |
| 48 | # for the linker script to be generated properly. |
| 49 | # |
| 50 | LINKER_SCRIPT += \ |
| 51 | $(BUILDDIR)/system-twosegment.ld |
| 52 | |
| 53 | MODULE_DEPS += \ |
| 54 | arch/arm/arm-m/systick \ |
| 55 | lib/cbuf \ |
| 56 | dev/usb |
| 57 | |
| 58 | include $(LOCAL_DIR)/ti/rules.mk |
| 59 | |
| 60 | include make/module.mk |