RVCT 3.0 make file | developer.brewmp.com RVCT 3.0 make file | developer.brewmp.com

Developer

RVCT 3.0 make file

Forums:

Hi,

We installed RVCT for BREW 3.0.

Can any one please post make file for RVCT 3.0?

Thanks,
San

You can start with your ADS 1.2 make file then
- Setup the location of the compiler ARM or THUMB
- Directly RVCT can't generate BREW compliant mod file, instead you need to generate elf file.
- there are several options for ADS1.2 are changed in RVCT 3.0, just use compiler document to get the equivalent options for RVCT 3.0.
- Remove ROPI flag, especially if your application is in C++.
- In your linker flag be sure to add --split --reloc
- After you pass your application through the make file it would generate elf file, now from QCOMM extranet download elf2MOD tool and pass your elf file to create MOD file.

You can start with your ADS 1.2 make file then
- Setup the location of the compiler ARM or THUMB
- Directly RVCT can't generate BREW compliant mod file, instead you need to generate elf file.
- there are several options for ADS1.2 are changed in RVCT 3.0, just use compiler document to get the equivalent options for RVCT 3.0.
- Remove ROPI flag, especially if your application is in C++.
- In your linker flag be sure to add --split --reloc
- After you pass your application through the make file it would generate elf file, now from QCOMM extranet download elf2MOD tool and pass your elf file to create MOD file.

Thank you ruben for your reply.

Thank you ruben for your reply.

Hi Ruben,
I changed my make file as you said and tried to create mod but it is giving the following error while creating mod from elf.
elf2mod: Error: RelocMod:265: ELF2Mod_Exception : RW segment relocion at offset 33260 overshoots segment size 16
I am using Elf2mod 1.0.2 (1.0.2.02) which is released on 7 July 2006.
I attached my make file here.
Is there problem with Elf2mod or make file or my code?
Please help me.
Thanks,
San

Hi Ruben,
I changed my make file as you said and tried to create mod but it is giving the following error while creating mod from elf.
elf2mod: Error: RelocMod:265: ELF2Mod_Exception : RW segment relocion at offset 33260 overshoots segment size 16
I am using Elf2mod 1.0.2 (1.0.2.02) which is released on 7 July 2006.
I attached my make file here.
Is there problem with Elf2mod or make file or my code?
Please help me.
Thanks,
San

I took a quick look in your mak file and did some fix up, I didn't do any validation, please do it by yourself.

I took a quick look in your mak file and did some fix up, I didn't do any validation, please do it by yourself.

Thank You Ruben for helping me,
I compiled my app with the modified make file but there is a error
elf2mod: Error: RelocMod:265: ELF2Mod_Exception : RW segment relocion at offset 34360 overshoots segment size 16
command line is:
---------------------
OBJECT yspng.o
C:\Progra~1\ARM\RVCT\Programs\3.0\970\brew\win_32-pentium\tcpp -c -DDYNAMIC_APP -DBREW20 -DBREW3X -DUSE_BITBLT -DUSE_PNG -DXLARGE -DLG_VX9800 -I. -IC:\PROGRA~1\BREW31~1.5\sdk -IC:\Progra~1\BREW315\INC -Ic:\brew\project_myapp --cpu ARM7TDMI --apcs /adsabi//interwork --littleend --split_sections -zas4 -g -Ospace -O2 -I. -IC:\PROGRA~1\BREW31~1.5\sdk -IC:\Progra~1\BREW315\INC -Ic:\brew\project_myapp -o yspng.o yspng.cpp
link line is:
-------------
TARGET myapp.elf
C:\Progra~1\ARM\RVCT\Programs\3.0\970\brew\win_32-pentium\armlink -o myapp.elf --ropi --split --reloc AEEAppGen.o AEEModGen.o CPlayer.o CSprite.o Game.o GameClass.o P_CPlatform.o P_CPlayfield.o T_CSprite.o T_CTools.o yspng.o JString.o Utility.o myapp.o --first AEEMod_Load
What could be the problem?
Appreciate your help
Thanks,
San

Thank You Ruben for helping me,
I compiled my app with the modified make file but there is a error
elf2mod: Error: RelocMod:265: ELF2Mod_Exception : RW segment relocion at offset 34360 overshoots segment size 16
command line is:
---------------------
OBJECT yspng.o
C:\Progra~1\ARM\RVCT\Programs\3.0\970\brew\win_32-pentium\tcpp -c -DDYNAMIC_APP -DBREW20 -DBREW3X -DUSE_BITBLT -DUSE_PNG -DXLARGE -DLG_VX9800 -I. -IC:\PROGRA~1\BREW31~1.5\sdk -IC:\Progra~1\BREW315\INC -Ic:\brew\project_myapp --cpu ARM7TDMI --apcs /adsabi//interwork --littleend --split_sections -zas4 -g -Ospace -O2 -I. -IC:\PROGRA~1\BREW31~1.5\sdk -IC:\Progra~1\BREW315\INC -Ic:\brew\project_myapp -o yspng.o yspng.cpp
link line is:
-------------
TARGET myapp.elf
C:\Progra~1\ARM\RVCT\Programs\3.0\970\brew\win_32-pentium\armlink -o myapp.elf --ropi --split --reloc AEEAppGen.o AEEModGen.o CPlayer.o CSprite.o Game.o GameClass.o P_CPlatform.o P_CPlayfield.o T_CSprite.o T_CTools.o yspng.o JString.o Utility.o myapp.o --first AEEMod_Load
What could be the problem?
Appreciate your help
Thanks,
San

In order to isolate the problem, you can compile the helloworld appliction using the RVCT 3.x and elf2mod and then try to run in the device.

In order to isolate the problem, you can compile the helloworld appliction using the RVCT 3.x and elf2mod and then try to run in the device.

Hi ruben,
I compiled the helloworld application of BREW v3.1.5 using RVCT 3.x and elf2mod and I uploaded this to the device, It is runnning fine on the device
But in case of my application I got the following error
Error: L6218E: Undefined symbol main (referred from kernel.o)
What should I do to avoid this error?
Thanks,
San

Hi ruben,
I compiled the helloworld application of BREW v3.1.5 using RVCT 3.x and elf2mod and I uploaded this to the device, It is runnning fine on the device
But in case of my application I got the following error
Error: L6218E: Undefined symbol main (referred from kernel.o)
What should I do to avoid this error?
Thanks,
San

Is kernel.c or .cpp your application file? Looks like that file is not getting compiled.

Is kernel.c or .cpp your application file? Looks like that file is not getting compiled.

Hi Ruben,
I found the solution for this at http://www.arm.com/support/faqdev/14222.html
I implemented dummy main as below, in a seperate cpp file
void main()
{
;

Now I am getting the following error
elf2mod: Error: RelocMod:265: ELF2Mod_Exception : RW segment relocion at offset 34360 overshoots segment size 16
Is there any problem in implementing the main or any thing else?
Thanks,
San

Hi Ruben,
I found the solution for this at http://www.arm.com/support/faqdev/14222.html
I implemented dummy main as below, in a seperate cpp file
void main()
{
;

Now I am getting the following error
elf2mod: Error: RelocMod:265: ELF2Mod_Exception : RW segment relocion at offset 34360 overshoots segment size 16
Is there any problem in implementing the main or any thing else?
Thanks,
San

What is interesting is that we don't encounter this problem. I am using RVDS 3.1 (RVCT3.x) compile the code and pass through the ELF2MOD and run in the device without any problem.
Are you doing any custom scatter loading (are you working for device manufacturer, because for BREW only device manufacturer can do any custom scatter loading of the segments), if so problem would different.

What is interesting is that we don't encounter this problem. I am using RVDS 3.1 (RVCT3.x) compile the code and pass through the ELF2MOD and run in the device without any problem.
Are you doing any custom scatter loading (are you working for device manufacturer, because for BREW only device manufacturer can do any custom scatter loading of the segments), if so problem would different.

Hi Ruben,
I am working on porting a game to LG 10000.
I am not working for device manufacturer.
what is custom scatter loading?
Can you tell me who will help me to solve the error?
Thanks,
Santhosh

Hi Ruben,
I am working on porting a game to LG 10000.
I am not working for device manufacturer.
what is custom scatter loading?
Can you tell me who will help me to solve the error?
Thanks,
Santhosh

Ok if you are doing just BREW application building (not doing any OEM work) then it is still likely that you have issues in the make file.
You may want to thoroughly cross check the make file.

Ok if you are doing just BREW application building (not doing any OEM work) then it is still likely that you have issues in the make file.
You may want to thoroughly cross check the make file.

Hi Ruben,
Could you please check the attached make file thoroughly?
Thanks,
San

Hi Ruben,
Could you please check the attached make file thoroughly?
Thanks,
San

Hi Ruben,
Can you please look in to my make file attached in previous query?
Thanks,
San

Hi Ruben,
Can you please look in to my make file attached in previous query?
Thanks,
San

I'd try removing /adsabi (this may break things, so you'll want to recompile everything) and -zas4 (I can't find documentation that says what it does). You could also try upgrading to the latest version of RVCT 3.0 (the patch is available from ARM).

I'd try removing /adsabi (this may break things, so you'll want to recompile everything) and -zas4 (I can't find documentation that says what it does). You could also try upgrading to the latest version of RVCT 3.0 (the patch is available from ARM).

Replace your line
APCS = --apcs /adsabi/$(ROPI)/$(INTERWRK)
with
APCS = --apcs /$(ROPI)/$(INTERWRK)/norwpi
-zas4 does 4 bytes alignment for structures.

Replace your line
APCS = --apcs /adsabi/$(ROPI)/$(INTERWRK)
with
APCS = --apcs /$(ROPI)/$(INTERWRK)/norwpi
-zas4 does 4 bytes alignment for structures.

Thank you for your answers,
I have installed RVCT 3.0 [Build 970].
I think this is the latest build, I do not find any patch for this build.
I modified my make file as you said
APCS = --apcs /adsabi/$(ROPI)/$(INTERWRK)
with
APCS = --apcs /$(ROPI)/$(INTERWRK)/norwpi
Still I am getting the same error
elf2mod: Error: RelocMod:265: ELF2Mod_Exception : RW segment relocion at offset 34360 overshoots segment size 16
What could be the problem?
Thanks,
San

Thank you for your answers,
I have installed RVCT 3.0 [Build 970].
I think this is the latest build, I do not find any patch for this build.
I modified my make file as you said
APCS = --apcs /adsabi/$(ROPI)/$(INTERWRK)
with
APCS = --apcs /$(ROPI)/$(INTERWRK)/norwpi
Still I am getting the same error
elf2mod: Error: RelocMod:265: ELF2Mod_Exception : RW segment relocion at offset 34360 overshoots segment size 16
What could be the problem?
Thanks,
San

Was there ever a fix for this?
I did find a post in someone's blog that said to use "--rw-base" and choose a large number. So I tried:
--rw-base 40000
This fixed the error but I'm still having runtime crashes that I'm inclined to blame on this compile option.
Any thoughts?

Was there ever a fix for this?
I did find a post in someone's blog that said to use "--rw-base" and choose a large number. So I tried:
--rw-base 40000
This fixed the error but I'm still having runtime crashes that I'm inclined to blame on this compile option.
Any thoughts?

I just tried using: "--ro-base 0" and that seems to have fixed the link error and the crashes.

I just tried using: "--ro-base 0" and that seems to have fixed the link error and the crashes.

Hi,
I am new to RVCT 3.0. I am compiling my code using RVCT3.0. I was getting the error like:
elf2mod: Error: RelocMod:265: ELF2Mod_Exception : RW segment relocion at offset 34488 overshoots segment size 16
when I added --rw-base 40000, this error was removed but still application was crashing. Also I tried using --ro-base 0 but still my mod is crashing... :mad:
After dubugging, I found crash while calling pure virtual function. Which option shall I use to compile a file having pure virtual function calls? my make file is similar to the one santhosh_gampa had referred except I had removed -zas4 option.
Also I found in documentation that "If your code calls a pure virtual function, then
the compiler includes a call to the library function __cxa_pure_virtual. You must not
call this function directly." I included this function in a file just before new and delete are overloaded.
void __cxa_pure_virtual(void)
{
}
Still it didnt woked.
Can someone please tell me, what options to be used for the same? Can anyone please paste make file options? It will be a great help.
Also, please correct me if I am going in wrong direction.
Quick reply is appreciated...
Thanks in Advance!

Hi,
I am new to RVCT 3.0. I am compiling my code using RVCT3.0. I was getting the error like:
elf2mod: Error: RelocMod:265: ELF2Mod_Exception : RW segment relocion at offset 34488 overshoots segment size 16
when I added --rw-base 40000, this error was removed but still application was crashing. Also I tried using --ro-base 0 but still my mod is crashing... :mad:
After dubugging, I found crash while calling pure virtual function. Which option shall I use to compile a file having pure virtual function calls? my make file is similar to the one santhosh_gampa had referred except I had removed -zas4 option.
Also I found in documentation that "If your code calls a pure virtual function, then
the compiler includes a call to the library function __cxa_pure_virtual. You must not
call this function directly." I included this function in a file just before new and delete are overloaded.
void __cxa_pure_virtual(void)
{
}
Still it didnt woked.
Can someone please tell me, what options to be used for the same? Can anyone please paste make file options? It will be a great help.
Also, please correct me if I am going in wrong direction.
Quick reply is appreciated...
Thanks in Advance!

Perhaps try --rw-base 0 and also set --ro-base 0
You can even try removing --rw-base 40000 altogether and just set ro-base to zero.
This seems to work for me although exceptions don't work at all. :(

Perhaps try --rw-base 0 and also set --ro-base 0
You can even try removing --rw-base 40000 altogether and just set ro-base to zero.
This seems to work for me although exceptions don't work at all. :(