Emulator =/= Cellphone (what you see isn't what you get) | developer.brewmp.com Emulator =/= Cellphone (what you see isn't what you get) | developer.brewmp.com

Developer

Emulator =/= Cellphone (what you see isn't what you get)

Forums:

I've come across several cases where what you get on the emulator does not reflect what you get on the phone once the app is loaded up. And I'm not just talking about the cosmetic stuff like fonts and graphics sizes.

The phone mysteriously crashes or hangs, and this cannot be replicated on the emulator. This is especially for the big endian Nokia phones and I suspect some endian specific code which is doing it. The emulator isn't the real thing and won't go all the way to the level of the memory.

And I'm suspecting some other small BREW API implementation differences on other phones which are not caught by the emulator.

This makes it very very tough to debug since I'm essentially working blind. I'm wondering if any of you have any hints or tips on how to deal with this... Thanks in advance.

Perhaps it would be easier for you to post the devices your interested in. There are numerous problems with a large number of devices out there, and listing them would take quite a while.

Perhaps it would be easier for you to post the devices your interested in. There are numerous problems with a large number of devices out there, and listing them would take quite a while.

Actually I believe he said the Nokia :)
I wish I could offer some help, but all I have is consolation - the Nokia is indeed a different beast. 99% seems to work as planned, but finding that 1% has been painful to say the least. We had a lot of instability from some code in our network connections, to be exact we freed up a variable too soon - it never affected the emulator or 15 other phones, but caused the Nokia to crash.
The other big thing is make sure you don't just compile big endian, but get the flags in there as well. I learned that one the hard way, we had some very odd errors but it ran - turned out the flags were not added to the mak file.
Curt

Actually I believe he said the Nokia :)
I wish I could offer some help, but all I have is consolation - the Nokia is indeed a different beast. 99% seems to work as planned, but finding that 1% has been painful to say the least. We had a lot of instability from some code in our network connections, to be exact we freed up a variable too soon - it never affected the emulator or 15 other phones, but caused the Nokia to crash.
The other big thing is make sure you don't just compile big endian, but get the flags in there as well. I learned that one the hard way, we had some very odd errors but it ran - turned out the flags were not added to the mak file.
Curt

The MAP file is your friend!

The MAP file is your friend!

My problem phones?
Audiovox CDM-8900 (some data access error to a set of addresses)
(Suspecting CDM-9900 too)
Nokia 3589i (just crashes, no idea when or what)
Yeah, time to go look at the MAP file Any specific flags for the compiler to spit out these kinds of output that would be helpful? Thanks for the replies...

My problem phones?
Audiovox CDM-8900 (some data access error to a set of addresses)
(Suspecting CDM-9900 too)
Nokia 3589i (just crashes, no idea when or what)
Yeah, time to go look at the MAP file Any specific flags for the compiler to spit out these kinds of output that would be helpful? Thanks for the replies...

-LIST filename.map -MAP
are the linker options you'll have to add to the link step to create a map file.
Your address access errors are most likely due to odd address accesses, so look out for that and/or make sure to add -zas4 to your compiler arguments to make sure structures are aligned on 4-byte boundaries.

-LIST filename.map -MAP
are the linker options you'll have to add to the link step to create a map file.
Your address access errors are most likely due to odd address accesses, so look out for that and/or make sure to add -zas4 to your compiler arguments to make sure structures are aligned on 4-byte boundaries.

Quote:Originally posted by eightyhertz
The phone mysteriously crashes or hangs, and this cannot be replicated on the emulator. This is especially for the big endian Nokia phones and I suspect some endian specific code which is doing it. The emulator isn't the real thing and won't go all the way to the level of the memory.
Maybe the problem is with the options you are passing to the arm compiler ? For example, by default the brew/arm makefile specifies little endian architecture.

Quote:Originally posted by eightyhertz
The phone mysteriously crashes or hangs, and this cannot be replicated on the emulator. This is especially for the big endian Nokia phones and I suspect some endian specific code which is doing it. The emulator isn't the real thing and won't go all the way to the level of the memory.
Maybe the problem is with the options you are passing to the arm compiler ? For example, by default the brew/arm makefile specifies little endian architecture.

Quote:Originally posted by Benjamin
Maybe the problem is with the options you are passing to the arm compiler ? For example, by default the brew/arm makefile specifies little endian architecture.
Hmm. Definitely not. I checked the options... the app manages to run for a while, then crashes. Ouch.

Quote:Originally posted by Benjamin
Maybe the problem is with the options you are passing to the arm compiler ? For example, by default the brew/arm makefile specifies little endian architecture.
Hmm. Definitely not. I checked the options... the app manages to run for a while, then crashes. Ouch.

Quote:Originally posted by Dragon
Your address access errors are most likely due to odd address accesses, so look out for that and/or make sure to add -zas4 to your compiler arguments to make sure structures are aligned on 4-byte boundaries.
After reading this thread I have to ask: would anyone be willing to share the complete set of flags you're using to (successfully) compile and link for the Nokia 3589i?
See, the phone's data sheet mentions the -fy flag, which cannot be found in the RVCT documenation. Likewise, I am unable to find the -zas4 flag referenced by Dragon above.
I'm just hoping someone will teach me this incantation, since neither ARM nor Nokia seem interested in sharing it... :(
Thanks!
P.S. I have since found this thead - if you have anything to add to what is recommnded here, please do so.

Quote:Originally posted by Dragon
Your address access errors are most likely due to odd address accesses, so look out for that and/or make sure to add -zas4 to your compiler arguments to make sure structures are aligned on 4-byte boundaries.
After reading this thread I have to ask: would anyone be willing to share the complete set of flags you're using to (successfully) compile and link for the Nokia 3589i?
See, the phone's data sheet mentions the -fy flag, which cannot be found in the RVCT documenation. Likewise, I am unable to find the -zas4 flag referenced by Dragon above.
I'm just hoping someone will teach me this incantation, since neither ARM nor Nokia seem interested in sharing it... :(
Thanks!
P.S. I have since found this thead - if you have anything to add to what is recommnded here, please do so.

It is my understanding that the -zas flag is not supported in newer version of the RVCT. I am not using it in any of my projects, wiht no ill effects. Qualcomm isn't using it in their newer example make files.
In fact I recomend looking at the example makefiles, especially those from the 3.0 sdk to see what build options Qualcomm is currently using.

It is my understanding that the -zas flag is not supported in newer version of the RVCT. I am not using it in any of my projects, wiht no ill effects. Qualcomm isn't using it in their newer example make files.
In fact I recomend looking at the example makefiles, especially those from the 3.0 sdk to see what build options Qualcomm is currently using.