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

Developer

Forums

Forums:

I am using RVDS 3.1. I amunable to run a helloworld app using this. I am trying to run 3.1.5 sdk and 2.1.3 sdk examples helloworld. The mod generated is always 3k [even for my original project source which comes 800k in rvct 1.2, any limitations in evaluation versions !!]. WHen loaded it power cycles the device on start. I have tried elf2mod[from quallcomm site, latest, it gives error and cannot convert elf to mod] and fromelf [that comes with the rvsd cd], still same problem. please help me. I am posting the makefile here

regards
Jagat

_____

###########################
## HELLOWORLD MAKEFILE RVCT
##

#SHELL = /bin/sh

#-------------------------------------------------------------------------------
# Important Paths...
#-------------------------------------------------------------------------------
ARM_HOME = \ARM\RVCT_BREWv1_2
#BREW_HOME = \PROGRA~1\BREWSD~1.3
BREW_HOME = \PROGRA~1\BREW31~1.5\sdk
BREW_VERSION = brew2x

APP_HOME = .

BIN_DIR = $(APP_HOME)\bin
TARGET_DIR = .\deploy

#-------------------------------------------------------------------------------
# Software tool and environment definitions
#-------------------------------------------------------------------------------

AEESRCPATH = $(BREW_HOME)\src
AEEINCPATH = $(BREW_HOME)\inc

ARMBIN = $(ARM_HOME)\Bin
ARMINC = $(ARM_HOME)\include
ARMLIB = $(ARM_HOME)\lib
BREWELFMOD = C:\PROGRA~1\BREWEL~1\bin

ARMTRIALBINPATH = \PROGRA~1\ARM\RVCT\Programs\3.1\569\eval2\win_32-pentium
#TCPP = $(ARMBIN)\tcpp
#TCCC = $(ARMBIN)\tcc
#ARMCC = $(ARMBIN)\armcc
#ARMCPP = $(ARMBIN)\armcpp
#LD = $(ARMBIN)\armlink
#HEXTOOL = $(ARMBIN)\fromelf
TCPP = $(ARMTRIALBINPATH)\tcpp
TCCC = $(ARMTRIALBINPATH)\tcc
ARMCC = $(ARMTRIALBINPATH)\armcc
ARMCPP = $(ARMTRIALBINPATH)\armcpp
LD = $(ARMTRIALBINPATH)\armlink
#HEXTOOL = $(BREWELFMOD)\elf2mod.exe
HEXTOOL = $(ARMTRIALBINPATH)\fromelf

OBJ_CMD = -o $(BIN_DIR)

MKDIR = mkdir

#-------------------------------------------------------------------------------
# Targets
#-------------------------------------------------------------------------------
TARGET = helloworld

#
# NOTE: For some reason, mkdir -p doesn't work... so we'll have to make each
# sub-directory in order... THIS ASSUMES that BREW_HOME is only one
# directory deep
#

DIRS := $(BIN_DIR) \
$(BIN_DIR)$(BREW_HOME) \
$(BIN_DIR)$(AEESRCPATH)

C_SRC := $(AEESRCPATH)\AEEAppGen.c \
$(AEESRCPATH)\AEEModGen.c \
$(APP_HOME)\helloworld.c

C_OBJS = $(C_SRC:%.c=%.o)

APP_OBJS := $(addprefix $(BIN_DIR)\,$(C_OBJS)) $(addprefix $(BIN_DIR)\,$(CPP_OBJS))

#-------------------------------------------------------------------------------
# Compiler Stuff
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
# Target file name and type definitions
#-------------------------------------------------------------------------------

EXETYPE = elf
MODULE = mod

#-------------------------------------------------------------------------------
# Target compile time symbol definitions
#
# Tells the SDK source stuffs that we're building a dynamic app.
#-------------------------------------------------------------------------------

DYNAPP = -DDYNAMIC_APP -DUSE_BREW_2_BITMAPS

#-------------------------------------------------------------------------------
# Processor architecture options
#-------------------------------------------------------------------------------

CPU = --cpu ARM7TDMI

#-------------------------------------------------------------------------------
# ARM Procedure Call Standard (APCS) options
#-------------------------------------------------------------------------------

#ROPI = ropi
INTERWRK = interwork

APCS = --apcs /$(INTERWRK)

#-------------------------------------------------------------------------------
# Additional compile time error checking options
#-------------------------------------------------------------------------------

#CHK = -fa

#-------------------------------------------------------------------------------
# Compiler output options
#-------------------------------------------------------------------------------

OUT = -c

#-------------------------------------------------------------------------------
# Compiler/assembler debug options
#-------------------------------------------------------------------------------

#DBG = -g

#-------------------------------------------------------------------------------
# Compiler optimization options
#-------------------------------------------------------------------------------

#OPT = -Ospace -O2

#-------------------------------------------------------------------------------
# Compiler code generation options
#-------------------------------------------------------------------------------

END = --littleend
#ZA = -zo -zc -gtp -fy

CODE = $(END) $(ZA)

WARNINGS = -W

#-------------------------------------------------------------------------------
# Include file search path options
#-------------------------------------------------------------------------------

INC = -I. -I$(AEEINCPATH) $(APP_INCLUDES)

#-------------------------------------------------------------------------------
# Compiler pragma emulation options
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
# Linker options
#-------------------------------------------------------------------------------

LINK_CMD = --split --reloc -o

ROPILINK = -ropi

LINK_ORDER = --first AEEMod_Load

#-------------------------------------------------------------------------------
# HEXTOOL options
#-------------------------------------------------------------------------------

#BINFORMAT = -bin -output
BINFORMAT = --output

#-------------------------------------------------------------------------------
# Compiler flag definitions
#-------------------------------------------------------------------------------
#CFLAGSNONISO = --friend_injection --no_parse_templates --no_dep_name --using_std --diag_suppress nnn --diag_warning nnn
CFLAGS0 = $(WARNINGS) $(OUT) $(DYNAPP) $(CPU) $(APCS) $(CODE) $(CHK) $(DBG)
CFLAGS = $(WARNINGS) $(CFLAGS0) $(OPT) $(CFLAGSNONISO)

#-------------------------------------------------------------------------------
# Linker flag definitions
#-------------------------------------------------------------------------------

# the -entry flag is not really needed, but it keeps the linker from reporting
# warning L6305W (no entry point). The address
LFLAGS = --entry 0x8000#

#----------------------------------------------------------------------------
# Default target
#----------------------------------------------------------------------------

all: $(C_OBJS) $(CPP_OBJS) $(TARGET).$(MODULE)

#----------------------------------------------------------------------------
# Thumb target
#----------------------------------------------------------------------------

thumb:
@$(MAKE) -e ARMCPP=$(TCPP)

#----------------------------------------------------------------------------
# Debug target
#----------------------------------------------------------------------------
debug:
@$(MAKE) all -e DBG=-g

#----------------------------------------------------------------------------
# Clean target
#----------------------------------------------------------------------------

# The object subdirectory, target image file, and target hex file are deleted.

clean :
@echo ---------------------------------------------------------------
@echo CLEAN
rm -rf $(BIN_DIR)
$(MAKE) setup
rm -f $(TARGET).$(EXETYPE)
rm -f $(TARGET).$(MODULE)
@echo ---------------------------------------------------------------

#----------------------------------------------------------------------------
# setup target
#----------------------------------------------------------------------------

setup:
$(MKDIR) $(DIRS)

#----------------------------------------------------------------------------
# Rules
#----------------------------------------------------------------------------

.c.o :
@echo ---------------------------------------------------------------
@echo OBJECT $(@F)
@echo $(OBJ_CMD)
$(ARMCC) $(CFLAGS) $(INC) $< $(OBJ_CMD)\$@
@echo ---------------------------------------------------------------

.cpp.o :
@echo ---------------------------------------------------------------
@echo OBJECT $(@F)
@echo
$(ARMCPP) $(CFLAGS) $(INC) $< $(OBJ_CMD)\$@
@echo ---------------------------------------------------------------

$(TARGET).$(EXETYPE) : $(APP_OBJS)
@echo ---------------------------------------------------------------
@echo TARGET $@
$(LD) -v $(LINK_CMD) $(TARGET).$(EXETYPE) $(LFLAGS) $(LINK_ORDER) $(APP_OBJS)

$(TARGET).$(MODULE) : $(TARGET).$(EXETYPE)
@echo ---------------------------------------------------------------
@echo TARGET $@
$(HEXTOOL) $(BINFORMAT) $(TARGET_DIR)\$(TARGET).$(MODULE) $(TARGET).$(EXETYPE)

_____

It's probably easier if you post
a) The error from elf2mod
b) A typical command line and link line.
As it will be easier to comment on those than on a large makefile.
Here are exampes of mine (which work).
armcc -D_RVCT -DDYNAMIC_APP --cpu ARM7TDMI-S --apcs /interwork --littleend --thumb -g -Ospace -O2 myfile.cpp
armlink -o myfile.dll --libpath C:\Progra~1\ARM\RVCT\Data\3.1\569\lib --no_strict_ph --split --reloc --entry 0x8000 --first AEEMod_Load myfile.o, myfile2.o ...
elf2mod -output myfile.mod myfile.dll

It's probably easier if you post
a) The error from elf2mod
b) A typical command line and link line.
As it will be easier to comment on those than on a large makefile.
Here are exampes of mine (which work).
armcc -D_RVCT -DDYNAMIC_APP --cpu ARM7TDMI-S --apcs /interwork --littleend --thumb -g -Ospace -O2 myfile.cpp
armlink -o myfile.dll --libpath C:\Progra~1\ARM\RVCT\Data\3.1\569\lib --no_strict_ph --split --reloc --entry 0x8000 --first AEEMod_Load myfile.o, myfile2.o ...
elf2mod -output myfile.mod myfile.dll

You'll probably want to lose the --thumb option when trying to get this going, as otherwise you'll need to use a couple of pragmas in your source code to make sure AEEMod_Load is in ARM.
The key thing to get right, and the one that is most often wrong, is that AEEMod_Load must be at the start of your module, and must be ARM code, not THUMB.

You'll probably want to lose the --thumb option when trying to get this going, as otherwise you'll need to use a couple of pragmas in your source code to make sure AEEMod_Load is in ARM.
The key thing to get right, and the one that is most often wrong, is that AEEMod_Load must be at the start of your module, and must be ARM code, not THUMB.

Hi,
Thanks for the reply. I still get an error frm elf2mod anf fromelf creates a mod file which crashes the device
please help. I am posting the command line output.
thanks and regards
Jagat
C:\Program Files\BREW31~1.5\sdk\examples\helloworld>make
---------------------------------------------------------------
OBJECT AEEAppGen.o
-o .\bin
\PROGRA~1\ARM\RVCT\Programs\3.1\569\eval2\win_32-pentium\armcc -D_RVCT -W -W -c
-DDYNAMIC_APP -DUSE_BREW_2_BITMAPS --cpu ARM7TDMI --apcs /interwork --littleend
-I. -I\PROGRA~1\BREW31~1.5\sdk\inc \PROGRA~1\BREW31~1.5\sdk\src\AEEAppGen.
c -o .\bin\\PROGRA~1\BREW31~1.5\sdk\src\AEEAppGen.o
---------------------------------------------------------------
---------------------------------------------------------------
OBJECT AEEModGen.o
-o .\bin
\PROGRA~1\ARM\RVCT\Programs\3.1\569\eval2\win_32-pentium\armcc -D_RVCT -W -W -c
-DDYNAMIC_APP -DUSE_BREW_2_BITMAPS --cpu ARM7TDMI --apcs /interwork --littleend
-I. -I\PROGRA~1\BREW31~1.5\sdk\inc \PROGRA~1\BREW31~1.5\sdk\src\AEEModGen.
c -o .\bin\\PROGRA~1\BREW31~1.5\sdk\src\AEEModGen.o
---------------------------------------------------------------
---------------------------------------------------------------
OBJECT helloworld.o
-o .\bin
\PROGRA~1\ARM\RVCT\Programs\3.1\569\eval2\win_32-pentium\armcc -D_RVCT -W -W -c
-DDYNAMIC_APP -DUSE_BREW_2_BITMAPS --cpu ARM7TDMI --apcs /interwork --littleend
-I. -I\PROGRA~1\BREW31~1.5\sdk\inc .\helloworld.c -o .\bin\.\helloworld.o
---------------------------------------------------------------
---------------------------------------------------------------
TARGET helloworld.elf
\PROGRA~1\ARM\RVCT\Programs\3.1\569\eval2\win_32-pentium\armlink -v --no_strict_
ph --split --reloc -o helloworld.elf --entry 0x8000 --first AEEMod_Load .\bin\\P
ROGRA~1\BREW31~1.5\sdk\src\AEEAppGen.o .\bin\\PROGRA~1\BREW31~1.5\sdk\src\AEEMod
Gen.o .\bin\.\helloworld.o
================================================================================
Loading Objects.
Loading object AEEAppGen.o.
definition: AEEApplet_New
reference : AEEMod_Load
Loading object AEEModGen.o.
definition: AEEStaticMod_New
definition: AEEMod_Load
reference : AEEClsCreateInstance
Loading object helloworld.o.
definition: AEEClsCreateInstance
reference : AEEApplet_New
reference : __aeabi_memcpy4
Resolving $Sub$$ and $Super$$ Symbols.
Add decompression support symbols.
reference : __decompress_flags
weak ref : __decompress_sizes
================================================================================
Loading User Libraries.
================================================================================
Loading System Libraries.
Searching for ARM libraries in directory C:\Program Files\ARM\RVCT\Data\3.1\569\
lib\armlib\
Selecting library C:\Program Files\ARM\RVCT\Data\3.1\569\lib\armlib\c_t.l.
Selecting library C:\Program Files\ARM\RVCT\Data\3.1\569\lib\armlib\fz_ts.l.
Selecting library C:\Program Files\ARM\RVCT\Data\3.1\569\lib\armlib\h_t.l.
Selecting library C:\Program Files\ARM\RVCT\Data\3.1\569\lib\armlib\m_ts.l.
Selecting library C:\Program Files\ARM\RVCT\Data\3.1\569\lib\armlib\vfpsupport.l
.
Selecting member rt_memcpy_w.o(c_t.l) to define __aeabi_memcpy4.
Selecting member dc.o(c_t.l) to define __decompress_flags.
Loading member dc.o from c_t.l.
definition: __decompress_flags
definition: __decompress_sizes
Loading member rt_memcpy_w.o from c_t.l.
definition: __aeabi_memcpy4
definition: __aeabi_memcpy8
definition: __rt_memcpy_w
definition: _memcpy_lastbytes_aligned
Resolving $Sub$$ and $Super$$ Symbols.
Building image.
Cleaning up Comdat Group Sections
Finding section cross-references
Not eliminating unused sections as image is unsuitable for such optimization.
Patching/Reducing relocations
Creating output file C:\Program Files\BREW31~1.5\sdk\examples\helloworld\hellowo
rld.elf.
---------------------------------------------------------------
TARGET helloworld.mod
C:\PROGRA~1\BREWEL~1\bin\elf2mod.exe -output .\deploy\helloworld.mod helloworld.
elf
elf2mod: Error: ELFHeader:64: ELF2Mod_Exception : Incorrect magic number in ELF
header
make: *** [helloworld.mod] Error 2
C:\Program Files\BREW31~1.5\sdk\examples\helloworld>

Hi,
Thanks for the reply. I still get an error frm elf2mod anf fromelf creates a mod file which crashes the device
please help. I am posting the command line output.
thanks and regards
Jagat
C:\Program Files\BREW31~1.5\sdk\examples\helloworld>make
---------------------------------------------------------------
OBJECT AEEAppGen.o
-o .\bin
\PROGRA~1\ARM\RVCT\Programs\3.1\569\eval2\win_32-pentium\armcc -D_RVCT -W -W -c
-DDYNAMIC_APP -DUSE_BREW_2_BITMAPS --cpu ARM7TDMI --apcs /interwork --littleend
-I. -I\PROGRA~1\BREW31~1.5\sdk\inc \PROGRA~1\BREW31~1.5\sdk\src\AEEAppGen.
c -o .\bin\\PROGRA~1\BREW31~1.5\sdk\src\AEEAppGen.o
---------------------------------------------------------------
---------------------------------------------------------------
OBJECT AEEModGen.o
-o .\bin
\PROGRA~1\ARM\RVCT\Programs\3.1\569\eval2\win_32-pentium\armcc -D_RVCT -W -W -c
-DDYNAMIC_APP -DUSE_BREW_2_BITMAPS --cpu ARM7TDMI --apcs /interwork --littleend
-I. -I\PROGRA~1\BREW31~1.5\sdk\inc \PROGRA~1\BREW31~1.5\sdk\src\AEEModGen.
c -o .\bin\\PROGRA~1\BREW31~1.5\sdk\src\AEEModGen.o
---------------------------------------------------------------
---------------------------------------------------------------
OBJECT helloworld.o
-o .\bin
\PROGRA~1\ARM\RVCT\Programs\3.1\569\eval2\win_32-pentium\armcc -D_RVCT -W -W -c
-DDYNAMIC_APP -DUSE_BREW_2_BITMAPS --cpu ARM7TDMI --apcs /interwork --littleend
-I. -I\PROGRA~1\BREW31~1.5\sdk\inc .\helloworld.c -o .\bin\.\helloworld.o
---------------------------------------------------------------
---------------------------------------------------------------
TARGET helloworld.elf
\PROGRA~1\ARM\RVCT\Programs\3.1\569\eval2\win_32-pentium\armlink -v --no_strict_
ph --split --reloc -o helloworld.elf --entry 0x8000 --first AEEMod_Load .\bin\\P
ROGRA~1\BREW31~1.5\sdk\src\AEEAppGen.o .\bin\\PROGRA~1\BREW31~1.5\sdk\src\AEEMod
Gen.o .\bin\.\helloworld.o
================================================================================
Loading Objects.
Loading object AEEAppGen.o.
definition: AEEApplet_New
reference : AEEMod_Load
Loading object AEEModGen.o.
definition: AEEStaticMod_New
definition: AEEMod_Load
reference : AEEClsCreateInstance
Loading object helloworld.o.
definition: AEEClsCreateInstance
reference : AEEApplet_New
reference : __aeabi_memcpy4
Resolving $Sub$$ and $Super$$ Symbols.
Add decompression support symbols.
reference : __decompress_flags
weak ref : __decompress_sizes
================================================================================
Loading User Libraries.
================================================================================
Loading System Libraries.
Searching for ARM libraries in directory C:\Program Files\ARM\RVCT\Data\3.1\569\
lib\armlib\
Selecting library C:\Program Files\ARM\RVCT\Data\3.1\569\lib\armlib\c_t.l.
Selecting library C:\Program Files\ARM\RVCT\Data\3.1\569\lib\armlib\fz_ts.l.
Selecting library C:\Program Files\ARM\RVCT\Data\3.1\569\lib\armlib\h_t.l.
Selecting library C:\Program Files\ARM\RVCT\Data\3.1\569\lib\armlib\m_ts.l.
Selecting library C:\Program Files\ARM\RVCT\Data\3.1\569\lib\armlib\vfpsupport.l
.
Selecting member rt_memcpy_w.o(c_t.l) to define __aeabi_memcpy4.
Selecting member dc.o(c_t.l) to define __decompress_flags.
Loading member dc.o from c_t.l.
definition: __decompress_flags
definition: __decompress_sizes
Loading member rt_memcpy_w.o from c_t.l.
definition: __aeabi_memcpy4
definition: __aeabi_memcpy8
definition: __rt_memcpy_w
definition: _memcpy_lastbytes_aligned
Resolving $Sub$$ and $Super$$ Symbols.
Building image.
Cleaning up Comdat Group Sections
Finding section cross-references
Not eliminating unused sections as image is unsuitable for such optimization.
Patching/Reducing relocations
Creating output file C:\Program Files\BREW31~1.5\sdk\examples\helloworld\hellowo
rld.elf.
---------------------------------------------------------------
TARGET helloworld.mod
C:\PROGRA~1\BREWEL~1\bin\elf2mod.exe -output .\deploy\helloworld.mod helloworld.
elf
elf2mod: Error: ELFHeader:64: ELF2Mod_Exception : Incorrect magic number in ELF
header
make: *** [helloworld.mod] Error 2
C:\Program Files\BREW31~1.5\sdk\examples\helloworld>

dear sir,
as per your suggestion i made changes. please see below the dumps
C:\Program Files\BREW31~1.5\sdk\examples\helloworld>make
---------------------------------------------------------------
OBJECT AEEAppGen.o
-o .\bin
\PROGRA~1\ARM\RVCT\Programs\3.1\569\eval2\win_32-pentium\armcc -c -D_RVCT -DDYNA
MIC_APP --cpu ARM7TDMI-S --apcs /interwork --littleend -g -O0 -I. -I\PROGRA~1\BR
EW31~1.5\sdk\inc \PROGRA~1\BREW31~1.5\sdk\src\AEEAppGen.c -o .\bin\\PROGRA~1\BR
EW31~1.5\sdk\src\AEEAppGen.o
---------------------------------------------------------------
---------------------------------------------------------------
OBJECT AEEModGen.o
-o .\bin
\PROGRA~1\ARM\RVCT\Programs\3.1\569\eval2\win_32-pentium\armcc -c -D_RVCT -DDYNA
MIC_APP --cpu ARM7TDMI-S --apcs /interwork --littleend -g -O0 -I. -I\PROGRA~1\BR
EW31~1.5\sdk\inc \PROGRA~1\BREW31~1.5\sdk\src\AEEModGen.c -o .\bin\\PROGRA~1\BR
EW31~1.5\sdk\src\AEEModGen.o
---------------------------------------------------------------
---------------------------------------------------------------
OBJECT helloworld.o
-o .\bin
\PROGRA~1\ARM\RVCT\Programs\3.1\569\eval2\win_32-pentium\armcc -c -D_RVCT -DDYNA
MIC_APP --cpu ARM7TDMI-S --apcs /interwork --littleend -g -O0 -I. -I\PROGRA~1\BR
EW31~1.5\sdk\inc .\helloworld.c -o .\bin\.\helloworld.o
---------------------------------------------------------------
---------------------------------------------------------------
TARGET helloworld.elf
\PROGRA~1\ARM\RVCT\Programs\3.1\569\eval2\win_32-pentium\armlink -o helloworld.e
lf --libpath C:\Progra~1\ARM\RVCT\Data\3.1\569\lib --no_strict_ph --split --relo
c --entry 0x8000 --first AEEMod_Load .\bin\\PROGRA~1\BREW31~1.5\sdk\src\AEEAppGe
n.o .\bin\\PROGRA~1\BREW31~1.5\sdk\src\AEEModGen.o .\bin\.\helloworld.o
---------------------------------------------------------------
TARGET helloworld.mod
C:\PROGRA~1\BREWEL~1\bin\elf2mod.exe -output .\deploy\helloworld.mod helloworld.
elf
elf2mod: Error: ELFHeader:64: ELF2Mod_Exception : Incorrect magic number in ELF
header
make: *** [helloworld.mod] Error 2
C:\Program Files\BREW31~1.5\sdk\examples\helloworld>

dear sir,
as per your suggestion i made changes. please see below the dumps
C:\Program Files\BREW31~1.5\sdk\examples\helloworld>make
---------------------------------------------------------------
OBJECT AEEAppGen.o
-o .\bin
\PROGRA~1\ARM\RVCT\Programs\3.1\569\eval2\win_32-pentium\armcc -c -D_RVCT -DDYNA
MIC_APP --cpu ARM7TDMI-S --apcs /interwork --littleend -g -O0 -I. -I\PROGRA~1\BR
EW31~1.5\sdk\inc \PROGRA~1\BREW31~1.5\sdk\src\AEEAppGen.c -o .\bin\\PROGRA~1\BR
EW31~1.5\sdk\src\AEEAppGen.o
---------------------------------------------------------------
---------------------------------------------------------------
OBJECT AEEModGen.o
-o .\bin
\PROGRA~1\ARM\RVCT\Programs\3.1\569\eval2\win_32-pentium\armcc -c -D_RVCT -DDYNA
MIC_APP --cpu ARM7TDMI-S --apcs /interwork --littleend -g -O0 -I. -I\PROGRA~1\BR
EW31~1.5\sdk\inc \PROGRA~1\BREW31~1.5\sdk\src\AEEModGen.c -o .\bin\\PROGRA~1\BR
EW31~1.5\sdk\src\AEEModGen.o
---------------------------------------------------------------
---------------------------------------------------------------
OBJECT helloworld.o
-o .\bin
\PROGRA~1\ARM\RVCT\Programs\3.1\569\eval2\win_32-pentium\armcc -c -D_RVCT -DDYNA
MIC_APP --cpu ARM7TDMI-S --apcs /interwork --littleend -g -O0 -I. -I\PROGRA~1\BR
EW31~1.5\sdk\inc .\helloworld.c -o .\bin\.\helloworld.o
---------------------------------------------------------------
---------------------------------------------------------------
TARGET helloworld.elf
\PROGRA~1\ARM\RVCT\Programs\3.1\569\eval2\win_32-pentium\armlink -o helloworld.e
lf --libpath C:\Progra~1\ARM\RVCT\Data\3.1\569\lib --no_strict_ph --split --relo
c --entry 0x8000 --first AEEMod_Load .\bin\\PROGRA~1\BREW31~1.5\sdk\src\AEEAppGe
n.o .\bin\\PROGRA~1\BREW31~1.5\sdk\src\AEEModGen.o .\bin\.\helloworld.o
---------------------------------------------------------------
TARGET helloworld.mod
C:\PROGRA~1\BREWEL~1\bin\elf2mod.exe -output .\deploy\helloworld.mod helloworld.
elf
elf2mod: Error: ELFHeader:64: ELF2Mod_Exception : Incorrect magic number in ELF
header
make: *** [helloworld.mod] Error 2
C:\Program Files\BREW31~1.5\sdk\examples\helloworld>

Dear Mr Ben
Please reply. Why the rvct people not replying ? would you please give some contact number or support email id where i can get the answer ?
regards
Jagat

Dear Mr Ben
Please reply. Why the rvct people not replying ? would you please give some contact number or support email id where i can get the answer ?
regards
Jagat

Hi Jagat,
I think RVDS 3.1 is not compatible for BREW.
Request ARM team for ARM 1.2 Evaluation CD, they will send you.
Thanks,
San

Hi Jagat,
I think RVDS 3.1 is not compatible for BREW.
Request ARM team for ARM 1.2 Evaluation CD, they will send you.
Thanks,
San

Quote:I think RVDS 3.1 is not compatible for BREW.
I've been using it just fine here, and I know that RiffWare have been using it for quite some time.
RVCT for BREW is just a cut-down version of RVDS 3.0.
jagatnibas, incorrect magic number in ELF header means just that. I suggest you pull out a hex editor and have a look at your ELF to see what's actually in it, because something somewhere in your build system is very wrong! I also suggest that you don't complain (at 8.32am on Monday) that I have not replied to your query (posted at 1.28am Saturday).

Quote:I think RVDS 3.1 is not compatible for BREW.
I've been using it just fine here, and I know that RiffWare have been using it for quite some time.
RVCT for BREW is just a cut-down version of RVDS 3.0.
jagatnibas, incorrect magic number in ELF header means just that. I suggest you pull out a hex editor and have a look at your ELF to see what's actually in it, because something somewhere in your build system is very wrong! I also suggest that you don't complain (at 8.32am on Monday) that I have not replied to your query (posted at 1.28am Saturday).

Hi Ben,
Sorry for any inconvenience, it was probably one of those times in which I was hard pressed for a target.
In between, I got a reply from RVCT [ARM] support that I was using the wrong tool RVDS 3.1 is not meant for brew. They sent me a evaluation version of RVCT 3.0, which they say works for brew.
Now I install it and get a mod using the previous makefile. I am trying the 2.1.3 sdk helloworld, on success I will move to my bigger project.
Here are the commandline dump
C:\Program Files\BREW SDK v2.1.3\Examples\HelloWorld>mingw32-make -f makefile
---------------------------------------------------------------
OBJECT AEEAppGen.o
-o .\bin
\PROGRA~1\ARM\RVCT\Programs\3.0\970\brew\win_32-pentium\armcc -c -D_RVCT -DDYNAM
IC_APP --cpu ARM7TDMI-S --apcs /interwork --littleend -g -Ospace -O2 -I. -I\PROG
RA~1\BREWSD~1.3\inc \PROGRA~1\BREWSD~1.3\src\AEEAppGen.c -o .\bin\\PROGRA~1\BRE
WSD~1.3\src\AEEAppGen.o
---------------------------------------------------------------
---------------------------------------------------------------
OBJECT AEEModGen.o
-o .\bin
\PROGRA~1\ARM\RVCT\Programs\3.0\970\brew\win_32-pentium\armcc -c -D_RVCT -DDYNAM
IC_APP --cpu ARM7TDMI-S --apcs /interwork --littleend -g -Ospace -O2 -I. -I\PROG
RA~1\BREWSD~1.3\inc \PROGRA~1\BREWSD~1.3\src\AEEModGen.c -o .\bin\\PROGRA~1\BRE
WSD~1.3\src\AEEModGen.o
---------------------------------------------------------------
---------------------------------------------------------------
OBJECT helloworld.o
-o .\bin
\PROGRA~1\ARM\RVCT\Programs\3.0\970\brew\win_32-pentium\armcc -c -D_RVCT -DDYNAM
IC_APP --cpu ARM7TDMI-S --apcs /interwork --littleend -g -Ospace -O2 -I. -I\PROG
RA~1\BREWSD~1.3\inc .\helloworld.c -o .\bin\.\helloworld.o
---------------------------------------------------------------
---------------------------------------------------------------
TARGET helloworld.elf
\PROGRA~1\ARM\RVCT\Programs\3.0\970\brew\win_32-pentium\armlink -o helloworld.el
f --no_strict_ph --split --reloc --entry 0x8000 --first AEEMod_Load .\bin\\PROGR
A~1\BREWSD~1.3\src\AEEAppGen.o .\bin\\PROGRA~1\BREWSD~1.3\src\AEEModGen.o .\bin\
.\helloworld.o
---------------------------------------------------------------
TARGET helloworld.mod
C:\PROGRA~1\BREWEL~1\bin\elf2mod.exe -output .\deploy\helloworld.mod helloworld.
elf
elf2mod: RelocMod ro-base=0x200 rw-base=0x6a0
elf2mod: Created .\deploy\helloworld.mod
C:\Program Files\BREW SDK v2.1.3\Examples\HelloWorld>
_____________________________________________________
but it does not run on the devics. It shows the app, but when i click on the app nothing happens.
please see the logger view as in the attachment.
please suggest what to do. It looks like I have used flags almost similar to you mentioned. I am trying in a commandline from my machine and not through any build server. So these commands are executed as displayed here.
_______________________________
___________________________________
regards
Jagat

Hi Ben,
Sorry for any inconvenience, it was probably one of those times in which I was hard pressed for a target.
In between, I got a reply from RVCT [ARM] support that I was using the wrong tool RVDS 3.1 is not meant for brew. They sent me a evaluation version of RVCT 3.0, which they say works for brew.
Now I install it and get a mod using the previous makefile. I am trying the 2.1.3 sdk helloworld, on success I will move to my bigger project.
Here are the commandline dump
C:\Program Files\BREW SDK v2.1.3\Examples\HelloWorld>mingw32-make -f makefile
---------------------------------------------------------------
OBJECT AEEAppGen.o
-o .\bin
\PROGRA~1\ARM\RVCT\Programs\3.0\970\brew\win_32-pentium\armcc -c -D_RVCT -DDYNAM
IC_APP --cpu ARM7TDMI-S --apcs /interwork --littleend -g -Ospace -O2 -I. -I\PROG
RA~1\BREWSD~1.3\inc \PROGRA~1\BREWSD~1.3\src\AEEAppGen.c -o .\bin\\PROGRA~1\BRE
WSD~1.3\src\AEEAppGen.o
---------------------------------------------------------------
---------------------------------------------------------------
OBJECT AEEModGen.o
-o .\bin
\PROGRA~1\ARM\RVCT\Programs\3.0\970\brew\win_32-pentium\armcc -c -D_RVCT -DDYNAM
IC_APP --cpu ARM7TDMI-S --apcs /interwork --littleend -g -Ospace -O2 -I. -I\PROG
RA~1\BREWSD~1.3\inc \PROGRA~1\BREWSD~1.3\src\AEEModGen.c -o .\bin\\PROGRA~1\BRE
WSD~1.3\src\AEEModGen.o
---------------------------------------------------------------
---------------------------------------------------------------
OBJECT helloworld.o
-o .\bin
\PROGRA~1\ARM\RVCT\Programs\3.0\970\brew\win_32-pentium\armcc -c -D_RVCT -DDYNAM
IC_APP --cpu ARM7TDMI-S --apcs /interwork --littleend -g -Ospace -O2 -I. -I\PROG
RA~1\BREWSD~1.3\inc .\helloworld.c -o .\bin\.\helloworld.o
---------------------------------------------------------------
---------------------------------------------------------------
TARGET helloworld.elf
\PROGRA~1\ARM\RVCT\Programs\3.0\970\brew\win_32-pentium\armlink -o helloworld.el
f --no_strict_ph --split --reloc --entry 0x8000 --first AEEMod_Load .\bin\\PROGR
A~1\BREWSD~1.3\src\AEEAppGen.o .\bin\\PROGRA~1\BREWSD~1.3\src\AEEModGen.o .\bin\
.\helloworld.o
---------------------------------------------------------------
TARGET helloworld.mod
C:\PROGRA~1\BREWEL~1\bin\elf2mod.exe -output .\deploy\helloworld.mod helloworld.
elf
elf2mod: RelocMod ro-base=0x200 rw-base=0x6a0
elf2mod: Created .\deploy\helloworld.mod
C:\Program Files\BREW SDK v2.1.3\Examples\HelloWorld>
_____________________________________________________
but it does not run on the devics. It shows the app, but when i click on the app nothing happens.
please see the logger view as in the attachment.
please suggest what to do. It looks like I have used flags almost similar to you mentioned. I am trying in a commandline from my machine and not through any build server. So these commands are executed as displayed here.
_______________________________
___________________________________
regards
Jagat

Hi,
If I give the option --libpath C:\Pro
gra~1\ARM\RVCT\Data\3.0\900\lib\armlib in the link command, I get the following error. ! If I dont give libpath it gives me a mod which does not run [above post and attachment detailed explanation of it]
C:\Program Files\BREW SDK v2.1.3\Examples\HelloWorld>mingw32-make -f makefile
---------------------------------------------------------------
OBJECT AEEAppGen.o
-o .\bin
\PROGRA~1\ARM\RVCT\Programs\3.0\970\brew\win_32-pentium\armcc -c -D_RVCT -DDYNAM
IC_APP --cpu ARM7TDMI-S --apcs /interwork --littleend -g -Ospace -O2 -I. -I\PROG
RA~1\BREWSD~1.3\inc \PROGRA~1\BREWSD~1.3\src\AEEAppGen.c -o .\bin\\PROGRA~1\BRE
WSD~1.3\src\AEEAppGen.o
---------------------------------------------------------------
---------------------------------------------------------------
OBJECT AEEModGen.o
-o .\bin
\PROGRA~1\ARM\RVCT\Programs\3.0\970\brew\win_32-pentium\armcc -c -D_RVCT -DDYNAM
IC_APP --cpu ARM7TDMI-S --apcs /interwork --littleend -g -Ospace -O2 -I. -I\PROG
RA~1\BREWSD~1.3\inc \PROGRA~1\BREWSD~1.3\src\AEEModGen.c -o .\bin\\PROGRA~1\BRE
WSD~1.3\src\AEEModGen.o
---------------------------------------------------------------
---------------------------------------------------------------
OBJECT helloworld.o
-o .\bin
\PROGRA~1\ARM\RVCT\Programs\3.0\970\brew\win_32-pentium\armcc -c -D_RVCT -DDYNAM
IC_APP --cpu ARM7TDMI-S --apcs /interwork --littleend -g -Ospace -O2 -I. -I\PROG
RA~1\BREWSD~1.3\inc .\helloworld.c -o .\bin\.\helloworld.o
---------------------------------------------------------------
---------------------------------------------------------------
TARGET helloworld.elf
\PROGRA~1\ARM\RVCT\Programs\3.0\970\brew\win_32-pentium\armlink --libpath C:\Pro
gra~1\ARM\RVCT\Data\3.0\900\lib\armlib -o helloworld.elf --no_strict_ph --split
--reloc --entry 0x8000 --first AEEMod_Load .\bin\\PROGRA~1\BREWSD~1.3\src\AEEApp
Gen.o .\bin\\PROGRA~1\BREWSD~1.3\src\AEEModGen.o .\bin\.\helloworld.o
Warning: L6310W: Unable to find ARM libraries.
Error: L6218E: Undefined symbol __aeabi_memcpy4 (referred from helloworld.o).
Finished: 0 information, 1 warning and 1 error messages.
mingw32-make: *** [helloworld.elf] Error 1
C:\Program Files\BREW SDK v2.1.3\Examples\HelloWorld>

Hi,
If I give the option --libpath C:\Pro
gra~1\ARM\RVCT\Data\3.0\900\lib\armlib in the link command, I get the following error. ! If I dont give libpath it gives me a mod which does not run [above post and attachment detailed explanation of it]
C:\Program Files\BREW SDK v2.1.3\Examples\HelloWorld>mingw32-make -f makefile
---------------------------------------------------------------
OBJECT AEEAppGen.o
-o .\bin
\PROGRA~1\ARM\RVCT\Programs\3.0\970\brew\win_32-pentium\armcc -c -D_RVCT -DDYNAM
IC_APP --cpu ARM7TDMI-S --apcs /interwork --littleend -g -Ospace -O2 -I. -I\PROG
RA~1\BREWSD~1.3\inc \PROGRA~1\BREWSD~1.3\src\AEEAppGen.c -o .\bin\\PROGRA~1\BRE
WSD~1.3\src\AEEAppGen.o
---------------------------------------------------------------
---------------------------------------------------------------
OBJECT AEEModGen.o
-o .\bin
\PROGRA~1\ARM\RVCT\Programs\3.0\970\brew\win_32-pentium\armcc -c -D_RVCT -DDYNAM
IC_APP --cpu ARM7TDMI-S --apcs /interwork --littleend -g -Ospace -O2 -I. -I\PROG
RA~1\BREWSD~1.3\inc \PROGRA~1\BREWSD~1.3\src\AEEModGen.c -o .\bin\\PROGRA~1\BRE
WSD~1.3\src\AEEModGen.o
---------------------------------------------------------------
---------------------------------------------------------------
OBJECT helloworld.o
-o .\bin
\PROGRA~1\ARM\RVCT\Programs\3.0\970\brew\win_32-pentium\armcc -c -D_RVCT -DDYNAM
IC_APP --cpu ARM7TDMI-S --apcs /interwork --littleend -g -Ospace -O2 -I. -I\PROG
RA~1\BREWSD~1.3\inc .\helloworld.c -o .\bin\.\helloworld.o
---------------------------------------------------------------
---------------------------------------------------------------
TARGET helloworld.elf
\PROGRA~1\ARM\RVCT\Programs\3.0\970\brew\win_32-pentium\armlink --libpath C:\Pro
gra~1\ARM\RVCT\Data\3.0\900\lib\armlib -o helloworld.elf --no_strict_ph --split
--reloc --entry 0x8000 --first AEEMod_Load .\bin\\PROGRA~1\BREWSD~1.3\src\AEEApp
Gen.o .\bin\\PROGRA~1\BREWSD~1.3\src\AEEModGen.o .\bin\.\helloworld.o
Warning: L6310W: Unable to find ARM libraries.
Error: L6218E: Undefined symbol __aeabi_memcpy4 (referred from helloworld.o).
Finished: 0 information, 1 warning and 1 error messages.
mingw32-make: *** [helloworld.elf] Error 1
C:\Program Files\BREW SDK v2.1.3\Examples\HelloWorld>

Hi Ben,
Please find attached mod file if you want to have a look at it in a hex editor. I had a look, but could not figure out whats wrong.
I have renamed the mod file to .txt so that i can attach it. Its just the example helloworld app from 2.1.3 sdk
regards
Jagat

Hi Ben,
Please find attached mod file if you want to have a look at it in a hex editor. I had a look, but could not figure out whats wrong.
I have renamed the mod file to .txt so that i can attach it. Its just the example helloworld app from 2.1.3 sdk
regards
Jagat

Hi Ben,
did you use evaluation version or full version ? I believe my evaluation version has some limitations.
regards
Jagat

Hi Ben,
did you use evaluation version or full version ? I believe my evaluation version has some limitations.
regards
Jagat

Memory Map of the image
Image Entry point : 0x00008000
Load Region LR_1 (Base: 0x00008000, Size: 0x000004a0, Max: 0xffffffff, RELOC)
Execution Region ER_RO (Base: 0x00008000, Size: 0x000004a0, Max: 0xffffffff,
RELOC)
Base Addr Size Type Attr Idx E Section Name Obje
ct
0x00008000 0x00000160 Code RO 4 * .text AEEM
odGen.o
0x00008160 0x000001d8 Code RO 1 .text AEEA
ppGen.o
0x00008338 0x000000ec Code RO 6 .text hell
oworld.o
0x00008424 0x00000064 Code RO 9 .text rt_m
emcpy_w.o(c_t__un.l)
0x00008488 0x00000018 Data RO 7 .constdata hell
oworld.o
Load Region LR_2 (Base: 0x00000000, Size: 0x00000000, Max: 0xffffffff, RELOC)
Execution Region ER_RW (Base: 0x00000000, Size: 0x00000000, Max: 0xffffffff,
RELOC)
**** No section assigned to this execution region ****
Execution Region ER_ZI (Base: 0x00000000, Size: 0x00000000, Max: 0xffffffff,
RELOC)
**** No section assigned to this execution region ****
---------------------------------------------------------------

Memory Map of the image
Image Entry point : 0x00008000
Load Region LR_1 (Base: 0x00008000, Size: 0x000004a0, Max: 0xffffffff, RELOC)
Execution Region ER_RO (Base: 0x00008000, Size: 0x000004a0, Max: 0xffffffff,
RELOC)
Base Addr Size Type Attr Idx E Section Name Obje
ct
0x00008000 0x00000160 Code RO 4 * .text AEEM
odGen.o
0x00008160 0x000001d8 Code RO 1 .text AEEA
ppGen.o
0x00008338 0x000000ec Code RO 6 .text hell
oworld.o
0x00008424 0x00000064 Code RO 9 .text rt_m
emcpy_w.o(c_t__un.l)
0x00008488 0x00000018 Data RO 7 .constdata hell
oworld.o
Load Region LR_2 (Base: 0x00000000, Size: 0x00000000, Max: 0xffffffff, RELOC)
Execution Region ER_RW (Base: 0x00000000, Size: 0x00000000, Max: 0xffffffff,
RELOC)
**** No section assigned to this execution region ****
Execution Region ER_ZI (Base: 0x00000000, Size: 0x00000000, Max: 0xffffffff,
RELOC)
**** No section assigned to this execution region ****
---------------------------------------------------------------

Hi Ben,
Which device did you try ? I tried lg vx 8100 8500 8550 8600
regds
J

Hi Ben,
Which device did you try ? I tried lg vx 8100 8500 8550 8600
regds
J

RVCT 3.1 full version does work with serveral versions of BREW. I am using it with BREW 2.1.3, 3.1.2, 3.1.4.
Don't use the ELF2MOD that comes with the visual studio addin tools, instead there is a seperate downloadable installer, use that. It should work.
If it doesn't they try compiling helloworld app using RVCT 3.1 and try running. This would give you clear idea if the problem is in your module or in the compilation process.

RVCT 3.1 full version does work with serveral versions of BREW. I am using it with BREW 2.1.3, 3.1.2, 3.1.4.
Don't use the ELF2MOD that comes with the visual studio addin tools, instead there is a seperate downloadable installer, use that. It should work.
If it doesn't they try compiling helloworld app using RVCT 3.1 and try running. This would give you clear idea if the problem is in your module or in the compilation process.

Hi Ruben,
Thanks for your reply.
I am using an evaluation version. I have already tried helloworld and the memory maps i have provided above are for helloworld. Even in all of these SDKs it does not run. RVCT people also say they dont provide support. We have already a license of rvct 1.2 and we now wantto evaluate and upgrade to rvct 3.1. Despite buying the product spending hundreds of dollars, if we dont get support from the vendor, I would simply put this as "Pay and Suffer".
regards
J

Hi Ruben,
Thanks for your reply.
I am using an evaluation version. I have already tried helloworld and the memory maps i have provided above are for helloworld. Even in all of these SDKs it does not run. RVCT people also say they dont provide support. We have already a license of rvct 1.2 and we now wantto evaluate and upgrade to rvct 3.1. Despite buying the product spending hundreds of dollars, if we dont get support from the vendor, I would simply put this as "Pay and Suffer".
regards
J

In professional settings you have to figure out things, sadly that is true.
From your make file for entry point try to set AEEMod_Load instead of 0x8000. In additon make sure that your AEEModGen and AEEAppGen gets compiled in ARM mode.
I do use RVCT 3.1 or RVDS 3.1 (they are actually the same, RVDS 3.1 is nothing but RVCT 3.1 repackaged with Codewarrior IDE) full version and it works fine in the device (in several of them)
If your code is C++ be sure to define new/delete operators.
Good luck

In professional settings you have to figure out things, sadly that is true.
From your make file for entry point try to set AEEMod_Load instead of 0x8000. In additon make sure that your AEEModGen and AEEAppGen gets compiled in ARM mode.
I do use RVCT 3.1 or RVDS 3.1 (they are actually the same, RVDS 3.1 is nothing but RVCT 3.1 repackaged with Codewarrior IDE) full version and it works fine in the device (in several of them)
If your code is C++ be sure to define new/delete operators.
Good luck

They give a 10 days evaluation license, and expect us to get help from forums. Bythe time we get some idea from forum to try apart from trying all those stuffs which worked in rvct1.2, the license is expired.
would anybody still say this is sane ?
regards
Jagat

They give a 10 days evaluation license, and expect us to get help from forums. Bythe time we get some idea from forum to try apart from trying all those stuffs which worked in rvct1.2, the license is expired.
would anybody still say this is sane ?
regards
Jagat

ruben wrote:RVCT 3.1 full version does work with serveral versions of BREW. I am using it with BREW 2.1.3, 3.1.2, 3.1.4.
Don't use the ELF2MOD that comes with the visual studio addin tools, instead there is a seperate downloadable installer, use that. It should work.
If it doesn't they try compiling helloworld app using RVCT 3.1 and try running. This would give you clear idea if the problem is in your module or in the compilation process.
Hi,
I am able to use rvct3.1 if I use fromelf [that comes with the rvsd cd], but thing is , if I use elf2mod utility that we download from quallcom site , it gives me error
of " Incorrect magic numbers in elf header " . I need to use lot of global static variables in my application so this utility is must for me .
I will really appretiate help n this regard.
regards

ruben wrote:RVCT 3.1 full version does work with serveral versions of BREW. I am using it with BREW 2.1.3, 3.1.2, 3.1.4.
Don't use the ELF2MOD that comes with the visual studio addin tools, instead there is a seperate downloadable installer, use that. It should work.
If it doesn't they try compiling helloworld app using RVCT 3.1 and try running. This would give you clear idea if the problem is in your module or in the compilation process.
Hi,
I am able to use rvct3.1 if I use fromelf [that comes with the rvsd cd], but thing is , if I use elf2mod utility that we download from quallcom site , it gives me error
of " Incorrect magic numbers in elf header " . I need to use lot of global static variables in my application so this utility is must for me .
I will really appretiate help n this regard.
regards