|
@ -1,18 +1,35 @@ |
|
|
OBJECTS=prueba.o |
|
|
OBJECTS=prueba.o |
|
|
|
|
|
MAP=prueba.map |
|
|
|
|
|
MAKEFILE=Makefile |
|
|
|
|
|
|
|
|
GCC_DIR = /home/user/msp430-gcc/bin |
|
|
|
|
|
SUPPORT_FILE_DIRECTORY = /home/user/msp430-gcc/include |
|
|
|
|
|
|
|
|
ifeq ($(OS),Windows_NT) |
|
|
|
|
|
ifeq ($(shell uname -o),Cygwin) |
|
|
|
|
|
RM= rm -rf |
|
|
|
|
|
else |
|
|
|
|
|
RM= del /q |
|
|
|
|
|
endif |
|
|
|
|
|
else |
|
|
|
|
|
RM= rm -rf |
|
|
|
|
|
endif |
|
|
|
|
|
|
|
|
|
|
|
GCC_DIR = /home/alberto/msp430-gcc/bin |
|
|
|
|
|
SUPPORT_FILE_DIRECTORY = /home/alberto/msp430-gcc/include |
|
|
|
|
|
|
|
|
|
|
|
# Please set your device here
|
|
|
DEVICE = msp430fr6989 |
|
|
DEVICE = msp430fr6989 |
|
|
CC = $(GCC_DIR)/msp430-elf-gcc |
|
|
CC = $(GCC_DIR)/msp430-elf-gcc |
|
|
GDB = $(GCC_DIR)/msp430-elf-gdb |
|
|
GDB = $(GCC_DIR)/msp430-elf-gdb |
|
|
|
|
|
|
|
|
CFLAGS = -I $(SUPPORT_FILE_DIRECTORY) -mmcu=$(DEVICE) -O2 -g |
|
|
|
|
|
LFLAGS = -L $(SUPPORT_FILE_DIRECTORY) -T $(DEVICE).ld |
|
|
|
|
|
|
|
|
CFLAGS = -I $(SUPPORT_FILE_DIRECTORY) -mmcu=$(DEVICE) -Og -Wall -g |
|
|
|
|
|
LFLAGS = -L $(SUPPORT_FILE_DIRECTORY) -Wl,-Map,$(MAP),--gc-sections |
|
|
|
|
|
|
|
|
all: ${OBJECTS} |
|
|
all: ${OBJECTS} |
|
|
$(CC) $(CFLAGS) $(LFLAGS) $? -o $(DEVICE).out |
|
|
$(CC) $(CFLAGS) $(LFLAGS) $? -o $(DEVICE).out |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clean: |
|
|
|
|
|
$(RM) $(OBJECTS) |
|
|
|
|
|
$(RM) $(MAP) |
|
|
|
|
|
$(RM) *.out |
|
|
|
|
|
|
|
|
debug: all |
|
|
debug: all |
|
|
$(GDB) $(DEVICE).out |
|
|
$(GDB) $(DEVICE).out |