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

Developer

Forums

Hi All,

Since I am newbie to the brew platform, sorry for any basic/repeated question. Actually i have already searched on this on forums and other webpages but no straight answers.

I have existing C++ code application which I have to port to Brew. Need to know whether RTTI (all kinds of type casting) will work on Brew?
What I read from below is "Partial support". now what is that?
If the answer is NO, how should I take care of handling it?

http://infocenter.arm.com/A6FF1726-9F51-45F3-9794-63438541E0A1/FinalDownload/DownloadId-70BC620AFF86B93D0074E6AB6E7825B6/A6FF1726-9F51-45F3-9794-63438541E0A1/help/topic/com.arm.doc.dui0171b/DUI0171B_rvct_brew_compilers_libraries.pdf

Now does Brew support exception handling? If not, how to support it? I have to use same C++ code on Brew platform with as minimal changes as possible.

Can someone give me concrete answers on these?

Regards,
Aahna

ARM RVCT 3.0 for BREW compiler comes with NO STANDARD C/C++ LIBRARY support whatsoever. Even worse, it comes with a "standard library" that will link successfully but crash device on every call of every function.
So while compiler itself will compile exception handling code, it will be linked to support functions from this so called "library" which means your application will crash the device every time exception is thrown.
While implementing your own version of functions like strcpy() and fopen() using BREW platform specific APIs is relatively easy (why ARM didn't do it?), implementing exception handling support library functions is much more difficult.

ARM RVCT 3.0 for BREW compiler comes with NO STANDARD C/C++ LIBRARY support whatsoever. Even worse, it comes with a "standard library" that will link successfully but crash device on every call of every function.
So while compiler itself will compile exception handling code, it will be linked to support functions from this so called "library" which means your application will crash the device every time exception is thrown.
While implementing your own version of functions like strcpy() and fopen() using BREW platform specific APIs is relatively easy (why ARM didn't do it?), implementing exception handling support library functions is much more difficult.

Thanks for the reply Dev.
I have tried ARM RVCT within RVDS 4.0 professional version and yes my c++ code including RTTI and exception handling scenario get compiled and mod file also getting generated.
Though I am yet to test the same on device whether it would work or not.
Meanwhile, can you/anyone tell me how can I port my present C++ application code to brew then? We are already using many instances of RTTI and exceptions in our codebase.
Please reply.
Regards,
Aahna

Thanks for the reply Dev.
I have tried ARM RVCT within RVDS 4.0 professional version and yes my c++ code including RTTI and exception handling scenario get compiled and mod file also getting generated.
Though I am yet to test the same on device whether it would work or not.
Meanwhile, can you/anyone tell me how can I port my present C++ application code to brew then? We are already using many instances of RTTI and exceptions in our codebase.
Please reply.
Regards,
Aahna

Is it documented anywhere that RVCT 4.0 is not compatible with Brew?
I am using RVDS 4.0 Professional version on my brew code. It compiles the code fine. Though I have some doubts as follows:
1) Does ARM compiler allow std namespace? I started getting linking time errors with few methods/classes in my code which are defined in std namespace as well.
2) Does Brew allow exception handling? We tried simple divide by zero operation in our code and application crashed on simulator. So does it mean that all try/catch should be removed from our c++ code???
3) RTTI works fine on brew simulator. We are yet to try on device but if someone can confirm us that brew doesn't support dynamic/runtime cast, we can try to find the alternative from now on only. ARM is able to compile to brew code having RTTI without any problems. But I posted thread on this forum and got to know that brew devices application will crash as soon as it will find RTTI/Exception scenario.
Regards,
Aahna

Is it documented anywhere that RVCT 4.0 is not compatible with Brew?
I am using RVDS 4.0 Professional version on my brew code. It compiles the code fine. Though I have some doubts as follows:
1) Does ARM compiler allow std namespace? I started getting linking time errors with few methods/classes in my code which are defined in std namespace as well.
2) Does Brew allow exception handling? We tried simple divide by zero operation in our code and application crashed on simulator. So does it mean that all try/catch should be removed from our c++ code???
3) RTTI works fine on brew simulator. We are yet to try on device but if someone can confirm us that brew doesn't support dynamic/runtime cast, we can try to find the alternative from now on only. ARM is able to compile to brew code having RTTI without any problems. But I posted thread on this forum and got to know that brew devices application will crash as soon as it will find RTTI/Exception scenario.
Regards,
Aahna