📄 makefile
字号:
#
# Created : mid 99 Andre Gompel, initially for TriCore Rider A
# Updated for TC10GP / Rider B on TriBoard with TC10GP chip.
#
# Question(s): email me at agompel@bigfoot.com and/or Andre.Gompel@Infineon.com
# Several updates: used Green Hill toolchain 1.8.9 with 1/2000 patch.
#
# For more details, read attached documentation.
#
UNIX_TOOLS = /opt/xvw_1.0r0 # Rider_B # For Unix build GHS path
NT_GHS_TOOLS = c:/green # Default installed path for GHS on Windows NT
UX_GHS_TOOLS = /opt/ghstrl_1.8.9
#GPATH = c:/cygnus/cygwin-b20/H-i586-cygwin32/bin/
PROJ = uCOS2test # modify your project name: example test for test.c
SIGDIR = c:/Signum/Chameleon
TOOLS = $(NT_GHS_TOOLS)
BIN = $(TOOLS)
CC = $(TOOLS)/cctri # C compiler
INCDIR = $(TOOLS)/libsrc # Mostly header files
LIBDIR = $(TOOLS)/tri # Compiler Liraries
LNK_FILE = TriBd_RB.lnk
TRICORE_DEFS = tc10gp.h
COMOPTS = -list -dual_debug -dwarf -nostrip -cpu=riderb :startfile_dir=.
ASFLAGS = $(COMOPTS) -I$(INCDIR) -c -DEMBEDDED -DACODE # -Wa,-g
CFLAGS = $(COMOPTS) -slashcomment -c -list -noasmwarn -pragma_asm_inline \
-passsource -D__LANGUAGE_C -OS # -G # -nosym
LFLAGS = $(COMOPTS) $(LNK_FILE) -lnk=-map
LFLAGS_F= $(COMOPTS) TriBdFlash.lnk -lnk=-map
ALLOBJS = $(PROJ).tce
INCLUDES = includes.h os_cfg.h os_cpu.h uCOS_II.h Tc10GP.h
OBJS = $(PROJ).o os_core.o os_cpu_a.o os_cpu_c.o os_mbox.o \
os_mem.o os_q.o os_sem.o os_task.o os_time.o
FILES = $(PROJ).c makefile $(LNK_FILE) ..\Doc\
crt0.tri os_cpu_a.tri os_core.c os_cpu_c.c \
os_mbox.c os_mem.c os_q.c os_sem.c os_task.c os_time.c \
includes.h os_cpu.h uCOS2test.h \
os_cfg.h $(TRICORE_DEFS) ucos_ii.h lcd.h rename_f.h \
$(PROJ).tce $(PROJ)_flash.tce
.SUFFIXES : .tri .c .o .tce
.c.o:
$(CC) $< $(CFLAGS)
.tri.o:
$(CC) $< -o $*.o $(ASFLAGS)
all : $(PROJ).tce
crt0.o : $(TRICORE_DEFS) crt0.tri
os_cpu_a.o : $(TRICORE_DEFS) os_cpu_a.tri
$(PROJ).o : $(INCLUDES) $(PROJ).c rename_f.h # example uCOS2test.c
os_core.o : $(INCLUDES) os_core.c rename_f.h
os_cpu_c.o : $(INCLUDES) os_cpu_c.c
os_mbox.o : $(INCLUDES) os_mbox.c
os_mem.o : $(INCLUDES) os_mem.c
os_q.o : $(INCLUDES) os_q.c
os_sem.o : $(INCLUDES) os_sem.c
os_task.o : $(INCLUDES) os_task.c
os_time.o : $(INCLUDES) os_time.c
$(PROJ).tce : $(OBJS) crt0.o $(LNK_FILE)
$(CC) -o $*.tce $(LFLAGS) $(OBJS)
flash:
$(CC) -o $(PROJ)_flash.tce $(LFLAGS_F) $(OBJS)
clean: # type "make clean" to clean all output files.
rm -f $(ALLOBJS) $(OBJS) *.lst *.dbg *.idb *.sym *.stf
archive: # type make archive to create an archive.
tar cvfz $(PROJ).tgz $(FILES)
chmod -w $(PROJ).tgz
#
# To restore the archive file.tgz use "tar xvfz filename where filename will be
# uCOS2test.tgz if you do not modify this file.
# To Build the code, extract the tgz file, the type make
# This assumes that the GHS toolchain has been installed on drive C:
# This makefile is simple and starightforward, but if you need to learn more
# read the O'Reilly book "make": a good reference.
#
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -