⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makefile

📁 血凝仪检测系统,硬件电路部分由正弦波产生模块、前级放大与滤波模块、检测线圈、锁相环同步检波模块、后级平滑滤波与放大模块、AD转换器、线圈驱动模块、单片机模块等部分组成。
💻
字号:
# AvrX 2.5 GCC Examples makefile
# Larry Barello May, 2000
#
# Uses GCC tools (make, rm)
#
# Generic stuff.
#
	DEBUG	= --debug
	RM	= rm -f
#
# MCU - What a mess.  IAR uses different mechanisms for C and ASM
# and buggers the identifier for the mega parts so the GCCMCU will break
# with mega parts.  The AVRXMCU goes away when IAR updates their tools for
# unified IO headers (ioavr.h)  NB: IAR Also needs the linker files changed too.
#
# MCU = 8515, 8535, mega103, mega163, etc (C compiler input)
# AAVRMCU = 0, 1, 2, ...
# GCCMCU = at90s8535, atmega103, etc
# AVRXMCU = (see define) - matches what ICCAVR will pass in the future...
#
	MCU	= 8515
	AAVRMCU	= 1
	GCCMCU	= at90s$(MCU)
	AVRXMCU	= __AT90S$(MCU)__
	
#GCC Equates
	FORMAT	= ihex
	GCCLIB	= ../avrx/avrx.a
	GCCINC	= -I. -I../avrx -I$(AVR)/avr/inc
	LDFLAGS = -Wl,-Map=$(<:.o=.map),--cref,-v
	AFLAGS	= -c -mmcu=$(GCCMCU) -Wa,-gstabs -mmcu=$(GCCMCU) -I$(GCCINC)
	CFLAGS	= -Os -Wall -mmcu=$(GCCMCU) -g
	BIN	= avr-objcopy
	CC	= avr-gcc
	AS	= avr-gcc -x assembler-with-cpp

#IAR Equates
	IARLIB	= ../avrx/avrx.r90 $(IAR)/avr/lib/dl1s.r90
	IARINC	= -I. -I../avrx -I$(IAR)/avr/inc
	AAVRFLAGS	= -v1 -b -re -D$(AVRXMCU)
	XLINKFLAGS	= -f lnk8535s  -x -z -FINTEL-STANDARD -l $(@:.d90=.map) -o $(@:.d90=.hex) -Oubrof6=.d90
	ICCFLAGS	= --cpu=$(MCU) --debug -e -z9 -ms -D$(AVRXMCU) -la $(@:.r90=.lst)
	ICC	= iccavr
	AAVR	= aavr
	XLINK	= xlink
	
	SRC	= BasicTest1.c BasicTest2.c BasicTest3.c BasicTest4.c

# IAR Rules (Need more rules to make EEPROM files)
	
%r90: %s
	$(AAVR)  $< $(IARINC) $(AAVRFLAGS) 
	
%r90: %c
	$(ICC) $< $(IARINC) $(ICCFLAGS) -la $(@:.r90=.lst) -o $@

%d90: %r90 $(IARLIB)
	$(XLINK) $< $(IARLIB) $(XLINKFLAGS)

# GCC Rules
	
%o: %c makefile
	$(CC) -c $< $(GCCINC) $(CFLAGS) -o $@

%s: %c makefile
	$(CC) -S $< $(GCCINC) $(CFLAGS) -o $@

%o: %s makefile
	$(AS) $(AFLAGS) $< -o $@
	
%elf: %o $(GCCLIB) makefile
	$(CC) $< $(GCCLIB) $(LDFLAGS) -mmcu=$(GCCMCU) -o $@

%obj: %elf
	$(BIN) -O avrobj $< $@

%rom: %elf
	$(BIN) -O $(FORMAT) $< $@

%eep: %elf
	$(BIN) -j .eeprom --set-section-flags=.eeprom="alloc,load" -O $(FORMAT) $< $@

all:	iar gcc

iar:	$(SRC:.c=.d90)

gcc: $(SRC:.c=.obj) $(SRC:.c=.rom) $(SRC:.c=.eep)

clean:
	$(RM) $(SRC:.c=.d90) $(SRC:.c=.s) $(SRC:.c=.elf) $(SRC:.c=.r90) $(SRC:.c=.o) $(SRC:.c=.lst)
	$(RM) $(SRC:.c=.hex) $(SRC:.c=.eep) $(SRC:.c=.rom) $(SRC:.c=.map) $(SRC:.c=.c_sym) $(SRC:.c=.obj)

# depends section
	
Messages.o: Messages.c hardware.h makefile
MessagesAndData.o: MessagesAndData.c hardware.h makefile 
MessageTimers.o: MessageTimers.c hardware.h makefile
MessageTimersAlt.o: MessageTimersAlt.c hardware.h makefile
Timers.o: hardware.h makefile Timers.c

Messages.r90: Messages.c hardware.h makefile
MessagesAndData.r90: MessagesAndData.c hardware.h makefile
MessageTimers.r90: MessageTimers.c hardware.h makefile
MessageTimersAlt.r90: MessageTimersAlt.c hardware.h makefile
Timers.r90: hardware.h makefile Timers.c

Messages.d90:		Messages.r90 $(IARLIB)
MessagesAndData.d90:	MessagesAndData.r90 $(IARLIB) 
MessageTimers.d90:	MessageTimers.r90 $(IARLIB)
MessageTimersAlt.d90:	MessageTimersAlt.r90 $(IARLIB)
Timers.d90:		Timers.r90 $(IARLIB)

Messages.elf:		Messages.o $(GCCLIB)
MessagesAndData.elf:	MessagesAndData.o $(GCCLIB) 
MessageTimers.elf:	MessageTimers.o $(GCCLIB)
MessageTimersAlt.elf:	MessageTimersAlt.o $(GCCLIB)
Timers.elf:		Timers.o $(GCCLIB)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -