abnerle 发表于 2010-12-9 16:05:02

忙了半天,发现RVDS 3.1不支持M3?有点奇怪!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

忙了半天,发现RVDS 3.1不支持M3?有点奇怪!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!11
root@localhost Example1]# build.sh
Error: C2079E: unsupported CPU Cortex-M3
C3050U: Compilation aborted.
Fatal error: L6002U: Could not open file test.o.
Finished: 0 information, 0 warning, 0 error and 1 fatal error messages.
build.sh:
armcc -c -g -O2 --cpu=Cortex-M3 test.c
armlink -o helloworld.axf test.o --scatter cortex-m3.scat
build.mk:
# This makefile is intended for use with GNU make
# as supplied with RVDS.

TARGET=helloworld.axf

CC=armcc
AS=armasm
LD=armlink
AR=armar
FE=fromelf

# Select build rules based on Windows or Unix
ifdef WINDIR
DONE=@if exist $(1) echo Build completed.
RM=if exist $(1) del /q $(1)
SHELL=$(WINDIR)\system32\cmd.exe
else
ifdef windir
DONE=@if exist $(1) echo Build completed.
RM=if exist $(1) del /q $(1)
SHELL=$(windir)\system32\cmd.exe
else
DONE=@if [ -f $(1) ]; then echo Build completed.; fi
RM=rm -f $(1)
endif
endif

all: $(TARGET)
$(call DONE,$(TARGET))

rebuild: clean all

clean:
$(call RM,*.o)
$(call RM,$(TARGET))

CFLAGS=-g -O2 --cpu=Cortex-M3

test.axf : test.o cortex-m3.scat
$(LD) --scatter cortex-m3.scat -o test.axf test.o

test.o : test.c
$(CC) -c $(CFLAGS) test.c
页: [1]
查看完整版本: 忙了半天,发现RVDS 3.1不支持M3?有点奇怪!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!