Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 2038 → Rev 2039

/branches/dongfang_FC_rewrite/makefile
16,13 → 16,9
 
# Use one of the extensions for a gps solution
#EXT = NAVICTRL
#EXT = MK3MAG
EXT =
EXT = DIRECT_GPS
#EXT =
 
# Use optional one the RCs if EXT = NAVICTRL has been used
#RC = DSL
#RC = SPECTRUM
 
#GYRO=ENC-03_FC1.3
#GYRO_HW_NAME=ENC
#GYRO_HW_FACTOR=1.304f
48,19 → 44,15
 
ifeq ($(MCU), atmega644)
FUSE_SETTINGS = -u -U lfuse:w:0xff:m -U hfuse:w:0xdf:m
HEX_NAME = MEGA644_$(EXT)_$(RC)_$(GYRO)
HEX_NAME = MEGA644_$(EXT)_$(GYRO)
endif
 
ifeq ($(MCU), atmega644p)
FUSE_SETTINGS = -u -U lfuse:w:0xff:m -U hfuse:w:0xdf:m
HEX_NAME = MEGA644p_$(EXT)_$(RC)_$(GYRO)
HEX_NAME = MEGA644p_$(EXT)_$(GYRO)
endif
 
 
ifeq ($(F_CPU), 16000000)
QUARZ = 16MHZ
endif
 
ifeq ($(F_CPU), 20000000)
QUARZ = 20MHZ
endif
137,22 → 129,16
##########################################################################################################
# List C source files here. (C dependencies are automatically generated.)
SRC = main.c uart0.c printf_P.c timer0.c timer2.c analog.c menu.c output.c controlMixer.c
SRC += externalControl.c GPSControl.c dongfangMath.c twimaster.c rc.c attitude.c flight.c
SRC += eeprom.c heightControl.c configuration.c attitudeControl.c commands.c $(GYRO).c
SRC += externalControl.c dongfangMath.c twimaster.c rc.c attitude.c flight.c
SRC += eeprom.c heightControl.c configuration.c attitudeControl.c commands.c $(GYRO).c
 
ifeq ($(EXT), MK3MAG)
SRC += mk3mag.c
#mymath.c
ifeq ($(EXT), DIRECT_GPS)
SRC += mk3mag.c directGPSNaviControl.c uart1.c ubx.c
endif
 
ifeq ($(EXT), NAVICTRL)
SRC += spi.c
ifeq ($(RC), DSL)
SRC += dsl.c
endif
ifeq ($(RC), SPECTRUM)
SRC += spectrum.c
endif
endif
##########################################################################################################
 
# List Assembler source files here.
162,7 → 148,7
# Even though the DOS/Win* filesystem matches both .s and .S the same,
# it will preserve the spelling of the filenames, and gcc itself does
# care about how the name is spelled on its command-line.
ASRC =
ASRC = isqrt.S
 
# List any extra directories to look for include files here.
# Each directory must be seperated by a space.
194,18 → 180,12
 
CFLAGS += -DF_CPU=$(F_CPU) -DVERSION_MAJOR=$(VERSION_MAJOR) -DVERSION_MINOR=$(VERSION_MINOR) -DVERSION_PATCH=$(VERSION_PATCH) -DVERSION_SERIAL_MAJOR=$(VERSION_SERIAL_MAJOR) -DVERSION_SERIAL_MINOR=$(VERSION_SERIAL_MINOR) -DNC_SPI_COMPATIBLE=$(NC_SPI_COMPATIBLE) -DGYRO_HW_NAME=${GYRO_HW_NAME} -DGYRO_HW_FACTOR=${GYRO_HW_FACTOR} -DGYRO_PITCHROLL_CORRECTION=${GYRO_PITCHROLL_CORRECTION} -DGYRO_YAW_CORRECTION=${GYRO_YAW_CORRECTION}
 
ifeq ($(EXT), MK3MAG)
CFLAGS += -DUSE_MK3MAG
ifeq ($(EXT), DIRECT_GPS)
CFLAGS += -DUSE_DIRECT_GPS
endif
ifeq ($(EXT), NAVICTRL)
CFLAGS += -DUSE_NAVICTRL
ifeq ($(RC), DSL)
CFLAGS += -DUSE_RC_DSL
endif
ifeq ($(RC), SPECTRUM)
CFLAGS += -DUSE_RC_SPECTRUM
endif
endif
 
ifeq ($(SETUP), QUADRO)
CFLAGS += -DUSE_QUADRO
407,16 → 387,10
@echo $(MSG_EXTENDED_COFF) $(TARGET).cof
$(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof
 
 
 
 
# Program the device.
program: $(TARGET).hex $(TARGET).eep
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
 
 
 
 
# Create final output files (.hex, .eep) from ELF output file.
%.hex: %.elf
@echo