-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
69 lines (52 loc) · 1.93 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
ROOT=tivaware_c_series
DEBUG=1
VERBOSE=1
COMPILER=gcc
PART=TM4C123GH6PM
include ${ROOT}/makedefs
VPATH=${ROOT}/examples/boards/ek-tm4c123gxl/drivers
VPATH+=${ROOT}/utils
VPATH+=src
IPATH=${ROOT}/examples/boards/ek-tm4c123gxl/
IPATH+=${ROOT}
IPATH+=microros/install/include
IPATH+=src
all: ${COMPILER}
all: ${COMPILER}/microros_tivac.bin
clean:
@rm -rf ${COMPILER} ${wildcard *~}
${COMPILER}:
@mkdir -p ${COMPILER}
OBJS=\
${COMPILER}/microros.o \
${COMPILER}/syscalls.o \
${COMPILER}/microros_usbcdc_transport.o \
${COMPILER}/microros_time.o \
${COMPILER}/microros_allocators.o \
${COMPILER}/startup_gcc.o \
${COMPILER}/uartstdio.o \
${COMPILER}/main.o \
${COMPILER}/usb_serial_structs.o \
${COMPILER}/ustdlib.o \
${ROOT}/usblib/gcc/libusb.a \
${ROOT}/driverlib/gcc/libdriver.a \
microros/install/libmicroros.a
${COMPILER}/microros_tivac.elf: ${OBJS}
${COMPILER}/microros_tivac.elf: microros_tivac.ld
${COMPILER}/microros_usbcdc_transport.o: microros/install/libmicroros.a
${COMPILER}/microros.o: microros/install/libmicroros.a
${COMPILER}/microros_parameters.o: microros/install/libmicroros.a
# SCATTERgcc_microros_tivac=microros_tivac.ld
# ENTRY_microros_tivac=ResetISR
CFLAGSgcc=-DTARGET_IS_TM4C123_RB1 -DUART_BUFFERED
${COMPILER}/microros_tivac.elf:
${PREFIX}-gcc -o ${COMPILER}/microros_tivac.elf ${CPU} ${FPU} -Wl,--gc-sections -Wl,--print-memory-usage -T "microros_tivac.ld" --specs=nano.specs ${OBJS}
${COMPILER}/microros_tivac.bin: ${COMPILER}/microros_tivac.elf
${PREFIX}-objcopy -O binary ${COMPILER}/microros_tivac.elf ${COMPILER}/microros_tivac.bin
microros/install/libmicroros.a:
@echo "Building libmicroros.a"
cd microros && ./generate_microros_library.sh ${PREFIX} && cd ../
flash: ${COMPILER}/microros_tivac.bin
lm4flash ${COMPILER}/microros_tivac.bin
size:
${PREFIX}-nm --print-size --size-sort --radix=d ${COMPILER}/microros_tivac.elf | grep -E " b | B | d | D "