A basic guide to show how to use interruptions on programs using a MSP430FR6989 microcontroller and the GCC tools on Linux.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
684 B

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. OBJECTS=prueba.o
  2. MAP=prueba.map
  3. MAKEFILE=Makefile
  4. ifeq ($(OS),Windows_NT)
  5. ifeq ($(shell uname -o),Cygwin)
  6. RM= rm -rf
  7. else
  8. RM= del /q
  9. endif
  10. else
  11. RM= rm -rf
  12. endif
  13. GCC_DIR = /home/alberto/msp430-gcc/bin
  14. SUPPORT_FILE_DIRECTORY = /home/alberto/msp430-gcc/include
  15. # Please set your device here
  16. DEVICE = msp430fr6989
  17. CC = $(GCC_DIR)/msp430-elf-gcc
  18. GDB = $(GCC_DIR)/msp430-elf-gdb
  19. CFLAGS = -I $(SUPPORT_FILE_DIRECTORY) -mmcu=$(DEVICE) -Og -Wall -g
  20. LFLAGS = -L $(SUPPORT_FILE_DIRECTORY) -Wl,-Map,$(MAP),--gc-sections
  21. all: ${OBJECTS}
  22. $(CC) $(CFLAGS) $(LFLAGS) $? -o $(DEVICE).out
  23. clean:
  24. $(RM) $(OBJECTS)
  25. $(RM) $(MAP)
  26. $(RM) *.out
  27. debug: all
  28. $(GDB) $(DEVICE).out