PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

PocketHAL on SmartPhone

I read somewhere that PocketHAL works on SmartPhones aswell as Pocket PC. I'm using Visual Studio 2005 beta 2 with the new ARM emulating emulators. And I am using PHAL version 0.7.7.

I have everything working on all Pocket PC's I have available (iPaq hw6515, iPaq h5450, Dell Axim x30 and QTek S100). Everything works just fine in both the Pocket PC and the SmartPhone emulators. I just have it working on a real SmartPhone. I have tried both QTek 8080 and Sagem MY-S7 without success.

Does anyone know what I am missing here? My project is a C++ Win32 project with support for both PocketPC and SmartPhone. The SmartPhone project even run on Pocket PC hardware.

EDIT:

I forgot to tell about what actually happens. What happens is that the project is deployed and I get this "Do you really want to run this app from an unknown source"-warning, which I answear yes to. And then, if I run in debug mode, Visual Studio gives me this error message

"Unable to start program '<path to exe>'. Operation not supported. Unknown error: 0x89731102."

And the SmartPhone freez up badly. It does not respons to any keys besides that the backlight gets turned on. And so I reset it and start over again.
I'm not sure what processor those SmartPhones have but I expect are you're getting that because you're compiling for the wrong processor and it's trying to execute an instruction that isn't supported. Check it, do a full recompile and see how you go. Good luck with it.
it seems like the app is not signed. are you using the smartphone sdk and choosen smartphone as the target platform in the options? (there's a bar where I must choose pocket pc / smartphone when compiling both versions, I'm sorry I don't know its name)
The project is fine, before I added PHAL to the project it worked. I compile the code for SmartPhone, so it's not that.

The exact CPU is ARM OMAP 710 on the QTek 8080.

Btw. GAPI refuse to work too.. :(
Alright then try compiling for ARM.
The code works on Sagem MY-S7(unchanged, I was wrong in my first post). However it still doesnt work on the QTek 8080.

I will contribute with any testing or other input if you are interested in making PHAL work on these phones.
Have you tried the PHAL minimal sample?
Yes I have, it didn't work.

Can I give you guys any concrete information?

I started with a regular C++ "Smart device" win32 application that supports both pocket pc and smartphone. I compiled (with the ARM-compiler) that application and run it on both pocket pc and smartphone. It worked. I have no what so ever problems writing and running other C++ applications for the 8080.

The executable works as it should on Sagem MY-S7, but it doesn't work on QTek 8080.
Ok, this is quite strange. For some reason I cannot run any C++ SmartPhone projects from Visual Studio any more. But I can deploy and run them from explorer within the SmartPhone.

PHAL works fine now, thanks for all help :)
Glad you solved it :)
Could it be that visual studio was copying the wrong exe file to the phone before executing it?
:) I don't know actually. I started a new project (in all my years with pocket pc developing, this has allways been the final solution :D) and I found out that the device wouldn't accept even a fresh Win32 project.

Finally I decided that I should copy the file onto the device and run it manually since it regular applications worked just a couple of days earlier. And it worked, and I don't know if magic struc that device, because since then I can run and debug my PHAL-projects from Visual Studio just fine.

I have never experience this behaviour 8O

Also note that there is no difference in running a PHAL project as SmartPhone/PocketPC. You can move a pocket pc exe from the pocket pc straight to the smartphone and run it as is. Ofcourse the screen is smaller but it doesnt make any difference in the binary.
If you don't use any Pocket-PC specific APIs, then the same executable should indeed run on both Pocket PC, Smartphone and any other Windows CE device.

PocketHAL achieves this by not statically linking to any PPC specific libs.