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

Developer

Forums

Forums:

I'm interested to know if anyone has had success building GCC to cross-compiler for ARM / standalone using ELF binaries. If so, which version of GCC are you running and what platform did you use? I've tried configuring multiple versions of GCC in both Cygwin and Red Hat Linux with no avail. Does anybody have any hints, pointers to necessary patches, helpful websites?

It's been several months since I've seen a discussion about GCC in the forum, so I'm assuming everyone is taking the $1500 splurge for the proprietary ARM BREW Builder.

I'd be very interested in this as well. I'd imagine the ARM builder probably compiles to its own binary format (ELF probably wouldn't cut it) and that binary format would have to be added to the GCC suite for it to work. Otherwise, it'd be as simple as building a GCC cross compiler as you said.

I'd be very interested in this as well. I'd imagine the ARM builder probably compiles to its own binary format (ELF probably wouldn't cut it) and that binary format would have to be added to the GCC suite for it to work. Otherwise, it'd be as simple as building a GCC cross compiler as you said.

Interesting, some google searches later I found some postings on the brew-developers mailing list that indicates the .mod file format is indeed ELF, with a lot of stuff stripped out. Somebody had got GCC working cross-compiling to the target "arm-phone-elf", but they couldn't upload their apps to the phone (didn't have any of the tools)

Interesting, some google searches later I found some postings on the brew-developers mailing list that indicates the .mod file format is indeed ELF, with a lot of stuff stripped out. Somebody had got GCC working cross-compiling to the target "arm-phone-elf", but they couldn't upload their apps to the phone (didn't have any of the tools)

Hi guys,
I've been looking into the whole gcc thing, and I've got some info if you're interested.
First, in the interest of saving size, my guess is the mod file is little more than a straight binary (i.e elf file with objcopy with the strip flag on). No big deal there.
Second, there is a gcc compiler that will produce code for the phone. The phones use ARM7TDMI processors, which is exactly the same processor a gameboy advance uses. There are sites on the internet where people have built gcc for this cpu (Devkit Advance is one of them). Of course, you need to compile and link with the right flags. You need to use the -mapcs-reentrant and -mthumb-interwork flags when compiling (at least). This will compile your code for position independance, as well as branching support for arm and thumb. Once compiled, just use objcopy to strip the elf, and rename to .mod.
The part that I haven't gotten to figuring out is the link file. I'm assuming there are RO and RW sections that need to be specified, however I have no idea yet which addresses those entail. If anyone has any info on that, that would be kewl. :)
The other option is download the gcc source and download the gcc compiler and then set the processor flags to make the bins. But why do that when it is already done for you :).
Hope this is helpful to someone.
Just Me,
*SF

Hi guys,
I've been looking into the whole gcc thing, and I've got some info if you're interested.
First, in the interest of saving size, my guess is the mod file is little more than a straight binary (i.e elf file with objcopy with the strip flag on). No big deal there.
Second, there is a gcc compiler that will produce code for the phone. The phones use ARM7TDMI processors, which is exactly the same processor a gameboy advance uses. There are sites on the internet where people have built gcc for this cpu (Devkit Advance is one of them). Of course, you need to compile and link with the right flags. You need to use the -mapcs-reentrant and -mthumb-interwork flags when compiling (at least). This will compile your code for position independance, as well as branching support for arm and thumb. Once compiled, just use objcopy to strip the elf, and rename to .mod.
The part that I haven't gotten to figuring out is the link file. I'm assuming there are RO and RW sections that need to be specified, however I have no idea yet which addresses those entail. If anyone has any info on that, that would be kewl. :)
The other option is download the gcc source and download the gcc compiler and then set the processor flags to make the bins. But why do that when it is already done for you :).
Hope this is helpful to someone.
Just Me,
*SF

Well, it seems my gcc experimentation has come to an end. Apparently, even though gcc has a flag to support position independant code, it doesn't actually support it. The flag is ignored when passed to the compiler :(.
So, it would seem that until this feature is implemented gcc cannot be used to compile for the phones.
Worth a shot though :).
Just Me,
*SF

Well, it seems my gcc experimentation has come to an end. Apparently, even though gcc has a flag to support position independant code, it doesn't actually support it. The flag is ignored when passed to the compiler :(.
So, it would seem that until this feature is implemented gcc cannot be used to compile for the phones.
Worth a shot though :).
Just Me,
*SF

What version of GCC were you using with the cross-compiler? GCC 3.2 was recently released, although I've heard that building a cross-compiler from source can be very involved so I haven't bothered to try yet.
I assume you mean the -fPIC or -fpic options?

What version of GCC were you using with the cross-compiler? GCC 3.2 was recently released, although I've heard that building a cross-compiler from source can be very involved so I haven't bothered to try yet.
I assume you mean the -fPIC or -fpic options?

Searching through GCC 3.2's source code in the gcc/config/arm/ directory, it looks like PIC support is there. I'm building gcc 3.2 and binutils 2.13 right now on a Linux system, with --target=arm-phone-elf
Hopefully the build will work :)
Is there any source code you'd like me to try on it if the cross-compiler builds correctly?

Searching through GCC 3.2's source code in the gcc/config/arm/ directory, it looks like PIC support is there. I'm building gcc 3.2 and binutils 2.13 right now on a Linux system, with --target=arm-phone-elf
Hopefully the build will work :)
Is there any source code you'd like me to try on it if the cross-compiler builds correctly?

I was using devkit advance, gcc targeted to the arm7tdmi. I'm not sure what version it is (I think it's 3.12 or something of the like).
The flag necessary to compile for the phone is -mapcs-reentrant. This alows for position independant code (similar to the -ropi flag for the ARM dev system). As of the above version, the flag is not supported and is ignored by gcc.
After reading a few notes on the new releases of gcc, I did not see any mention of the functionality being added in (I could have missed it though :) ). Without this capability, you could compile for the code for the phones, but it would not run.
I just tried building the example apps with gcc but didn't get very far with it. If the new versions of gcc support position independant code, then I'll download the cource and build a windows version :).
Just Me,
*SF

I was using devkit advance, gcc targeted to the arm7tdmi. I'm not sure what version it is (I think it's 3.12 or something of the like).
The flag necessary to compile for the phone is -mapcs-reentrant. This alows for position independant code (similar to the -ropi flag for the ARM dev system). As of the above version, the flag is not supported and is ignored by gcc.
After reading a few notes on the new releases of gcc, I did not see any mention of the functionality being added in (I could have missed it though :) ). Without this capability, you could compile for the code for the phones, but it would not run.
I just tried building the example apps with gcc but didn't get very far with it. If the new versions of gcc support position independant code, then I'll download the cource and build a windows version :).
Just Me,
*SF

ah shucks
I checked the gcc-3.2 code for presence of that option, it is in there but I'm not sure if it does anything.
I found one blurb on a google search:
`-mapcs-reentrant'
Generate reentrant, position independent code. This is the
equivalent to specifying the `-fpic' option. The default is
`-mno-apcs-reentrant'.
I suppose you tried it with -fPIC or -fpic as well?
Searching through the source code of 3.2 it looks like -mapcs-reentrant still isn't supported: (from gcc/config/arm.c)
if (TARGET_APCS_REENT)
warning ("APCS reentrant code not supported. Ignored");
Goofy thing is, right above that is:
if (TARGET_APCS_REENT && flag_pic)
error ("-fpic and -mapcs-reent are incompatible");

ah shucks
I checked the gcc-3.2 code for presence of that option, it is in there but I'm not sure if it does anything.
I found one blurb on a google search:
`-mapcs-reentrant'
Generate reentrant, position independent code. This is the
equivalent to specifying the `-fpic' option. The default is
`-mno-apcs-reentrant'.
I suppose you tried it with -fPIC or -fpic as well?
Searching through the source code of 3.2 it looks like -mapcs-reentrant still isn't supported: (from gcc/config/arm.c)
if (TARGET_APCS_REENT)
warning ("APCS reentrant code not supported. Ignored");
Goofy thing is, right above that is:
if (TARGET_APCS_REENT && flag_pic)
error ("-fpic and -mapcs-reent are incompatible");

Interesting, here was from USENET on gnu.gcc.help from Feb. 2001:
google groups page

Interesting, here was from USENET on gnu.gcc.help from Feb. 2001:
google groups page

hmm, I think I'm probably in a bit over my head with the GCC cross-compiler creation, to build a GCC cross-compiler I need to have include files and some gcc-specific objects (crt0.o, some other ones) that are built/specific to the ARM architecture, so unless I find them in some other source (perhaps that DevKit would have them) I'll have to wait on building a cross-compiler for now.
----
On second thought, I just found the "CrossGCC" FAQ, available at http://www.sthoward.com/CrossGCC/
Looks like I'll research from there.

hmm, I think I'm probably in a bit over my head with the GCC cross-compiler creation, to build a GCC cross-compiler I need to have include files and some gcc-specific objects (crt0.o, some other ones) that are built/specific to the ARM architecture, so unless I find them in some other source (perhaps that DevKit would have them) I'll have to wait on building a cross-compiler for now.
----
On second thought, I just found the "CrossGCC" FAQ, available at http://www.sthoward.com/CrossGCC/
Looks like I'll research from there.

I didn't try the -fpic option for compiling. It seemed that it was the same as the reentrant option. I'm not quite sure what fpic would do with the arm code though.
The -mapcs-reentrant would have specifically handled the arm/thumb (apcs - arm procedure call standard). What special handling would need to be done, I'm not sure. The arm procedure call standard is available from the arm website, along with all sorts of documentation.
It's cool that you found that line in the source. But if that's the latest source then it does seem to be not supported. :(
Regardless, I'm still going to research it a bit more. Perhaps it's not a huge task to write that section. ;)
I have built gcc before, but it was a while ago, and yes it's not the most fun in the world. Maybe they cleaned it up a bit :). I'll look at the link you posted.
Maybe not all hope is gone for gcc. But I am not expecting qualcomm to be willing to donate any of their efforts to the open source community. *sigh*
Just Me,
*SF

I didn't try the -fpic option for compiling. It seemed that it was the same as the reentrant option. I'm not quite sure what fpic would do with the arm code though.
The -mapcs-reentrant would have specifically handled the arm/thumb (apcs - arm procedure call standard). What special handling would need to be done, I'm not sure. The arm procedure call standard is available from the arm website, along with all sorts of documentation.
It's cool that you found that line in the source. But if that's the latest source then it does seem to be not supported. :(
Regardless, I'm still going to research it a bit more. Perhaps it's not a huge task to write that section. ;)
I have built gcc before, but it was a while ago, and yes it's not the most fun in the world. Maybe they cleaned it up a bit :). I'll look at the link you posted.
Maybe not all hope is gone for gcc. But I am not expecting qualcomm to be willing to donate any of their efforts to the open source community. *sigh*
Just Me,
*SF

Yeah that link had some details about the PIC stuff--the -fPIC (note capital PIC) is identical to -mapcs-reentrant, and -fpic is something different that I believe was supported.
I was rather disappointed when I realized BREW was as closed as it is, and somewhat regret buying a BREW phone (now I can't have any fun with it! :o ), but who knows, if there is ANY hope of open-source BREW at all, then it'll be fun working on it :)
Needless to say, I'm not recommending BREW-based phones to anybody I know. I'd have much rather bought a Palm or J2ME-compatible one instead.

Yeah that link had some details about the PIC stuff--the -fPIC (note capital PIC) is identical to -mapcs-reentrant, and -fpic is something different that I believe was supported.
I was rather disappointed when I realized BREW was as closed as it is, and somewhat regret buying a BREW phone (now I can't have any fun with it! :o ), but who knows, if there is ANY hope of open-source BREW at all, then it'll be fun working on it :)
Needless to say, I'm not recommending BREW-based phones to anybody I know. I'd have much rather bought a Palm or J2ME-compatible one instead.

i'm all for a free compiler even if it is gcc. But what you gonna do with the results ? you can't upload it to the phone anyway. and the emulators VC anyway.

i'm all for a free compiler even if it is gcc. But what you gonna do with the results ? you can't upload it to the phone anyway. and the emulators VC anyway.

>i'm all for a free compiler even if it is gcc. But what you gonna do >with the results?
Well, make it into a .mod file. The compiled file is just an elf file. Strip it with objcopy and your left with a pure binary. AFAIK, the mod file is nothing more than this.
> you can't upload it to the phone anyway.
Why not? The program for loading to a phone just transports files across. It doesn't care about the files it's transferring. I accidently transfered a directory full of files one time, so I'm pretty sure anything goes. :)
> and the emulators VC anyway.
This wouldn't be for VC. This is just for compiling binaries to run on the phone.
Just Me,
*SF

>i'm all for a free compiler even if it is gcc. But what you gonna do >with the results?
Well, make it into a .mod file. The compiled file is just an elf file. Strip it with objcopy and your left with a pure binary. AFAIK, the mod file is nothing more than this.
> you can't upload it to the phone anyway.
Why not? The program for loading to a phone just transports files across. It doesn't care about the files it's transferring. I accidently transfered a directory full of files one time, so I'm pretty sure anything goes. :)
> and the emulators VC anyway.
This wouldn't be for VC. This is just for compiling binaries to run on the phone.
Just Me,
*SF

err well as a developer i cant upload to the phone without having a phone thats been modified by qualcomm, then theres the sig ?
or you saying you want an alternative to the arm compiler for approved development, as opposed to a free development platform ?
i already use gcc sometimes, but since the codegen is far inferior to most other compilers, its rarely of benefit.

err well as a developer i cant upload to the phone without having a phone thats been modified by qualcomm, then theres the sig ?
or you saying you want an alternative to the arm compiler for approved development, as opposed to a free development platform ?
i already use gcc sometimes, but since the codegen is far inferior to most other compilers, its rarely of benefit.

AFAIK, any phone with a brew flash should be able to upload froma computer, but I could be wrong about that.
You can get a temp sig from the qualcoom site now, so that's not a big deal.
The original line was to have a free compiler alternative to the $1500 ARM suite. GCC can compile for the CPU of brew phones and is 100% free.
Of course, GCC isn't going to generate code as good as ARM dev. GCC works on multiple CPUS and platforms, while ARM dev works with strictly arm based processors. For the limited systems on these phones, I would much rather code everything in assembler anyway (but deving for that is impractical, given the emulator environment).
You mention that you're using GCC for the phone. How did you get around the fact that the compiler doesn't generate position independant code?
Just Me,
*SF

AFAIK, any phone with a brew flash should be able to upload froma computer, but I could be wrong about that.
You can get a temp sig from the qualcoom site now, so that's not a big deal.
The original line was to have a free compiler alternative to the $1500 ARM suite. GCC can compile for the CPU of brew phones and is 100% free.
Of course, GCC isn't going to generate code as good as ARM dev. GCC works on multiple CPUS and platforms, while ARM dev works with strictly arm based processors. For the limited systems on these phones, I would much rather code everything in assembler anyway (but deving for that is impractical, given the emulator environment).
You mention that you're using GCC for the phone. How did you get around the fact that the compiler doesn't generate position independant code?
Just Me,
*SF

yeah i figured thats what you meant, i'd read it as developing a free development system, rather than as an alternate to armcc for a open dev platform dealy
I use a mixture of the intel gcc and output to asm and any hand tweaking since its optimization of some stuff armcc doesnt support , , like i said itd only sometimes , and since i have armcc theres really little point for me. But if you are into it, i'd start with that version.
-msingle-pic-base
-mpic-register=reg
I've been also been using symbians build of gcc.
hich gcc are using ? 2.95.s and later should have those for you.
charlie

yeah i figured thats what you meant, i'd read it as developing a free development system, rather than as an alternate to armcc for a open dev platform dealy
I use a mixture of the intel gcc and output to asm and any hand tweaking since its optimization of some stuff armcc doesnt support , , like i said itd only sometimes , and since i have armcc theres really little point for me. But if you are into it, i'd start with that version.
-msingle-pic-base
-mpic-register=reg
I've been also been using symbians build of gcc.
hich gcc are using ? 2.95.s and later should have those for you.
charlie

I see the discussion has died down...Have any of you made more progress with the gcc toolchain?
gn

I see the discussion has died down...Have any of you made more progress with the gcc toolchain?
gn

Xyrus,
Yep - should be like that but its not.
There is a flag in he phone setup that controls whether BREW software can be loaded via a serial cable. Most carriers set this so as to disable you loading your own software.
Also, to load the software you need the BREW app loader, only available from the BREW developers extranet, which will cost you $400 to get access to.

Xyrus,
Yep - should be like that but its not.
There is a flag in he phone setup that controls whether BREW software can be loaded via a serial cable. Most carriers set this so as to disable you loading your own software.
Also, to load the software you need the BREW app loader, only available from the BREW developers extranet, which will cost you $400 to get access to.

we already went over that part Louie.. read the thread again ;)

we already went over that part Louie.. read the thread again ;)

CharlieX,
I don't mean to be pedantic, but I just skimmed the thread again and couldn't really find anywhere where it had been stated a modified phone + $400 worth of certs is needed to load an app on your phone. Xyrus still believes that he/she can just load a BREW app onto their phone without this.
Regards

CharlieX,
I don't mean to be pedantic, but I just skimmed the thread again and couldn't really find anywhere where it had been stated a modified phone + $400 worth of certs is needed to load an app on your phone. Xyrus still believes that he/she can just load a BREW app onto their phone without this.
Regards

Its not pedanty, you just aren't reading the thread.
"The original line was to have a free compiler alternative to the $1500 ARM suite. GCC can compile for the CPU of brew phones and is 100% free."
He says "Brew flash phone" in reply to my statement "err well as a developer i cant upload to the phone without having a phone thats been modified by qualcomm, then theres the sig ?"
Meaning the phones specifically flashed for brew development.
the discussion is about replacing the ARM CC kit with gcc not a free dev platform. See my quote
"yeah i figured thats what you meant, i'd read it as developing a free development system, rather than as an alternate to armcc for a open dev platform dealy"

Its not pedanty, you just aren't reading the thread.
"The original line was to have a free compiler alternative to the $1500 ARM suite. GCC can compile for the CPU of brew phones and is 100% free."
He says "Brew flash phone" in reply to my statement "err well as a developer i cant upload to the phone without having a phone thats been modified by qualcomm, then theres the sig ?"
Meaning the phones specifically flashed for brew development.
the discussion is about replacing the ARM CC kit with gcc not a free dev platform. See my quote
"yeah i figured thats what you meant, i'd read it as developing a free development system, rather than as an alternate to armcc for a open dev platform dealy"

Charliex,
You may have thought it had been settled, but Xyrus clearly believes that he can upload his app to his BREW phone.
Quote:
AFAIK, any phone with a brew flash should be able to upload froma computer, but I could be wrong about that.
That was the question I was originaly answering.
No drama's though
:)

Charliex,
You may have thought it had been settled, but Xyrus clearly believes that he can upload his app to his BREW phone.
Quote:
AFAIK, any phone with a brew flash should be able to upload froma computer, but I could be wrong about that.
That was the question I was originaly answering.
No drama's though
:)

dude, hes saying a qualcomm flashed phone not an off the shelf one ;)

dude, hes saying a qualcomm flashed phone not an off the shelf one ;)

Ok then - but I interpret that statement as "any phone with BREW installed on the flash" not "with the BREW test enable flag set to true".
BTW, the phone is not "flashed" when sent to qualcomm. Its simply 1 flag that is changed.

Ok then - but I interpret that statement as "any phone with BREW installed on the flash" not "with the BREW test enable flag set to true".
BTW, the phone is not "flashed" when sent to qualcomm. Its simply 1 flag that is changed.

To settle this, I meant a dev phone. :)
The thread was merely discussing a free compiler. Sorry for the confusion.
*X*

To settle this, I meant a dev phone. :)
The thread was merely discussing a free compiler. Sorry for the confusion.
*X*

A GNU BREW compiler is currently in the works and has not been
publicly released yet. We look forward to releasing one to developers soon. In the meantime, please refer to http://www.qualcomm.com/brew/developer/developing/armbrewpack.html for information on the ARM BREW Builder.

A GNU BREW compiler is currently in the works and has not been
publicly released yet. We look forward to releasing one to developers soon. In the meantime, please refer to http://www.qualcomm.com/brew/developer/developing/armbrewpack.html for information on the ARM BREW Builder.

This is good news, but it's been almost a full year since the last post. Any news?
We're interested in exploring moving to OS X for development, so a GNU Compiler would be very good news for us.

This is good news, but it's been almost a full year since the last post. Any news?
We're interested in exploring moving to OS X for development, so a GNU Compiler would be very good news for us.

Still no news on this front?
A alternative compiler for people looking into the brew feild so that inital start up cost was lower would be nice. Personally I think we'll be sticking to the ARM compiler, because I expect that they're optimizations are better sense they know the hardware better.
Although it will be nice to explore who does a better job of compiles.

Still no news on this front?
A alternative compiler for people looking into the brew feild so that inital start up cost was lower would be nice. Personally I think we'll be sticking to the ARM compiler, because I expect that they're optimizations are better sense they know the hardware better.
Although it will be nice to explore who does a better job of compiles.

though it wasnt really a year since the last post ( i think you looked at the members starting date vs posting date) its been a few months.
i've never seen gcc oust any decent compiler in terms of optimization, so its unlikely it'll beat armcc which is a good
one.
you can generate use gcc as weve said before to generate arm code, so if justs comparison you can do that now.

though it wasnt really a year since the last post ( i think you looked at the members starting date vs posting date) its been a few months.
i've never seen gcc oust any decent compiler in terms of optimization, so its unlikely it'll beat armcc which is a good
one.
you can generate use gcc as weve said before to generate arm code, so if justs comparison you can do that now.

Oh yeah, I did misread the date! Apologies!
Yeah OS X for BREW is sort of a pipe dream, but one with a nice GUI. ; )
m4m

Oh yeah, I did misread the date! Apologies!
Yeah OS X for BREW is sort of a pipe dream, but one with a nice GUI. ; )
m4m

Just read in an article in Gamasutra, dated November 25th, 2002:
"...
However, the biggest news is this: BREW 3.0 will include a complete tools revamp including the ability to use GCC to compile native ARM binaries. That's right, you heard me-Qualcomm will allow the use of the free GCC ARM compiler in the creation of BREW applications. Currently you must spend $1500 on ARM's BREW Builder to compile a native binary that runs on an actual handset. This is a major barrier to mobile application development
considering the miniscule budgets for such projects. With the release of BREW 3.0, the free GCC toolchain will be available as an alternative to ARM's expensive compiler suite.
..."
I'm not sure the autor was talking about BREW 2.0 or 3.0 (as there were titles using both versions, but this made me think about one thing: is this coming just in future releases of BREW? Aren't they planning on releasing a compiler that works with BREW 1.1 (the version most phones nowadays implement)?

Just read in an article in Gamasutra, dated November 25th, 2002:
"...
However, the biggest news is this: BREW 3.0 will include a complete tools revamp including the ability to use GCC to compile native ARM binaries. That's right, you heard me-Qualcomm will allow the use of the free GCC ARM compiler in the creation of BREW applications. Currently you must spend $1500 on ARM's BREW Builder to compile a native binary that runs on an actual handset. This is a major barrier to mobile application development
considering the miniscule budgets for such projects. With the release of BREW 3.0, the free GCC toolchain will be available as an alternative to ARM's expensive compiler suite.
..."
I'm not sure the autor was talking about BREW 2.0 or 3.0 (as there were titles using both versions, but this made me think about one thing: is this coming just in future releases of BREW? Aren't they planning on releasing a compiler that works with BREW 1.1 (the version most phones nowadays implement)?

Yes, that's Ralph B, talking about 3.0 in Game Developer Magazine I think.
So, any news on this from the big Q? Could they at least gives us a hint?
m4m

Yes, that's Ralph B, talking about 3.0 in Game Developer Magazine I think.
So, any news on this from the big Q? Could they at least gives us a hint?
m4m

Other thing
In this message:
http://brewlists.qualcomm.com/pipermail/brew-developers/2001-October/000...
a certain guy named Amit Joshi was trying to use a gnu compiler, and it seems he was following a good path... But I don't find any outcome from his attempt... And it was in October 2001 :D. Does anyone have any news about that?

Other thing
In this message:
http://brewlists.qualcomm.com/pipermail/brew-developers/2001-October/000...
a certain guy named Amit Joshi was trying to use a gnu compiler, and it seems he was following a good path... But I don't find any outcome from his attempt... And it was in October 2001 :D. Does anyone have any news about that?

Bueller, Bueller?
Has any progress been made on this? I'd really love to write some apps for my phone, but I'm a student and there's just no way I can come up with almost $2k. It seems like more people would be interested in making this platform more accessable to us poor students :( Why SO expensive??
/b

Bueller, Bueller?
Has any progress been made on this? I'd really love to write some apps for my phone, but I'm a student and there's just no way I can come up with almost $2k. It seems like more people would be interested in making this platform more accessable to us poor students :( Why SO expensive??
/b

there alpha/betas floating around apparently..intel has theirs going.
you'll still need certs though and sig files etc, which is supposed to require a business to get, its nto as costly as the compiler but its still not free.

there alpha/betas floating around apparently..intel has theirs going.
you'll still need certs though and sig files etc, which is supposed to require a business to get, its nto as costly as the compiler but its still not free.

So, I would still need to spend the $400 on Verisign. What else? Do you know how much the Intel compiler will cost? Just trying to get an idea on how much I can expect to shell out. Any idea as to when this will be made available?

So, I would still need to spend the $400 on Verisign. What else? Do you know how much the Intel compiler will cost? Just trying to get an idea on how much I can expect to shell out. Any idea as to when this will be made available?

Another thread that may not be right on point, but it's an area of exploration.

Another thread that may not be right on point, but it's an area of exploration.

intels is gcc too, so its free as well but it'll need a little work to port it in to brew
once thats done its the certs/phones youll need to pay for, with the certs its a yearly fee, and they do expire, as do the sigs.

intels is gcc too, so its free as well but it'll need a little work to port it in to brew
once thats done its the certs/phones youll need to pay for, with the certs its a yearly fee, and they do expire, as do the sigs.

cool, thanks for the info. Now it's just a matter of time....

cool, thanks for the info. Now it's just a matter of time....

I stumbled across a freely available GNU gcc build for the ARM7.
I have not tried this software and therfore don't know if it will work for BREW development. It seems reasonable to expect that it will work as it produces images capable of running on an ARM7 (the Qualcomm phone chipsets in BREW phones all use an ARM7TDMI processor core).
I just thought I'd pass this on to the group to see if some brave soul wants to give it a try.
Good luck!
MB

I stumbled across a freely available GNU gcc build for the ARM7.
I have not tried this software and therfore don't know if it will work for BREW development. It seems reasonable to expect that it will work as it produces images capable of running on an ARM7 (the Qualcomm phone chipsets in BREW phones all use an ARM7TDMI processor core).
I just thought I'd pass this on to the group to see if some brave soul wants to give it a try.
Good luck!
MB

It looks like there is a brew tool for gcc up on the extranet right now.
I have downloaded it but not installed gcc to get it working yet.
I will report back once I do.
Woot

It looks like there is a brew tool for gcc up on the extranet right now.
I have downloaded it but not installed gcc to get it working yet.
I will report back once I do.
Woot

It looks like there is a brew tool for gcc up on the extranet right now.
I have downloaded it but not installed gcc to get it working yet.
I will report back once I do.
Woot

It looks like there is a brew tool for gcc up on the extranet right now.
I have downloaded it but not installed gcc to get it working yet.
I will report back once I do.
Woot

Yeah! Let us know:)

Yeah! Let us know:)

come on pinky, stop posting links to your mom's website. Can a moderator delete that post? Like I don't get enough spam via email...
On an entirely different note, has anybody checked out this new GCC compiler yet? Any luck? If it works, I just might be able to come up with the $400 for Verisign and start developing actual apps for this phone of mine.

come on pinky, stop posting links to your mom's website. Can a moderator delete that post? Like I don't get enough spam via email...
On an entirely different note, has anybody checked out this new GCC compiler yet? Any luck? If it works, I just might be able to come up with the $400 for Verisign and start developing actual apps for this phone of mine.

I've had some success building a GCC cross compiler with Linux. However, now that I have it, I'm a little stumped on the ELF to MOD conversion. There's been suggestions that you can simply strip the ELF with objcopy to produce the executable ARM module, but that doesn't appear to be the case.
I know the compiler & linker are working, since they produce an ELF that can be converted to a MOD with BREWelf2mod.exe, but that doesn't help much, since I've no idea what it's doing. So the question is, does anybody else know what sort of black magic BREWelf2mod.exe is performing to do this conversion?
If you'd like to give it a go, building the toolchain turned out to be fairly trivial - I just snatched the correct parameters from the Gnude folks at http://gnude.blogspot.com/ and they worked just fine. I used binutils 2.13.2, gcc 3.2.1, and newlib 1.12.0. I expect newer versions would work as well.
I'm attaching a quick bash script that I used to build it with, edit to taste.

I've had some success building a GCC cross compiler with Linux. However, now that I have it, I'm a little stumped on the ELF to MOD conversion. There's been suggestions that you can simply strip the ELF with objcopy to produce the executable ARM module, but that doesn't appear to be the case.
I know the compiler & linker are working, since they produce an ELF that can be converted to a MOD with BREWelf2mod.exe, but that doesn't help much, since I've no idea what it's doing. So the question is, does anybody else know what sort of black magic BREWelf2mod.exe is performing to do this conversion?
If you'd like to give it a go, building the toolchain turned out to be fairly trivial - I just snatched the correct parameters from the Gnude folks at http://gnude.blogspot.com/ and they worked just fine. I used binutils 2.13.2, gcc 3.2.1, and newlib 1.12.0. I expect newer versions would work as well.
I'm attaching a quick bash script that I used to build it with, edit to taste.

Almost forgot - you'll need the gcc patch as well. Sorry about the ZIP file, but apparently you're not allowed to attach bz2 or gz files...

Almost forgot - you'll need the gcc patch as well. Sorry about the ZIP file, but apparently you're not allowed to attach bz2 or gz files...

Quote:Originally posted by dante
I've had some success building a GCC cross compiler with Linux. However, now that I have it, I'm a little stumped on the ELF to MOD conversion. There's been suggestions that you can simply strip the ELF with objcopy to produce the executable ARM module, but that doesn't appear to be the case.
That's how ELFs built with the ARM tools are converted to MODs (with the fromelf tool, actually), but that won't work with GCC ELFs. The object code built by GCC uses a global offset table to make function calls within the ELF. (ARMCC object code uses PC relative calls, instead.) BREWelf2mod.exe inserts its own routine for the MOD entry point that sets up the global offset table and then calls the original entry point (AEEMod_Load, normally).
It wouldn't be too hard to extract this routine from one MOD and use it to construct others. I think the routine is modified slightly to accomodate each MOD, so you'd have to figure out what's going on there, but it shouldn't be too hard, since the routine is very short.

Quote:Originally posted by dante
I've had some success building a GCC cross compiler with Linux. However, now that I have it, I'm a little stumped on the ELF to MOD conversion. There's been suggestions that you can simply strip the ELF with objcopy to produce the executable ARM module, but that doesn't appear to be the case.
That's how ELFs built with the ARM tools are converted to MODs (with the fromelf tool, actually), but that won't work with GCC ELFs. The object code built by GCC uses a global offset table to make function calls within the ELF. (ARMCC object code uses PC relative calls, instead.) BREWelf2mod.exe inserts its own routine for the MOD entry point that sets up the global offset table and then calls the original entry point (AEEMod_Load, normally).
It wouldn't be too hard to extract this routine from one MOD and use it to construct others. I think the routine is modified slightly to accomodate each MOD, so you'd have to figure out what's going on there, but it shouldn't be too hard, since the routine is very short.

The gnude project has already done that for you. Soon Gnude will make use if the new 3.4 gcc compiler. I use it to compile and create my mod files which run perfectly on all BREW handsets. Has anyone gotten gcc compiled THUMB mods to run on handsets?

The gnude project has already done that for you. Soon Gnude will make use if the new 3.4 gcc compiler. I use it to compile and create my mod files which run perfectly on all BREW handsets. Has anyone gotten gcc compiled THUMB mods to run on handsets?

The Gnude project has not done it on Linux. As I mentioned before, I really didn't have any trouble building any of the gcc toolchain itself, but BREWelf2mod isn't part of it. All of our distribution goes through our Linux server, so I'm looking for a complete solution so we can build everything (Brew/J2ME) via a script and have everything in the correct place.
The sick thing is, building a Win32 toolchain to build DLLs for the emulator was no trouble at all. Oh, the irony!

The Gnude project has not done it on Linux. As I mentioned before, I really didn't have any trouble building any of the gcc toolchain itself, but BREWelf2mod isn't part of it. All of our distribution goes through our Linux server, so I'm looking for a complete solution so we can build everything (Brew/J2ME) via a script and have everything in the correct place.
The sick thing is, building a Win32 toolchain to build DLLs for the emulator was no trouble at all. Oh, the irony!

Yeah... gnude rocks... here's the thread with all the details on how to use it.
Tyndal really did a bang up job of detailing it so thoroughly that my grandmother can get this to work... and it's free.
http://brewforums.qualcomm.com/showthread.php?t=1601&page=1&pp=15&highli...

Yeah... gnude rocks... here's the thread with all the details on how to use it.
Tyndal really did a bang up job of detailing it so thoroughly that my grandmother can get this to work... and it's free.
http://brewforums.qualcomm.com/showthread.php?t=1601&page=1&pp=15&highli...

Yes, Gnude works fine, I am currently using it (grudgingly), and yes, Tyndal did a fine job with the instructions. However, I guess I haven't made myself 100% clear.
1. Gnude is built for Windows only,
2. I need the equivalent tools for Linux,
...which logically leads us to:
3. I need to be able to build all of the tools myself.
I've built the gcc suite, and it works fine, but it only gets you as far as the ELF file. To convert it to a MOD, I need to know how BREWelf2mod.exe works, and I really don't. markb explained what needs to be done, but I've no idea how to accomplish that, so I'm kinda stuck right now.
So again, thanks for the suggestions, but the thread is about _building_ a gcc cross-compiler, which is what I need to do. Using Gnude's version of it was never all that difficult, and it doesn't solve the lack of a Unix port.

Yes, Gnude works fine, I am currently using it (grudgingly), and yes, Tyndal did a fine job with the instructions. However, I guess I haven't made myself 100% clear.
1. Gnude is built for Windows only,
2. I need the equivalent tools for Linux,
...which logically leads us to:
3. I need to be able to build all of the tools myself.
I've built the gcc suite, and it works fine, but it only gets you as far as the ELF file. To convert it to a MOD, I need to know how BREWelf2mod.exe works, and I really don't. markb explained what needs to be done, but I've no idea how to accomplish that, so I'm kinda stuck right now.
So again, thanks for the suggestions, but the thread is about _building_ a gcc cross-compiler, which is what I need to do. Using Gnude's version of it was never all that difficult, and it doesn't solve the lack of a Unix port.

perhaps you could look into getting wine to work for Brewelf2mod.exe ..

perhaps you could look into getting wine to work for Brewelf2mod.exe ..