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

📄 rules.in

📁 AT91所有开发板的资料 AT91所有开发板的资料
💻 IN
字号:
# -----------------------------------------------------# Makefile.rules# This Makefile contains global settings that are# included in other Makefiles.# -----------------------------------------------------# This set of rules generate GNU make variables that# get used all throughout the ARM Firmware Components.# Names *DEFS are definitions, names *FLAGS are arguments# to the tools.## *****************************************************# Initialise variables# *****************************************************# Initialise the variables - FLAGSAFLAGS			= $(UHAL_BOARD_AFLAGS)CFLAGS			= $(UHAL_BOARD_CFLAGS)LFLAGS			= $(UHAL_BOARD_LFLAGS)ELFFLAGS		= $(UHAL_BOARD_ELFFLAGS)ARFLAGS			= $(UHAL_BOARD_ARFLAGS)# Initialise the variablers - DEFS (from board.in)ADEFS			= $(UHAL_BOARD_ADEFS)CDEFS			= $(UHAL_BOARD_CDEFS)LDEFS			= $(UHAL_BOARD_LDEFS)ELFDEFS			= $(UHAL_BOARD_ELFDEFS)ARDEFS			= $(UHAL_BOARD_ARDEFS)# *****************************************************# Default some things normally in board.in# *****************************************************# NOTE: board.in is kept in uHAL/Build/<blah>.b # What type of board is this?ifndef BOARD_TYPEBOARD_TYPE		= INTEGRATORendif# What type of processor is fitted?ifndef PROCESSOR_NAMEPROCESSOR_NAME		= ARM7Tendif# What is the set of sources for this board?ifndef UHAL_BOARD_SOURCES	UHAL_BOARD_SOURCES	= $(UHALBOARDDIR)/board.c $(UHALBOARDDIR)/driver.s \	$(UHALBOARDDIR)/memmap.s endif# What is the set of include files for this board?ifndef UHAL_BOARD_INCLUDES	UHAL_BOARD_INCLUDES	= $(UHALBOARDDIR)/platform.h \	$(UHALBOARDDIR)/platform.s $(UHALBOARDDIR)/target.sendif# *****************************************************# Build variants/information (and their default values)# *****************************************************## Build using ADS or SDT.  Overwrite on the command line# by ADS_BUILD=1 or ADS_BUILD=0#ADS_BUILD= 0## Use the ARM C libraries.   Overwrite on the command line# by USE_C_LIBRARY=1 or USE_C_LIBRARY=0#USE_C_LIBRARY= 0## Big/little endian.   Overwrite on the command line by ENDIAN=BIG#ENDIAN = LITTLE## Thumb support/no thumb support.   Overwrite on the command line# by THUMB_AWARE=1.   This can also be set in the build variant's# board.in (eg Build/IntegratorT.b/board.in).#ifndef THUMB_AWARE	THUMB_AWARE		= 0endif## Debug.  Overwrite on the command line by DEBUG=1.#DEBUG			= 0## Floating point support. Overwrite on the command line# by FP_SUPPORT=1#FP_SUPPORT		=0# *****************************************************# Set up assembler, compile and link options based on# Build variants/information# *****************************************************# -----------------------------------------------------# Build time defines (both C and assembler)# -----------------------------------------------------# board typeADEFS			:= $(ADEFS) -PD "$(BOARD_TYPE) SETL {TRUE}"CDEFS			:= $(CDEFS) -D$(BOARD_TYPE)=1# processor nameADEFS			:= $(ADEFS) -PD "$(PROCESSOR_NAME) SETL {TRUE}" CDEFS			:= $(CDEFS) -D$(PROCESSOR_NAME)=1# c library ADEFS			:= $(ADEFS) -PD "USE_C_LIBRARY SETA $(USE_C_LIBRARY)"CDEFS			:= $(CDEFS) -DUSE_C_LIBRARY=$(USE_C_LIBRARY)# thumb awarenessifeq ($(THUMB_AWARE),1) ADEFS		    	:= $(ADEFS) -PD "THUMB_AWARE SETA $(THUMB_AWARE)"CDEFS		    	:= $(CDEFS) -DTHUMB_AWARE=$(THUMB_AWARE)endif# ADS buildingADEFS			:= $(ADEFS) -PD "ADS_BUILD SETA $(ADS_BUILD)"CDEFS			:= $(CDEFS) -DADS_BUILD=$(ADS_BUILD)# Debugifeq ($(DEBUG),1)ADEFS	   		:= $(ADEFS) -g -PD "DEBUG SETA $(DEBUG)"CDEFS	   		:= $(CDEFS) -g+ -O0 -DDEBUG=$(DEBUG)endif# semihosted?ifeq ($(TARGET),semihosted)ADEFS			:= $(ADEFS) -PD "SEMIHOSTED SETL {TRUE}"CDEFS			:= $(CDEFS) -DSEMIHOSTED=1endif# -----------------------------------------------------# Tool arguments# -----------------------------------------------------ifeq ($(DEBUG),1)LFLAGS	   		:= $(LFLAGS) -debugelseELFFLAGS   		:= $(ELFFLAGS) -nodebugendif# Generate the appropriate apcs definitions (the APCSDEFS variable# is a temporary).  Note that the -zpq262144 flag works around an# SDT toolkit C compiler problem.ifeq ($(ADS_BUILD),1)	APCSDEFS	= /noswstifdef UHAL_PROCESSOR_ARCHITECTURE	AFLAGS		:= $(AFLAGS) -cpu $(UHAL_PROCESSOR_ARCHITECTURE)	CFLAGS		:= $(CFLAGS) -cpu $(UHAL_PROCESSOR_ARCHITECTURE)endifelse	APCSDEFS	= 3/32bit/noswst	CFLAGS		:= $(CFLAGS) -fz -zpq262144endififeq ($(THUMB_AWARE),1) APCSDEFS	    	:= $(APCSDEFS)/interworkendifCFLAGS			:= $(CFLAGS) -apcs $(APCSDEFS) AFLAGS			:= $(AFLAGS) -apcs $(APCSDEFS) # endianessLITTLE_ENDIANFLAG= -liLITTLE_ENDIANDEFN= -DLITTLE_ENDIANLITTLE_ENDIANSFX= lBIG_ENDIANFLAG= -biBIG_ENDIANDEFN= -DBIG_ENDIANBIG_ENDIANSFX=  bENDIANFLAG= $($(ENDIAN)_ENDIANFLAG)ENDIANDEFN= $($(ENDIAN)_ENDIANDEFN)ENDIANSFX= $($(ENDIAN)_ENDIANSFX)CFLAGS			:= $(CFLAGS) $(ENDIANFLAG) $(ENDIANDEFN)AFLAGS			:= $(AFLAGS) $(ENDIANFLAG)# Floating point supportifeq ($(FP_SUPPORT),0) AFLAGS			:= $(AFLAGS) -fpu NONECFLAGS			:= $(CFLAGS) -fpu NONEendif# *****************************************************# Where are the tools that we are using?# *****************************************************ifndef ARMLINKARMLINK    	= armlinkendififndef ARMCCARMCC      	= armccendififndef ARMASMARMASM	    	= armasmendififndef FROMELFFROMELF		= fromelfendif# tools vary with toolkitifeq ($(ADS_BUILD),1)	AR		= armar	ARFLAGS		:= $(ARFLAGS) -create	LIB_EXT		= a	SYM_LIST	= -symbols -list	ELF_OUTPUT	= -oelse	AR		= armlib	ARFLAGS		:= $(ARFLAGS) -c -o	LIB_EXT		= alf	SYM_LIST	= -symbolsifeq ($(TARGET),standalone) 	ELFFLAGS	:= $(ELFFLAGS) -nozeropadendifendifHOSTCC	   = cc -g CLEAN	   = /usr/bin/rcscleanMAKE	   = gnumake # *****************************************************# Where are the sources?# *****************************************************# where stuff is (in uHAL)# [A] The directoriesUHALINCLUDEDIR   	= $(UHAL_BASE)/hUHALBOARDDIR     	= $(UHAL_BASE)/Boards/$(BOARD_TYPE)UHALPROCESSORDIR 	= $(UHAL_BASE)/ProcessorsUHALARMDIR 		= $(UHAL_BASE)/Processors/$(PROCESSOR_NAME)UHALLIBDIR	     	= $(UHAL_BASE)/Sources/UHALTOOLDIR	     	= $(UHAL_BASE)/tools/# [B] Sources UHALLIBSOURCES		= $(UHALLIBDIR)/crt.c $(UHALLIBDIR)/external.s \	$(UHALLIBDIR)/iolib.c $(UHALLIBDIR)/irqlib.s $(UHALLIBDIR)/led.c \	$(UHALLIBDIR)/pci.c $(UHALLIBDIR)/uart.c $(UHALLIBDIR)/boot.s \	$(UHALLIBDIR)/divide.s $(UHALLIBDIR)/heap.c $(UHALLIBDIR)/irqtrap.s \	$(UHALLIBDIR)/timer.c $(UHALLIBDIR)/support.sUHALPROCESSORSOURCES	= $(UHALPROCESSORDIR)/cache.c \	$(UHALPROCESSORDIR)/control.s $(UHALPROCESSORDIR)/mmu.s# [C] Include filesUHALLIBINCLUDES		= $(UHALINCLUDEDIR)/uhal.h $(UHALINCLUDEDIR)/cdefs.h \	$(UHALINCLUDEDIR)/bits.h $(UHALINCLUDEDIR)/sizes.h UHALPROCESSORINCLUDES	= $(UHALPROCESSORDIR)/mmu_h.h \	$(UHALPROCESSORDIR)/mmu_h.s $(UHALPROCESSORDIR)/mmumacro.s## Variables used in compilation/dependencies## [A] The list of include filesUHAL_INCLUDE_FILES = $(UHALLIBINCLUDES) $(UHAL_BOARD_INCLUDES) $(UHALPROCESSORINCLUDES)# [B] Every file in the uHAL libraryUHAL_SOURCE_FILES = $(UHALLIBSOURCES) $(UHALLIBINCLUDES) \	$(UHAL_BOARD_SOURCES) $(UHAL_BOARD_INCLUDES) \	$(UHALPROCESSORSOURCES) $(UHALPROCESSORINCLUDES)# [C] The include path INCL = -I$(UHALINCLUDEDIR),$(UHALLIBDIR),$(UHALBOARDDIR),$(UHALPROCESSORDIR),$(UHALARMDIR)# Where stuff is (in PCI library)PCIINCLUDEDIR = $(PCILIB_BASE)/SourcesPCI_SOURCE_FILES = $(PCILIB_BASE)/Sources/pci.cPCI_INCLUDE_FILES = $(PCIINCLUDEDIR)/pcilib.h# Where stuff is (in Flash library)FLASHINCLUDEDIR = $(FLASHLIB_BASE)/hFLASH_INCLUDE_FILES = $(FLASHINCLUDEDIR)/flash_lib.h $(FLASHINCLUDEDIR)/sib.h# *****************************************************# Where are the libraries?# *****************************************************UHALLIB	     = $(UHAL_BASE)/Build/$(BOARD_NAME).b/$(TARGET)/uHALlibrary.$(LIB_EXT)PCILIB	     = $(PCILIB_BASE)/Build/$(BOARD_NAME).b/$(TARGET)/PCIlib.$(LIB_EXT)FLASHLIB     = $(FLASHLIB_BASE)/Build/$(BOARD_NAME).b/$(TARGET)/Flash_Lib.$(LIB_EXT)# *****************************************************# Work out where to link this image# *****************************************************ifeq ($(TARGET),semihosted) ifndef UHAL_DEFAULT_SEMIHOSTED_TEXTTEXT		= 0x8000elseTEXT		= $(UHAL_DEFAULT_SEMIHOSTED_TEXT)endifelseifndef TEXTifdef UHAL_DEFAULT_STANDALONE_TEXTTEXT		= $(UHAL_DEFAULT_STANDALONE_TEXT)endifendififndef DATAifdef UHAL_DEFAULT_STANDALONE_DATADATA		= $(UHAL_DEFAULT_STANDALONE_DATA)endifendifendif#------------------------------------------------------------# This is the default endianess - it can be overwritten on the# make command line by ENDIAN=BIGENDIAN = LITTLE# work out the OS that we're running in.ifeq ($(CONFIG),Windows)OS_TYPE		= Windowselseifeq ($(OS),Windows_NT)OS_TYPE		= WindowselseOS_TYPE		= Unixendifendififeq ($(OS_TYPE),Windows)# Bash/GNU running under DOS/windowsifeq ($(TARGET),semihosted)LFLAGS	:= $(LFLAGS) $(ARMCLIBRARY) -first 'boot.o(SelfBoot)' -ro-base $(TEXT) -noremoveendififeq ($(TARGET),standalone) LFLAGS	:= $(LFLAGS) -first 'boot.o(SelfBoot)' -rw-base $(DATA) -ro-base $(TEXT) -noremoveendifelse# 'Normal' Unixifeq ($(TARGET),semihosted)LFLAGS	:= $(LFLAGS) $(ARMCLIBRARY) -first 'boot.o(SelfBoot)' -ro-base $(TEXT) -noremoveendififeq ($(TARGET),standalone) LFLAGS	:= $(LFLAGS) -first 'boot.o(SelfBoot)' -rw-base $(DATA) -ro-base $(TEXT) -noremoveendifendif# *****************************************************# EXPORTED SYMBOLS (usable in makefiles)# *****************************************************## TOOL			DEFS/FLAGS## ARMASM		ADEFS, AFLAGS# ARMCC			CDEFS, CFLAGS# armlink		LDEFS, LFLAGS# fromelf		EDEFS, EFLAGS# ar			ARDEFS, ARFLAGS	#

⌨️ 快捷键说明

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