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

📄 makefile

📁 PowerPC 8240 的ucosII 移植代码 开发平台为 DiabData
💻
字号:
#
# Makefile for Windriver HSI sbc8240, Diab environment
#
# Author: Ernie Price - eprice@bitwise.net
#
# TARGET MPC8240, Elf, No floating point support, "simple" environment
#
#######################################################################
# Following for support of Windriver visionClick/visionProbe
ESTDIR   	 =	c:/estii
CONVERT		 =	$(ESTDIR)/convert.exe
#CNVRT		 =  $(CONVERT)

#paths
PFX =../../../../../ucos-ii
UCOS = $(PFX)/source
PORT = $(PFX)/ports/core603e/diab
APP = .
BSP = ../bsp
OBJ = ../Obj
DOC = ../Doc

TARGET = -tPPC603EN:simple

# uC/OS files
LIBS1 = ucos_ii.o
LIBS= $(addprefix $(OBJ)/, $(LIBS1))

# local platform-specific files
OBJS1 = cpuvecs.o cpusetup.o epic.o os_cpu_c.o os_cpu_a.o os_dbg.o\
	mmu_cache.o	i2c.o decr.o leds.o	main.o 
OBJS=$(addprefix $(OBJ)/, $(OBJS1))

# include filelist for make recipes
INCLS = $(UCOS)/ucos_ii.h $(PORT)/os_cpu.h *.h $(BSP)/*.h

ASM_FLAGS = $(TARGET) -g 

# Add this to save the assembly language files
KA =
#KA = -Xkeep-assembly-file -Xpass-source

# see more flags and controls in c.opt
CFLAGS = -@c.opt -I. -I$(BSP) -I$(UCOS) -I$(PORT) -g -ei1604 -c $(KA) 

#list of things to clean
CLEAN= $(OBJ)/* $(PORT)/*.bak $(APP)/*.bak $(BSP)/*.bak	$(DOC)/*.bak

# the default target is for ram
all: $(OBJ)/ramapp.elf		

# make the romable target - use visionProbe to write flash
rom: $(OBJ)/romapp.elf

$(OBJ)/ramapp.elf : objdir $(OBJS) ramlnk.dld $(OBJ)/ucos.a 
	dld -@l.opt $(OBJ)/ucos.a -o $@ -Wm ramlnk.dld $(OBJS) >$(OBJ)/ramapp.map
ifeq ($(CONVERT), $(CNVRT))
	$(CONVERT) -w $@ -c -b -m gnu -q
endif

$(OBJ)/romapp.elf : objdir $(OBJS) romlnk.dld $(OBJ)/ucos.a 
	dld -@l.opt $(OBJ)/ucos.a -o $@ -Wm romlnk.dld $(OBJS) >$(OBJ)/romapp.map
ifeq ($(CONVERT), $(CNVRT))
	$(CONVERT) -w $@ -a -c -m gnu -q -l fff00000
endif

objdir: 
	-mkdir $(OBJ)

# The following two rules separate building the objects from archiving them. 
# Combining these rules may  result in failure to add items to the archive.
$(OBJ)/ucos.a:: $(LIBS)

$(OBJ)/ucos.a:: $(LIBS)
	dar rv $@ $(LIBS)

clean:
	-@rm -f $(CLEAN)

# inference rules
$(OBJ)/%.o : $(UCOS)/%.c $(INCLS)
	dcc $(CFLAGS) -o $@ $<

$(OBJ)/%.o : $(APP)/%.c $(INCLS)
	dcc $(CFLAGS) -o $@ $<

$(OBJ)/%.o : $(APP)/%.s
	das $(ASM_FLAGS) -o $@ $< 

$(OBJ)/%.o : $(PORT)/%.c $(INCLS)
	dcc $(CFLAGS) -o $@ $<

$(OBJ)/%.o : $(PORT)/%.s
	das $(ASM_FLAGS) -o $@ $< 

$(OBJ)/%.o : $(BSP)/%.c $(INCLS)
	dcc $(CFLAGS) -o $@ $<

$(OBJ)/%.o : $(BSP)/%.s 
	das $(ASM_FLAGS) -o $@ $< 


⌨️ 快捷键说明

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