Log in

View Full Version : IPAQ - M$'s EVC++ won't debug


Terling7
September 9th, 2004, 19:33
I've been trying to get into Pocket PC/ARM disassembly by following
heXc - Abusing Microsofts EVT as a debugger at:
hxxp://66.98.132.48/fravia/hexc_evtdebug.htm

I can't get the debugger to start. Normal communications to the IPAQ via ActiveSync work fine. I've installed EN_WINCE_EMBDVTOOLS30.exe and the
eMbedded Visual C++ 3.0 runs and I've followed each step carefully:

"run embedded visual c++ click File / Open and choose 'Executable Files' as the file type you wanna display, browse for the file you want to debug (the one you just downloaded from your device) and load it into the ide. next step is to configure the debugger in order to upload your targets exe-file to the right location on your WinCE device. therefor click onto Project / Settings inside the evc++ ide and go to tab: Debug. In the field 'Download directory' enter the path to your targets executable file on the wince device"

This seems easy, but then comes:
"done all that, hit F11 and evc++ ide will automatically upload the target's .exe-file and the debugger to your device. (i sometimes encountered problems while connecting to ma pocketPC. after resetting it and repeating all the steps described above it worked without any problems.) after the upload's finished you're prolly gonna get some messages telling you that the executable file will not run on that kind of device and that no debug information could be found .. please, just ignore that, we're not gonna need them! after a while the debugger breaks and you got the target absolutely naked in front of you!"

I can't get anything to happen by pressing F11, F5 or by selecting the corresponding menu item. Nothing happens at all. I've tried on W2K, XP, 2 diff comps, and serial and USB ActiveSync links. No diff.

I'm clearly doing something wrong, but can't figure it out. Any hints out there? It's prolly something stupid, but his is for Noobs, which fits me when it comes to PPC/ARM debugsville.

Woodmann
September 9th, 2004, 20:20
Howdy,

This is just a guess.. try the latest debugger.
It could be that the information in the tut you read has become outdated.

Woodmann

Silver
September 13th, 2004, 14:44
I do a lot of PPC (wow, that always means power-pc to me, not pocketpc...) coding. You might have the wrong version of eVC like Woodmann says. WHat version of Windows CE are you using - PocketPC or Mobile?

Terling7
September 13th, 2004, 21:08
Quote:
[Originally Posted by Silver]I do a lot of PPC (wow, that always means power-pc to me, not pocketpc...) coding. You might have the wrong version of eVC like Woodmann says. WHat version of Windows CE are you using - PocketPC or Mobile?


I'm using PocketPC 2002 on an IPAQ. Yes, it appears I'm not using the current version of EVC, so I've d/l'd EVC4,and installed it, but now it complains I've got no CE platform SDK installed. I've actually managed to complete my first project on the IPAQ using IDA, but I'd still like to get a live debugger going, so I'm off to figure out what I'm missing.

Silver
September 14th, 2004, 11:46
Hm, sorry to tell you this, exe's built with eVC 4 do not work on pocketpc 2002 devices. eVC 3 for pocketpc 2002, eVC 4 for Windows Mobile 2003, and never the twain shall meet.

Terling7
September 14th, 2004, 14:26
Quote:
[Originally Posted by Silver]Hm, sorry to tell you this, exe's built with eVC 4 do not work on pocketpc 2002 devices. eVC 3 for pocketpc 2002, eVC 4 for Windows Mobile 2003, and never the twain shall meet.


OK, I'm back to square one then. How do I do live debugging on a Pocket PC 2002 device? I've tried eVC 3 and it seems to run on the PC, but it absolutely refuses to send anything to the IPAQ.

martin
September 15th, 2004, 09:02
Have you managed any communication between evc and the pda, not just active sync and the pda?

For example, if you build something like a hello world application, will evc transfer the .exe to the pda for you?

You should check that the target device, os, and cpu are what you expect them to be, also play around with "platform manager", which will let you test the connection with different transports.

It's certainly possible to do remote debugging on ppc2002 and 2003 using the relevant evc, perhaps try building and debugging your own apps first.

Terling7
September 15th, 2004, 09:58
Quote:
[Originally Posted by martin]Have you managed any communication between evc and the pda, not just active sync and the pda?.


No. I'm not sure where to start to try to get any communication. I'd love to build a "hello world" app, but I've no idea where to start, and I suspect that's way beyond the scope of any reply here. (although I'm reasonably comfortable in C and ASM on the PC). Thanks for your help. I'll look at more settings in EVC, and try a really clean XP or W2K system. Maybe I've got a firewall/antivirus/Softice or some other conflict interfering.

Silver
September 15th, 2004, 11:20
As you said, this is going to go way OT for here, but here's some hints. As Martin says, when you create a project in eVC3 for your pocketpc, when you build the exe eVC should automagically send it to the ipaq for you (just like it automatically loads the emulator). If that's not working, you have a comms problem, so I'd sort that out first. Once it's working, it really is as simple as running the app in debug - eVC will transfer the app to the ipaq then run it in debug on the ppc, and show you the normal visual studio debugging screens on your desktop. Word or warning though - unless you're using USB2 or the ethernet sync for your ipaq, be prepared for a hell of a laggy debugging system. When I code apps for my 3970 (USB1), each press of F8 (step over line of code) takes a good 2 or 3 seconds to respond. Now do that for 10 lines of code.........

Terling7
September 22nd, 2004, 12:46
I thought I'd give an update. Despite testing the install on 2 computers, and uninstalling and reinstalling on my main machine, when I installed on a third computer, it worked. For some reason the Pocket PC option and transport would blow up on the first two, and then disappear.

Thanks Martin for "also play around with "platform manager", which will let you test the connection with different transports." This helped me verify what had disappeared and helped confirm that it reappeared and worked when I did a partial reinstall of the Pocket PC SDK. I made several changes and ultimately got it working on both the XP and W2K machines.

The first project was completed with IDA alone, but the second one was helped by using eVT to track through some unfamiliar code.
Thanks to all.

microcode
September 29th, 2004, 03:17
For the ones who want to go further around Windows CE, I suggest that you download the Platform Builder + Windows CE 5.0 Evaluation Version and Windows XP Embedded @ :

http://msdn.microsoft.com/embedded/downloads/default.aspx

It's an online installer (downloading of setup.exe ~2,7Mb + launch online installer)... And all informations about Windows CE will be available to you

See you