Subversion Repositories FlightCtrl

Rev

Rev 1922 | Rev 2102 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1922 Rev 2099
Line 1... Line 1...
1
#--------------------------------------------------------------------
1
#--------------------------------------------------------------------
2
# MCU name
2
# MCU name
3
MCU = atmega644
3
MCU = atmega644p
4
F_CPU = 20000000
4
F_CPU = 20000000
5
QUARZ = 20MHZ
5
QUARZ = 20MHZ
Line 6... Line 6...
6
 
6
 
7
#-------------------------------------------------------------------
7
#-------------------------------------------------------------------
Line 11... Line 11...
11
 
11
 
12
VERSION_SERIAL_MAJOR = 10	# Serial Protocol Major Version
12
VERSION_SERIAL_MAJOR = 10	# Serial Protocol Major Version
13
VERSION_SERIAL_MINOR = 1	# Serial Protocol Minor Version
13
VERSION_SERIAL_MINOR = 1	# Serial Protocol Minor Version
Line 14... Line -...
14
NC_SPI_COMPATIBLE =    6  	# SPI Protocol Version
-
 
15
 
-
 
16
GYRO=ENC-03_FC1.3
-
 
17
GYRO_HW_NAME=ENC
-
 
18
GYRO_HW_FACTOR=1.304f
-
 
19
GYRO_PITCHROLL_CORRECTION=1.0f
-
 
20
GYRO_YAW_CORRECTION=1.0f
14
NC_SPI_COMPATIBLE =    6  	# SPI Protocol Version
21
 
15
 
22
# Set up for cross axis gyros. Factors increased by sqrt(2).
16
# Set up for cross axis gyros. Factors increased by sqrt(2).
23
#GYRO=ADXRS610_FC2.0
17
#GYRO=ADXRS610_FC2.0
24
#GYRO_HW_NAME=ADXR
-
 
25
#GYRO_HW_FACTOR="(1.2288f * 1.4142)"
18
#GYRO_HW_NAME=ADXR
Line 26... Line 19...
26
#GYRO_PITCHROLL_CORRECTION=1.0f
19
#GYRO_HW_FACTOR="(1.2288f * 1.4142)"
27
#GYRO_YAW_CORRECTION=1.0f
20
#GYRO_CORRECTION=1.0f
28
 
21
 
29
#GYRO=invenSense
-
 
30
#GYRO_HW_NAME=Isense
22
GYRO=invenSense
Line 31... Line 23...
31
#GYRO_HW_FACTOR=0.6827f
23
GYRO_HW_NAME=Isense
32
#GYRO_PITCHROLL_CORRECTION=1.0f
24
GYRO_HW_FACTOR=0.6827f
33
#GYRO_YAW_CORRECTION=1.0f
25
GYRO_CORRECTION=1.0f
34
 
26
 
Line 60... Line 52...
60
#OPT = s
52
#OPT = s
Line 61... Line 53...
61
 
53
 
62
##########################################################################################################
54
##########################################################################################################
63
# List C source files here. (C dependencies are automatically generated.)
55
# List C source files here. (C dependencies are automatically generated.)
64
SRC = main.c uart0.c timer0.c timer2.c analog.c output.c controlMixer.c 
56
SRC = main.c uart0.c timer0.c timer2.c analog.c output.c controlMixer.c 
65
SRC += dongfangMath.c twimaster.c rc.c attitude.c flight.c 
57
SRC += rc.c failsafeControl.c attitude.c flight.c  printf_P.c commands.c
Line 66... Line 58...
66
SRC += eeprom.c configuration.c externalControl.c commands.c $(GYRO).c
58
SRC += eeprom.c configuration.c externalControl.c $(GYRO).c
Line 67... Line 59...
67
 
59
 
68
##########################################################################################################
60
##########################################################################################################
Line 102... Line 94...
102
#CFLAGS += -std=c89
94
#CFLAGS += -std=c89
103
#CFLAGS += -std=gnu89
95
#CFLAGS += -std=gnu89
104
#CFLAGS += -std=c99
96
#CFLAGS += -std=c99
105
CFLAGS += -std=gnu99
97
CFLAGS += -std=gnu99
Line 106... Line 98...
106
 
98
 
Line 107... Line 99...
107
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}
99
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_CORRECTION=${GYRO_CORRECTION}
108
 
100
 
109
# Optional assembler flags.
101
# Optional assembler flags.
110
#  -Wa,...:   tell GCC to pass this to the assembler.
102
#  -Wa,...:   tell GCC to pass this to the assembler.
Line 356... Line 348...
356
clean: begin clean_list finished end
348
clean: begin clean_list finished end
Line 357... Line 349...
357
 
349
 
358
clean_list :
350
clean_list :
359
	@echo
351
	@echo
360
	@echo $(MSG_CLEANING)
352
	@echo $(MSG_CLEANING)
361
#	$(REMOVE) $(TARGET).hex
353
	$(REMOVE) $(TARGET).hex
362
	$(REMOVE) $(TARGET).eep
354
	$(REMOVE) $(TARGET).eep
363
	$(REMOVE) $(TARGET).obj
355
	$(REMOVE) $(TARGET).obj
364
	$(REMOVE) $(TARGET).cof
356
	$(REMOVE) $(TARGET).cof
365
	$(REMOVE) $(TARGET).elf
357
	$(REMOVE) $(TARGET).elf