diff options
author | Daniel Friesel <derf@finalrewind.org> | 2017-12-04 15:19:25 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2017-12-04 15:19:25 +0100 |
commit | 7b5284023070b841293d0c5a6be0c6c345372cde (patch) | |
tree | 5f2c70451cf61ef6744813cac3a221cef210b213 /src/arch/msp430fr5969lp/Makefile.inc |
Add basic system: LED GPIO on MSP430FR5969 Launchpad and faked GPIO on POSIX
Diffstat (limited to 'src/arch/msp430fr5969lp/Makefile.inc')
-rw-r--r-- | src/arch/msp430fr5969lp/Makefile.inc | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/arch/msp430fr5969lp/Makefile.inc b/src/arch/msp430fr5969lp/Makefile.inc new file mode 100644 index 0000000..04069ae --- /dev/null +++ b/src/arch/msp430fr5969lp/Makefile.inc @@ -0,0 +1,37 @@ +# vim:ft=make + +CPU = 430x +MCU = msp430fr5969 + +INCLUDES += -Iinclude/msp430fr5969lp -I/opt/msp430/ti/gcc/include +COMMON_FLAGS += -mcpu=${CPU} -mmcu=${MCU} + +CC = /opt/msp430/ti/gcc/bin/msp430-elf-gcc +CXX = /opt/msp430/ti/gcc/bin/msp430-elf-g++ +OBJCOPY = /opt/msp430/ti/gcc/bin/msp430-elf-objcopy + +TARGETS += src/arch/msp430fr5969lp/arch.cc src/arch/msp430fr5969lp/driver/gpio.cc + +OBJECTS = ${TARGETS:.cc=.o} + +.cc.o: + ${CXX} ${INCLUDES} ${COMMON_FLAGS} ${CXXFLAGS} -c -o $@ ${@:.o=.cc} + +build/system.elf: ${OBJECTS} + ${CXX} ${INCLUDES} ${COMMON_FLAGS} ${CXXFLAGS} \ + -Wl,--library-path=/opt/msp430/ti/gcc/include/ \ + -flto -o $@ ${OBJECTS} + +build/system.hex: build/system.elf + ${OBJCOPY} -O ihex ${@:.hex=.elf} $@ + +program: build/system.hex + LD_LIBRARY_PATH=/home/derf/var/projects/msp430/MSP430Flasher_1.3.7 \ + /home/derf/var/projects/msp430/MSP430Flasher_1.3.7/MSP430Flasher \ + -w build/system.hex -v -g -z '[VCC]' + +arch_clean: + rm -f ${OBJECTS} + rm -f build/system.hex + +.PHONY: arch_clean program |