1,6 → 1,7 |
#-------------------------------------------------------------------- |
# MCU name |
MCU = atmega644p |
#MCU = atmega644 |
MCU = atmega644p |
F_CPU = 20000000 |
#------------------------------------------------------------------- |
VERSION_MAJOR = 0 |
9,13 → 10,11 |
|
VERSION_COMPATIBLE = 7 # PC-Kompatibilität |
#------------------------------------------------------------------- |
#OPTIONS |
COMPASS = MM3 |
#COMPASS = CMPS03 |
#------------------------------------------------------------------- |
|
ifeq ($(MCU), atmega32) |
# FUSE_SETTINGS= -u -U lfuse:w:0xff:m -U hfuse:w:0xcf:m |
|
HEX_NAME = MEGA32 |
endif |
|
ifeq ($(MCU), atmega644) |
FUSE_SETTINGS = -u -U lfuse:w:0xff:m -U hfuse:w:0xdf:m |
#FUSE_SETTINGS = -U lfuse:w:0xff:m -U hfuse:w:0xdf:m |
37,7 → 36,16 |
QUARZ = 20MHZ |
endif |
|
ifeq ($(COMPASS), MM3) |
HEX_NAME +=MM3 |
CFLAGS += -DUSE_MM3 |
endif |
|
ifeq ($(COMPASS), CMPS03) |
HEX_NAME +=CMPS03 |
CFLAGS += -DUSE_CMPS03 |
endif |
|
# Output format. (can be srec, ihex, binary) |
FORMAT = ihex |
|
75,7 → 83,13 |
########################################################################################################## |
# List C source files here. (C dependencies are automatically generated.) |
SRC = main.c uart.c printf_P.c timer0.c timer2.c analog.c menu.c |
SRC += twimaster.c rc.c fc.c GPS.c spi.c eeprom.c mm3.c |
SRC += twimaster.c rc.c fc.c GPS.c spi.c eeprom.c |
ifeq ($(COMPASS), MM3) |
SRC +=mm3.c |
endif |
ifeq ($(COMPASS), CMPS03) |
SRC +=cmps03.c |
endif |
SRC += mymath.c ubx.c fifo.c |
ifeq ($(MCU), atmega644p) |
SRC += uart1.c |
123,7 → 137,15 |
|
CFLAGS += -DVERSION_MAJOR=$(VERSION_MAJOR) -DVERSION_MINOR=$(VERSION_MINOR) -DVERSION_COMPATIBLE=$(VERSION_COMPATIBLE) -DVERSION_INDEX=$(VERSION_INDEX) |
|
ifeq ($(COMPASS), MM3) |
CFLAGS += -DUSE_MM3 |
endif |
ifeq ($(COMPASS), CMPS03) |
CFLAGS += -DUSE_CMPS03 |
endif |
|
|
|
# Optional assembler flags. |
# -Wa,...: tell GCC to pass this to the assembler. |
# -ahlms: create listing |