Blame view

Platform-MSP-EXP430G2/rules.mk 561 Bytes
Imanol-Mikel Barba Sabariego authored
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
include $(PLATFORM)/common.mk

TOOLS ?= $(EMMOCO-ROOT)/msptools/bin
GCCARCH = msp430
MCU = msp430g2553

COPTS = -mmcu=$(MCU)
LDOPTS = -mmcu=$(MCU) -Wl,-Map=$(OUTDIR)/$(MAIN).map,--gc-sections

ifeq (,$(findstring Windows,$(OS)))
EXEC = $(EMMOCO-ROOT)/msptools/bin/mspdebug rf2500 "prog $(OUTFILE)" 2>&1
else
EXEC = $(EMMOCO-ROOT)/msptools/bin/MSP430Flasher -i USB -m AUTO -e ERASE_MAIN -n $(MCU) -w $(HEXFILE) -v -z [VCC] -g -s -q 
endif

$(OUTFILE): $(OBJECTS)
	$(CC) -o $(OUTFILE) $^ $(LDOPTS)
	$(OBJCOPY) -O ihex $(OUTFILE) $(HEXFILE)
	$(SIZE) $(OUTFILE)