]> www.average.org Git - sensor-light.git/commitdiff
adjust makefile for G2
authorEugene Crosser <crosser@average.org>
Wed, 13 Dec 2017 20:35:16 +0000 (21:35 +0100)
committerEugene Crosser <crosser@average.org>
Wed, 13 Dec 2017 20:35:16 +0000 (21:35 +0100)
msp430/Makefile

index 1f2d64c551e4642830958c9d51ac74171649733c..70db6f7500e631ba153b7300e60238739a0faaf7 100644 (file)
@@ -20,7 +20,12 @@ LIB = $(TOOLPATH)/$(ARCH)/lib
 CC  = $(BIN)/$(ARCH)-gcc
 OBC = $(BIN)/$(ARCH)-objcopy
 CFLAGS = -mmcu=$(MCU) -g -ffunction-sections -fdata-sections -DDEPRECATED -I $(INC)
-LDFLAGS = -mmcu=$(MCU) -g -Wl,--gc-sections
+LDFLAGS = -mmcu=$(MCU) -g -ffunction-sections -fdata-sections -Wl,--gc-sections -L $(INC)
+ifneq (,$(findstring msp430g2,$(MCU)))
+  LOAD = mspdebug rf2500 'prog main'
+else
+  LOAD = MSPFlasher -w main.hex
+endif
 
 .PRECIOUS: %.o
 
@@ -31,5 +36,8 @@ main: main.o
 main.hex: main
        $(OBC) -O ihex $< $@
 
+load:
+       $(LOAD)
+
 clean:
        rm -f main *.o