-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathMakefile.rules.tm4
More file actions
24 lines (18 loc) · 860 Bytes
/
Makefile.rules.tm4
File metadata and controls
24 lines (18 loc) · 860 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
CMSIS_CORE_INCLUDE = -I$(LIBPERIPHA_PATH)/arm/cortex-m/arm-cmsis/CMSIS/Include
STARTUP = $(CORTEX_STARTUP_PATH)/startup.c
# No need to specify full path to linker script, will be searched in -L
LINKSCRIPT = tm4/lm4f120h5qr.ld
DEVICE_INCLUDE = -I$(LIBPERIPHA_PATH) $(CMSIS_CORE_INCLUDE) -DLIBPERIPHA -DCORTEX_M3
CROSS_COMPILE = arm-none-eabi-
#GCC_VER = -4.4
TARGET_INCLUDE = $(DEVICE_INCLUDE) -I$(CORTEX_STARTUP_PATH)
TARGET_FLAGS = -mthumb -mcpu=cortex-m3 -DNO_SYSTEMINIT -D__LM4__ -D__TM4__
TARGET_CFLAGS = $(TARGET_FLAGS)
TARGET_LDFLAGS = $(TARGET_CFLAGS) $(TARGET_INCLUDE) --static -nostdlib -nostartfiles -T$(LINKSCRIPT) \
-Wl,--build-id=none $(CMSIS_SYSTEM) $(STARTUP)
LDLIBS = -L$(CORTEX_STARTUP_PATH) -lgcc
.PRECIOUS: $(TARGETDIR)/%.bin
$(TARGETDIR)/%.bin: $(TARGETDIR)/%
$(OBJCOPY) -O binary $^ $@
deploy-%: $(TARGETDIR)/%.bin
lm4flash $^