-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (22 loc) · 703 Bytes
/
Copy pathMakefile
File metadata and controls
33 lines (22 loc) · 703 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
25
26
27
28
29
30
31
32
33
MMCU=msp430g2553
PRG=boot430
CC=msp430-gcc
CFLAGS=-Os -Wall -mmcu=$(MMCU) -ffunction-sections -fdata-sections -fno-inline-small-functions --cref -Wl,--relax -Wl,-Ttext=0xf000
AFLAGS=-Wa,--gstabs -Wall -mmcu=$(MMCU) -x assembler-with-cpp
OBJS=$(PRG).o bbusb_packet.o bbusb_protocol.o bbusb_receive.o bbusb_transmit.o
all: $(OBJS)
$(CC) $(CFLAGS) -o $(PRG).elf $(OBJS)
size:
msp430-size --totals $(PRG).elf
hex: $(PRG).elf
msp430-objcopy -O ihex $(PRG).elf $(PRG).hex
lst: $(PRG).elf
msp430-objdump -DS $(PRG).elf > $(PRG).lst
flash:
mspdebug rf2500 "prog $(PRG).elf"
%.o: %.S
$(CC) $(AFLAGS) -c $<
%.o: %.c
$(CC) $(CFLAGS) -c $<
clean:
rm -fr $(PRG).elf $(PRG).lst $(PRG).hex $(OBJS)