Makefile
1 # Copyright © 2014 Jeff Epler 2 # 3 # This program is free software; you can redistribute it and/or modify 4 # it under the terms of the GNU General Public License as published by 5 # the Free Software Foundation; either version 2 of the License, or 6 # (at your option) any later version. 7 # 8 # This program is distributed in the hope that it will be useful, 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 # GNU General Public License for more details. 12 # 13 # You should have received a copy of the GNU General Public License 14 # along with this program; if not, write to the Free Software 15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 17 MAKEFLAGS += r 18 19 V=99 20 21 BINARY = blh 22 DEVICE = stm32f373cc 23 24 LIBNAME = opencm3_stm32f3 25 DEFS = -DSTM32F3 26 27 FP_FLAGS = -mfloat-abi=hard -mfpu=fpv4-sp-d16 28 ARCH_FLAGS = -mthumb -mcpu=cortex-m4 $(FP_FLAGS) 29 30 OBJS += io.o radio.o gyro.o battery.o 31 32 include Makefile.rules 33 34 .PHONY: program 35 program: ${BINARY}.hex 36 stm32flash -i -rts,dtr,-rts,-dtr:rts,dtr,-dtr /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A700fbRJ-if00-port0 -w $^ && python ~/talkstm2.py 37 38 .PHONY: talk 39 talk: 40 python ~/talkstm2.py