blob: a7a534c3ffd1fe465dfbebd4e3effa0c982adb18 [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
6
7ARCH := arm
8
9# TI's driverlib wants this
10MODULE_COMPILEFLAGS += -Dgcc
11
12ifeq ($(STELLARIS_CHIP),LM4F120H5QR)
13MEMSIZE ?= 32768
14MEMBASE := 0x20000000
15ROMBASE := 0x00000000
16ARM_CPU := cortex-m3
17# should this be here?
18MODULE_DEFINES += TARGET_IS_BLIZZARD_RA1
19endif
20
21MODULE_DEFINES += PART_$(STELLARIS_CHIP)
22
23ifeq ($(MEMSIZE),)
24$(error need to define MEMSIZE)
25endif
26
27MODULE_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#
50LINKER_SCRIPT += \
51 $(BUILDDIR)/system-twosegment.ld
52
53MODULE_DEPS += \
54 arch/arm/arm-m/systick \
55 lib/cbuf \
56 dev/usb
57
58include $(LOCAL_DIR)/ti/rules.mk
59
60include make/module.mk