add Makefile

This commit is contained in:
Wolfgang Hottgenroth 2019-01-24 09:05:31 +01:00
parent 783e8a357e
commit e84b902996
Signed by: wn
GPG Key ID: B586EAFCDF2F65F4
2 changed files with 26 additions and 1 deletions

25
Makefile Normal file
View File

@ -0,0 +1,25 @@
CC=msp430-gcc
CFLAGS=-O3 -g0 -Wall -mmcu=msp430g2553 -std=gnu99 -I hottislib
LDFLAGS=-mmcu=msp430g2553
.PHONY: all
all: blinky1.elf
blinky1.elf: main.o led.o time.o PontCoopScheduler.o
$(CC) -o $@ $(LDFLAGS) $^
PontCoopScheduler.o: hottislib/PontCoopScheduler.c hottislib/PontCoopScheduler.h
$(CC) $(CFLAGS) -c $<
.c.o:
$(CC) $(CFLAGS) -c $<
.PHONY: clean
clean:
-rm -f *.o *.elf
.PHONY: upload
upload: blinky1.elf
mspdebug rf2500 "prog blinky1.elf"

2
led.c
View File

@ -20,5 +20,5 @@ void ledInit() {
P1DIR |= BIT0;
P1OUT &= ~BIT0;
schAdd(ledExec, NULL, 0, 1000);
schAdd(ledExec, NULL, 0, 100);
}