Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

I just got a copy of the RealView 2.2 compiler and I'm trying to compile a very basic hello world application but I am having problems.

The app when I compile it with GCC runs fine so I know the code is okay, I get an application error when trying to launch the app when build with the RVCT tools so I'm assuming I have something wrong with my makefile.

I can build and generate the mod file with no warnings so I'm not sure what I am missing.

Here are the compiler options I am running..

-c -DDYNAMIC_APP --cpu ARM7TMI --apcs /interwork --littleend -Ospace -O2

the link options:

--rwpi --first AEEMod_Load --entry AEEMod_Load

Here is the output from running the makefile:

[HTML]C:\Projects\BREW_PROJECTS\Alltell3.0\2000\Phones\maxfiles>make -f rvct_makefile
armcc -c -DDYNAMIC_APP -I. -I"C:\Program Files\BREW SDK v2.0.1\inc" --cpu ARM7TD
MI --apcs /interwork --littleend -Ospace -O2 -I. -I"C:\Program Files\BREW SD
K v2.0.1\inc" -o AEEAppGen.o "C:\Program Files\BREW SDK v2.0.1\src\AEEAppGen.c"
Licence found.
Your trial started at: Mon Oct 10 00:00:00 2005
Your trial will end at: Thu Nov 24 22:59:59 2005
armcc -c -DDYNAMIC_APP -I. -I"C:\Program Files\BREW SDK v2.0.1\inc" --cpu ARM7TD
MI --apcs /interwork --littleend -Ospace -O2 -I. -I"C:\Program Files\BREW SD
K v2.0.1\inc" -o AEEModGen.o "C:\Program Files\BREW SDK v2.0.1\src\AEEModGen.c"
Licence found.
Your trial started at: Mon Oct 10 00:00:00 2005
Your trial will end at: Thu Nov 24 22:59:59 2005
armcc -c -DDYNAMIC_APP -I. -I"C:\Program Files\BREW SDK v2.0.1\inc" --cpu ARM7TD
MI --apcs /interwork --littleend -Ospace -O2 -I. -I"C:\Program Files\BREW SD
K v2.0.1\inc" -o maxfilecnt.o maxfilecnt.c
Licence found.
Your trial started at: Mon Oct 10 00:00:00 2005
Your trial will end at: Thu Nov 24 22:59:59 2005
armlink -o maxfilecnt.elf --rwpi AEEAppGen.o AEEModGen.o maxfil
ecnt.o --first AEEMod_Load --entry AEEMod_Load
Licence found.
Your trial started at: Mon Oct 10 00:00:00 2005
Your trial will end at: Thu Nov 24 22:59:59 2005
fromelf maxfilecnt.elf --bin maxfilecnt.mod
Licence found.
Your trial started at: Mon Oct 10 00:00:00 2005
Your trial will end at: Thu Nov 24 22:59:59 2005
Warning: Q0115W: Deprecated command syntax will not be supported in future versi
ons. Use --output to specify the output file.
Finished: 0 information, 1 warning and 0 error messages.[/HTML]

Here is the make file I am using
[HTML]#-----------------------------------------
# Target file name and type definitions
#-----------------------------------------
SUPPORT_DIR = "C:\Program Files\BREW SDK v2.0.1\src"
AEESRCDIR = C:\Program Files\BREW SDK v2.0.1\src
SUPPORT_INCDIR = "C:\Program Files\BREW SDK v2.0.1\inc"
TARGET = maxfilecnt
EXETYPE = elf
MODULE = mod
#-----------------------------------------
# Target compile time symbol definitions
#-----------------------------------------
DYNAPP = -DDYNAMIC_APP
#-----------------------------------------
# Software tool and environment definitions
#-----------------------------------------
ARMCC = armcc
LD = armlink
HEXTOOL = fromelf
OBJ_CMD = -o
#-----------------------------------------
# Processor architecture options
#-----------------------------------------
CPU = --cpu ARM7TDMI
#-----------------------------------------
# ARM Procedure Call Standard (APCS) options
#-----------------------------------------
APCS = --apcs /interwork
THUMB = --thumb
CHK =
OUT = -c
DBG =
OPT = -Ospace -O2
END = --littleend
ZA =
ZAS =
CODE = $(END) $(ZA) $(ZAS)
#-----------------------------------------
# Include file search path options
#-----------------------------------------
INC = -I. -I$(SUPPORT_INCDIR)
#-----------------------------------------
# Linker options
#-----------------------------------------
LINK_CMD = -o
ROPILINK =
LINK_ORDER = --first AEEMod_Load --entry AEEMod_Load
#-----------------------------------------
# HEXTOOL options
#-----------------------------------------
BINFORMAT = --bin
#-----------------------------------------
# Compiler flag definitions
#-----------------------------------------
CFLAGS0 = $(OUT) $(DYNAPP) $(INC) $(CPU) $(APCS) $(CODE) $(CHK) $(DBG)
CFLAGS = $(CFLAGS0) $(OPT)
#-----------------------------------------
# Linker flag definitions
#-----------------------------------------
LFLAGS = $(ROPILINK) --rwpi
#LFLAGS = $(ROPILINK)
#-----------------------------------------
# Default target
#-----------------------------------------
default: $(TARGET).$(MODULE)
all : $(TARGET).$(MODULE)
#-----------------------------------------
# Clean target
#-----------------------------------------
# The object subdirectory, target image file, and target hex file are deleted.
clean :
@echo --------------------------------
@echo CLEAN
rm -f AEEAppGen.o
rm -f AEEModGen.o
rm -f $(TARGET).o
rm -f $(TARGET).$(EXETYPE)
rm -f $(TARGET).$(MODULE)
@echo --------------------------------
APP_OBJS = AEEAppGen.o \
AEEModGen.o \
$(TARGET).o
#-----------------------------------------
# Lib file targets
#-----------------------------------------
$(TARGET).$(MODULE) : $(TARGET).$(EXETYPE) $(APP_OBJS)
$(HEXTOOL) $(TARGET).$(EXETYPE) $(BINFORMAT) $(TARGET).$(MODULE)
$(TARGET).$(EXETYPE) : $(APP_OBJS)
$(LD) $(LINK_CMD) $(TARGET).$(EXETYPE) $(LFLAGS) $(APP_OBJS) $(LINK_ORDER)
AEEAppGen.o:
$(ARMCC) $(CFLAGS) $(INC) -o AEEAppGen.o "$(AEESRCDIR)\AEEAppGen.c"
AEEModGen.o:
$(ARMCC) $(CFLAGS) $(INC) -o AEEModGen.o "$(AEESRCDIR)\AEEModGen.c"
maxfilecnt.o:
$(ARMCC) $(CFLAGS) $(INC) -o maxfilecnt.o maxfilecnt.c[/HTML]

Here is the make file I am using
[HTML]#-----------------------------------------
# Target file name and type definitions
#-----------------------------------------
SUPPORT_DIR = "C:\Program Files\BREW SDK v2.0.1\src"
AEESRCDIR = C:\Program Files\BREW SDK v2.0.1\src
SUPPORT_INCDIR = "C:\Program Files\BREW SDK v2.0.1\inc"
TARGET = maxfilecnt
EXETYPE = elf
MODULE = mod
#-----------------------------------------
# Target compile time symbol definitions
#-----------------------------------------
DYNAPP = -DDYNAMIC_APP
#-----------------------------------------
# Software tool and environment definitions
#-----------------------------------------
ARMCC = armcc
LD = armlink
HEXTOOL = fromelf
OBJ_CMD = -o
#-----------------------------------------
# Processor architecture options
#-----------------------------------------
CPU = --cpu ARM7TDMI
#-----------------------------------------
# ARM Procedure Call Standard (APCS) options
#-----------------------------------------
APCS = --apcs /interwork
THUMB = --thumb
CHK =
OUT = -c
DBG =
OPT = -Ospace -O2
END = --littleend
ZA =
ZAS =
CODE = $(END) $(ZA) $(ZAS)
#-----------------------------------------
# Include file search path options
#-----------------------------------------
INC = -I. -I$(SUPPORT_INCDIR)
#-----------------------------------------
# Linker options
#-----------------------------------------
LINK_CMD = -o
ROPILINK =
LINK_ORDER = --first AEEMod_Load --entry AEEMod_Load
#-----------------------------------------
# HEXTOOL options
#-----------------------------------------
BINFORMAT = --bin
#-----------------------------------------
# Compiler flag definitions
#-----------------------------------------
CFLAGS0 = $(OUT) $(DYNAPP) $(INC) $(CPU) $(APCS) $(CODE) $(CHK) $(DBG)
CFLAGS = $(CFLAGS0) $(OPT)
#-----------------------------------------
# Linker flag definitions
#-----------------------------------------
LFLAGS = $(ROPILINK) --rwpi
#LFLAGS = $(ROPILINK)
#-----------------------------------------
# Default target
#-----------------------------------------
default: $(TARGET).$(MODULE)
all : $(TARGET).$(MODULE)
#-----------------------------------------
# Clean target
#-----------------------------------------
# The object subdirectory, target image file, and target hex file are deleted.
clean :
@echo --------------------------------
@echo CLEAN
rm -f AEEAppGen.o
rm -f AEEModGen.o
rm -f $(TARGET).o
rm -f $(TARGET).$(EXETYPE)
rm -f $(TARGET).$(MODULE)
@echo --------------------------------
APP_OBJS = AEEAppGen.o \
AEEModGen.o \
$(TARGET).o
#-----------------------------------------
# Lib file targets
#-----------------------------------------
$(TARGET).$(MODULE) : $(TARGET).$(EXETYPE) $(APP_OBJS)
$(HEXTOOL) $(TARGET).$(EXETYPE) $(BINFORMAT) $(TARGET).$(MODULE)
$(TARGET).$(EXETYPE) : $(APP_OBJS)
$(LD) $(LINK_CMD) $(TARGET).$(EXETYPE) $(LFLAGS) $(APP_OBJS) $(LINK_ORDER)
AEEAppGen.o:
$(ARMCC) $(CFLAGS) $(INC) -o AEEAppGen.o "$(AEESRCDIR)\AEEAppGen.c"
AEEModGen.o:
$(ARMCC) $(CFLAGS) $(INC) -o AEEModGen.o "$(AEESRCDIR)\AEEModGen.c"
maxfilecnt.o:
$(ARMCC) $(CFLAGS) $(INC) -o maxfilecnt.o maxfilecnt.c[/HTML]