|
要把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) >$@ |
|