QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 884|回复: 0

ucosII的一个简单makefile

[复制链接]
发表于 2005-3-9 11:10:08 | 显示全部楼层 |阅读模式
要把ucos移植到msp430上,看过skyeye和另外一个Rtos的makefile,自己搞了一个简单的文件。
但是ucos_ii.c就是不能通过编译,ucos_ii.h里头定义的变量都说没有定义。
似乎是没有找到它包含的c文件的问题。请各位帮忙指导一 下,要怎么写。
我的 make文件:
CC                = msp430-gcc
OBJCOPY        = msp430-objcopy
OBJDUMP = msp430-objdump
RM      = rm -f

NAME    = demo_ew2
MCU     = msp430x149
DEBUG        = -g
OPT                = -Os

CFLAGS=-mmcu=$(MCU) $(OPT) $(DEBUG) -I. -IC:\mspgcc\msp430\include -DGCC_MSP430
LDFLAGS = -mmcu=$(MCU) -Wl,-Map=$*.map,--cre
# Setup paths to source code
#SOURCE_PATH = .
# Source files that to be built
SRC=\
app.c\
Os_core.c\
Os_cpu_c.c\
Os_dbg.c\
Os_flag.c\
Os_mbox.c\
Os_mem.c\
Os_mutex.c\
Os_q.c\
Os_sem.c\
Os_task.c\
uCOS_II.c
# Define all object files.
#
OBJ = $(SRC:.c=.o)
       
all: $(NAME).elf $(NAME).lst

$(NAME).elf : $(OBJ) makefile
        $(CC) $(OBJ) uCOS_II.o $(LDFLAGS) -o $@
       
$(NAME).lst : $(NAME).elf
        $(OBJDUMP) -dStl $^ >$@
clean :
        $(RM) $(OBJ) $(NAME).elf $(NAME).lst .map
       
#automatic collection of dependencies in the source files.
#it's only updated the first time, after that it must be done manually
#with "make depend"
#the dependecies are included from a separate file:
-include dependencies.in
#target to update the file, it's removed first
depend: rmdepend dependencies.in
#remove the file
rmdepend:
        $(RM) dependencies.in
#build the file that contains the dependencies. no deps in this rule.
#if there were deps it would be rebuilt every chnage, which is unneded:
dependencies.in:
        $(CC) -MM ${CFLAGS} $(SRC) >$@
您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-26 01:12 , Processed in 0.176466 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表