[TOOL] Best GUI debuger for Native parts? - IDEs, Libraries, & Programming Tools

Which is the best visual debugger in current development for NDK? I am all new to Android development and trying to debug quite a complex project (StrongSwan ipsec client) from the start.
Debugging native code with Eclipse turns out to be a complete mess. Initially it was a missed symbols from loaded libraries (with all needed symbols inside obj/local/x86 directory).
But after experiments with ndk-gdb.py (old ndk-gdb just doesn't work) which prove debugging is possible, Eclipse also start to load debugging info for StrongSwan client.
But my joy was premature. Another problem arise. As soon as I setup breakpoint, launch debug, hit breakpoint and multiple times click "Step Over" and "Step Into" buttons Eclipse start to switch and stops inside some minor threads. Like this:
bt
#0 0xb76b48e6 in __ioctl () from /home/shuras/workplace/android/Teapot/obj/local/x86/libc.so
#1 0xb76ee3fb in ioctl () from /home/shuras/workplace/android/Teapot/obj/local/x86/libc.so
#2 0xb7162c2c in ?? ()
#3 0xa5f22d00 in ?? ()
or like those:
#0 0xb766cbd2 in syscall () from /home/shuras/workplace/android/strongswan/src/frontends/android/obj/local/x86/libc.so
#1 0xa592a8d8 in ?? ()
As result to keep focus on debugging intresting code I constantly need to manually select needed thread from a list.
Even if you enter "step" command inside Eclipse's gdb console still debugger will stop in the middle of nowhere.
Doing same thing inside ndk-gdb.py I have no issues like that. But using command line debugger not quite comfortable and fast way to go forward.
So it must be Eclipse induced problem with gdb random stops.
And as a last complaint, debugging inside Eclipse is slow as hell.
So my question is there any better alternatives to Eclipse in case of native code debugging?
Or is there any way to make Eclipse behave properly?
Just in case. My software configuration:
adt-bundle-linux-x86_64-20140702.zip
vanilla android emulator 5.0 x86
android-ndk-r10c-linux-x86_64.bin
ubuntu 14.10

Small update on my Eclipse problem. Now I think debug steps works as it should. The only problem is that Eclipse switch focus from last thread debugged to other threads for no reason after almost every step. On each step debugged thread advance one line forward exactly as it should. So I suppose it is ADT plugin problem. Is there something to do with it?

As time passed I can only append that switching to Luna version of Eclipse (instead of Eclipse included in the ADT bundle by google) solve problem with unprovoked stops. So I suppose it must be Eclipse bug of one particular version. But still Eclipse NDK debugging is a slow as hell. I am interesting in any good alternatives.

I have seen a couple pages describing how to get DDD working with ndk-gdb. Might be worth giving that a try as an alternative.

CellCB said:
I have seen a couple pages describing how to get DDD working with ndk-gdb. Might be worth giving that a try as an alternative.
Click to expand...
Click to collapse
DDD is quite a piece of software. Not the best memories from the old past. But still good to know. Many thanks.

Related

.net 2005

http://lab.msdn.microsoft.com/vs2005/welcome/default.aspx
have anybody tried messing with the beta's to make pocketpc applications ?
Rudegar said:
http://lab.msdn.microsoft.com/vs2005/welcome/default.aspx
have anybody tried messing with the beta's to make pocketpc applications ?
Click to expand...
Click to collapse
I'm a MSDN subscriber and haven't received it yet. As soon as i get it will try to publish it somewhere in the net...
Cheers
well the link i gave will let you download the beta even if you dont subscriber to msdn
it does require a passport though
havent dl'd it myself though
infolink
Rudegar said:
well the link i gave will let you download the beta even if you dont subscriber to msdn
it does require a passport though
havent dl'd it myself though
Click to expand...
Click to collapse
I'm on my i-mate now & can't find any download links on that page. It is not even published at http://msdn.microsoft.com/downloads/recent.aspx download center.
Can you post a link to a pre-DL passport auth page?
http://lab.msdn.microsoft.com/express/visualc/
https://login.passport.net/ppsecure/uisecure.srf?id=42814
me
I'm using Visual Web Developer 2005 beta.
Completely new to web development.
HTML tags were completely beyond me as was data driving asp stuff.
BUT......
VWD is a dream to use.
I now have an asp site that lets XDA equiped engineers interface with our back office systems. The database integration is simple (tho there are a few bugs) and controls autosize for the target device.
Give it a go
well the only stuff relevant for me is c++ and maybe a bit of c# so i dont end up like some creepy dinosaur like those people who started coding Cobol back in the 70's and are still at it!
suppose one have to keep a bit up with the trend
VS 2005
Hi, there:
I'm using VS2005beta1, and I think its cool except a stupid bug on device application development. I attached some screen shots here. hope these information helpful.
Unlike evc+sdk developer tool set, vs2005 includes all stuff needed to build device applications, and it supports the latest emulator which running native ARM code on an emulated arm920 device, it's much faster than the legacy emulator, the legacy i486 emulator is still suported, check the attached platforms.jpg for supported platforms, notice wince 5.0 device is in the list. :lol:
now we can program in vb.net, c#, or c/c++. the attached screen shots show these different types of projects. convenient enough hur.
well, a big problem arised when develop in c/c++, i did not try vb.net and c# coz I don't like'em. when you create a new project, two platform configurations are created, one for device and the other for emulator. I mentioned the new emulator before, remember? its cpu is an arm920, check the screen shot. this emulator is used when deploy and debug for the project's emulator configuration. but unfortunately, under the emulator configuration, the compile and linker will generate x86 executable which cannot be run on the target emulator. what is worse is that you cannot change to use legacy i486 emulator, you can not even connect to the legacy emulator, the problem may related to the virtual machine network service driver installed by the emulator installation file. I'm still checking it. until this problem is solved can we finally debug on emulator, otherwise we had the only choice to debug on the device, btw I can debug on device with no problem, it can even attach to a running process on the device
at the predicatable future, vs2005 will certainly supercede evc+sdk to become the unified development platform.
why the screen shots appear in a reverse order of my attaching? I think it should be a list instead of a stack. :roll:
Well, I think I´ll have a look at it soon. Could you check if there are any project types for deployment? Means a "setup projekt" for devices?
yeah, I forgot this one, check the shot, it support device cab project.

Coding and remote debugging?

Hi,
what IDE do you use? I'm more interested in non-.net-programming (although I like C# very much), but I also have x86-ASM knowledge for instance. So what IDE is there for us "real" programmers?
When finally compiled... how do you test them? Is there some remote debug stub like in SoftICE, so that I can sit in front of my PC and step trough a program indeed running on my PDA (Magician)? If not, how to utilize the emulators provided by MS? Is there any inherent debugging capability?
So let's start this thread about professional programming 'n coding.
The only IDE you can use to debug native programs is eVC 4 or VS 2005 beta. There is a kernel-mode debugger in PlatformBuilder, but it requires a debug version of ROM (because debugger is really located inside ROM image).
There is a real emulator that can run ARM binaries. It comes with VS 2005. But currently it is very buggy.
On Microsoft's site, you can download eVC (embedded Visual C++) for free...and you can also download emulators for the Pocket PC for testing and debugging purposes.
I am not sure if these are the same emulators that mamaich is referring to (what does VS mean?)...but it's worth a try.
VS means Visual Studio. Version 2005 is currently in its beta phase, where beta2 is current. The problem is, where to get a debug version of my ROM? I thought it would simply imply installing some remote debug stub.
Good thing about eVC4 is, MS still cares about it (latest SP is from 7/23/2004). I think I'll give that a try until VS2005 becomes stable in terms of PPC.
Chatty said:
The problem is, where to get a debug version of my ROM?
Click to expand...
Click to collapse
In HTC or MS. In other terms - nowhere.
The only debug ROM that was leaked is WM2005 for Himalaya.
Ok, so I understand it like that: I cannot debug a program running on the hardware platform, only on the emulator.
Chatty said:
Ok, so I understand it like that: I cannot debug a program running on the hardware platform, only on the emulator.
Click to expand...
Click to collapse
Why? You can debug any program that is not in ROM. You cannot debug OS components.
The question is, where does the program run being single-stepped? And where does the debugger in control run? My favourite solution:
PPC: program being debugged
Desktop: debugger in charge
when you start the debugger you can choose between running it in the simulator or on the device
if when you run it on the device dident run on the device then the option would not be given
i guess[/i]
Chatty said:
PPC: program being debugged
Desktop: debugger in charge
Click to expand...
Click to collapse
I see that you even have not tried to install eVC and read its docs.
mamaich said:
I see that you even have not tried to install eVC and read its docs.
Click to expand...
Click to collapse
Is it possible to attach the debugger
to the remotely running process
(no source, no debug symbols),
stop it, single step, peek at the memory,
set a break at
an address, not a symbol ?

Getting into WM5/WM6 programming?

I am interested in dabbling a little in programming for my Kaiser. I have programming experience, mainly php / mysql, though I have done some C and lots of scripting in my time. My biggest project so far though was an open source google maps mod to put on your website - thousands of lines of php / js code, mysql backend and AJAX tieing it together, some graphics routines etc, so I am no drooling n00b when it comes to coding.
How easy is it to develop basic stuff in WM?
I have access to MSDN, so I can get Visual Studio (2005 for sure, maybe later versions), so I think I have access to the apps I would need. I just ordered some books to help me along, but was wondering if I would likely face a steep learning curve.
All the stuff I want to do is today screen plugins - was thinking of having a bash at writing my own quick contacts plugin - *very* basic - just a vertically scrolling list of names over a transparent PNG button with maybe photos from the address book - I want it to be able to scroll by vertical gesture within an ultimatelaunch tab - is this likely to be quite easy and quite a good "first app" to program?
I was also looking at writing a lite repacement for phoneweaver as the only feature I use is to turn on BT when it detects power but no activesync (ie auto turn on BlueTooth when I am in the car and the device is cradled) - maybe a hack to force the keyboard backlight on in the same situation.
I have bought:
Microsoft® Visual C#® 2005 Step by Step (Microsoft)
Microsoft® Mobile Development Handbook [Paperback] by A. Wigley; Daniel... (Microsoft)
Comments / suggestions?
I would also be very interested in a thread or good reference on how to start to program app for mobile gadgets. Actually i'm a Delphi coder, and i would like to implement some applications on WM platform, but when i search over internet there's plenty of information, but no usefull information with "real-life" recomendations.
depend on the platform and language one wish to use really
there is c#.net, vb.net c++.net
c++ miniMFC, c++ PureWin32 sdk
oldVB
...
here are some other posts asking pretty much the same thing from the forum
http://forum.xda-developers.com/showthread.php?t=225405&highlight=programming
http://forum.xda-developers.com/showthread.php?t=237932&highlight=programming
http://forum.xda-developers.com/showthread.php?t=241670&highlight=programming
http://forum.xda-developers.com/showthread.php?t=245426&highlight=programming
http://forum.xda-developers.com/showthread.php?t=228043&highlight=programming
http://forum.xda-developers.com/showthread.php?t=317913&highlight=programming
http://forum.xda-developers.com/showthread.php?t=302548&highlight=programming
http://forum.xda-developers.com/showthread.php?t=327164&highlight=programming
http://forum.xda-developers.com/showthread.php?t=305926&highlight=programming
http://forum.xda-developers.com/showthread.php?t=336251&highlight=programming
http://forum.xda-developers.com/showthread.php?t=226412&highlight=programming
codeguru.com got examples of various windows mobile programs too today items and such
about delphi i dont know if anybody got some info i would say borlands site
Thanks rud. I was aware of various other posts, but my question was more of a "How steep is the learning curve?" rather than "How do you do it?".
There was also an element of "How do you do it?" insofar as there seem to be better or worse ways of going about various kinds of app (eg today apps with gesture support) which I am finding a bit of a minefield, but I feel that the new post was valid because I am giving an indication of my experience level and what I am trying to acheive - none of the posts you listed cover the combination of stuff I am trying to do. Reqs like pulling from outlook db and allowing gesture scrolling in a today plugin, I dunno, I may waste ages with C#, for example, only to realise it is a breeze with C++... I also note that a google search for wm programming gesture scroll today screen currently ranks this very thread #5. By tomorrow that'll be a googlewhack then.
Yes, there are various posts about how to get started, but I think maybe a sticky would be in order with a bit of info on the various paths - the vb/c++/c# options are quite bewildering - stuff like
levenum said:
Your question is mainly a matter of personal preference.
Here is my opinion on C++ vs. C#:
C++ advantages:
- Native code is faster than .NET
- Easier access to Win32 APIs
- Ability to write system components like keyboards and today plugins.
C# advantages:
- Saves on coding time
- Allows use of many .NET CF components to quickly accomplish complex tasks.
Please note that I am bias. I hate .NET and want nothing to o with it. Specially on mobile devices that do not have the processing power to spare for the .NET overhead.
Click to expand...
Click to collapse
is really useful, maybe if it were expanded upon, info such as for this route you need visual studio, etc, etc it would make a really good sticky for the dev section.
evilc said:
I am interested in dabbling a little in programming for my Kaiser. I have programming experience, mainly php / mysql, though I have done some C and lots of scripting in my time. My biggest project so far though was an open source google maps mod to put on your website - thousands of lines of php / js code, mysql backend and AJAX tieing it together, some graphics routines etc, so I am no drooling n00b when it comes to coding.
How easy is it to develop basic stuff in WM?
I have access to MSDN, so I can get Visual Studio (2005 for sure, maybe later versions), so I think I have access to the apps I would need. I just ordered some books to help me along, but was wondering if I would likely face a steep learning curve.
All the stuff I want to do is today screen plugins - was thinking of having a bash at writing my own quick contacts plugin - *very* basic - just a vertically scrolling list of names over a transparent PNG button with maybe photos from the address book - I want it to be able to scroll by vertical gesture within an ultimatelaunch tab - is this likely to be quite easy and quite a good "first app" to program?
I was also looking at writing a lite repacement for phoneweaver as the only feature I use is to turn on BT when it detects power but no activesync (ie auto turn on BlueTooth when I am in the car and the device is cradled) - maybe a hack to force the keyboard backlight on in the same situation.
I have bought:
Microsoft® Visual C#® 2005 Step by Step (Microsoft)
Microsoft® Mobile Development Handbook [Paperback] by A. Wigley; Daniel... (Microsoft)
Comments / suggestions?
Click to expand...
Click to collapse
Hey!
Congrats on getting your hands on with Windows Mobile...
The easiest way is to download Visual Studio 2005(2008 You have it on MSDN) - and create a new application with it.
It's sooo easy if you know your object oriented programming, as long as you want to create ordinary "office" applications... But if you want to do more advanced things(like creating a today-plugin) you need to go over to c++(even though you can download a .net home-plugin-container which acts like a "loader" for your plugin written in c++) - and also, if you want to create good GUIs, I think you are better off with c++... But then again, I think you need a bit more effort in learning c++ then using c#...
Hope this helps...
Still slogging my way thru this...
I got hold of an MSDN disc, first off I installed visual studio 6 - bad move.
Had to uninstall before trying to install VS 2005, now I think it has screwed something up, every time I try and create a "Smart Device Win32" project, I get a "Project creation failed" error. I may have to re-GHOST my OS to get rid of it
So much time just finding out what apps I need and what options to choose to start a project...
I found http://channel9.msdn.com/wiki/default.aspx/MobileDeveloper.HomePage which seems helpful
Thanks for responses!
Evilc, you link of msdn is excellent point, many thanks!
I have also just started programming in C++ ..i dnt have any knowledge of any type of codes..i learned every thing frm MSDN libraries ( i have many many of them caz i have VS 2006 VS 2005 and VS 2008 )..i recommend you to work with C++ because it uses less system resources and is fast..hope this helps..check out my Kitchen coded in C++ ( link in signature )
Yeah, I think C++ is definately more what I am looking for from what I have learned thus far.
Re-Ghosted OS - totally fresh XP SP2, installed Visual Studio 2005, still the same error. GRRR!
Visual C++ --> Smart Device --> Win32 Smart Device Project == "Project Creation Failed"
Other Languages --> Visual C# --> Smart Device --> Windows CE 5.0 --> Device Application == Project created OK.
Some posts I have found on the net say it is an IE7 issue, I may try uninstalling that or flashing back to an OS image with IE6 only, but this is really winding me up and taking a *lot* of my time...
I uninstalled IE7 and the problem went away. Woohoo!!
starting programming windows mobile
hello
1. see my web site.
2. see my book recommendations, especially the 'programming windows ce' by douglas boling. It has an example for many things and a today sample too. Most is based on visual c++ 3.0/4.0. Embedded Visual C 4 can be loaded free of charge at ms.
regards
josef
Nice site, thanks.
The windows mobile 6 sdk actually has a today screen sample, along with samples of most of the things I need to do.
neofix said:
It's sooo easy if you know your object oriented programming, as long as you want to create ordinary "office" applications... But if you want to do more advanced things(like creating a today-plugin) you need to go over to c++(even though you can download a .net home-plugin-container which acts like a "loader" for your plugin written in c++) - and also, if you want to create good GUIs, I think you are better off with c++... But then again, I think you need a bit more effort in learning c++ then using c#...
Hope this helps...
Click to expand...
Click to collapse
Are we using the same language?? Cos this (C++ Win32 for Mobile Devices) is by far and above the most difficult programming language to get into that I have ever tried. Yes, worse than ASM.
Trying to code an app that prints "Hello World" has taken me over 5 hours with no success yet - most languages I have a go at it's 5 minutes.
From http://msdn2.microsoft.com/en-us/library/ms901121.aspx :
Code:
int DrawText(
HDC hDC,
LPCTSTR lpString,
int nCount,
LPRECT lpRect,
UNIT uFormat
);
It gives a brief description of what the parameters are, but absolutely no examples and no explanation of what all the parameters do or how to initialize them, so even browsing an example is no use to me.
u can simply try
MessageBox::Show(" your message ");
ather90 said:
u can simply try
MessageBox::Show(" your message ");
Click to expand...
Click to collapse
Isn't that .NET ?
I thought the consensus was that Native Win32 or whatever it is called was the better way to go?
This is part of the problem. I cannot even work out what to put in a search engine to pull out info on the right "flavour" of C and for the pocketpc. It's *so* bewildering.
Hello evilc.
First I noticed you have some trouble with VS 2005. It probably won't be easy now, but if you ever get to format your machine again don't install it (unless you absolutely need some other features).
For C / C++ programming for WM device I strongly recommend eVC 4 as it is much lighter and responds quicker. (It's a free download as well)
Second, though you can program for WM in C# and VB .NET which are both .NET Object based languages and are probably much closer in form to PHP and Java then C, you can not write system components such as today plugins in those languages.
You need native code so C / C++ is the only way to go.
(Actually, there is a trick to combine C# and C++ DLLs to create a today plugin where C# will do the main stuff, but its pretty complicated)
What you need is to learn basic Win32 programming and using the windows API. They are almost identical for Windows Mobile and Desktop windows versions so any book on Win32 should teach you the basics.
(Personally I started with MS book on MFC and studio 6 but I would not recommend it)
Finally:
I would gladly explain the parameters of DrawText but I am not quite clear on how much familiarity you have with the Win32 mechanics, since the languages you are used to obscure them unlike C which gives you extra power but also makes you work much harder to get anything done.
Do you know how to handle messages, and how windows manages all abjects using handles? Any familiarity with GDI?
If not, it will be pretty difficult to explain.
levenum said:
Hello evilc.
Click to expand...
Click to collapse
Hello! <waves>
First I noticed you have some trouble with VS 2005. It probably won't be easy now, but if you ever get to format your machine again don't install it (unless you absolutely need some other features).
Click to expand...
Click to collapse
I tracked down the problem when I got home and installed on my desktop. When doing it on the laptop, whilst installing SP1 for studio 2005, I had hit "Not Now" to a reboot request and it had said installation failed. When I installed SP1 on my desktop and said "Yes" to the reboot request, the problem went away, so I guess it was fixed in SP1 but the installer is a bit picky.
For C / C++ programming for WM device I strongly recommend eVC 4 as it is much lighter and responds quicker. (It's a free download as well)
Click to expand...
Click to collapse
Wish I had that advice before as I wasted a day messing around with an MSDN CD, trying to work out what to install and what not. So does the eVC 4 download include an IDE? If not, what do you use?
Second, though you can program for WM in C# and VB .NET which are both .NET Object based languages and are probably much closer in form to PHP and Java then C, you can not write system components such as today plugins in those languages.
You need native code so C / C++ is the only way to go.
(Actually, there is a trick to combine C# and C++ DLLs to create a today plugin where C# will do the main stuff, but its pretty complicated)
Click to expand...
Click to collapse
You don't have to tell me twice to avoid the bloatware ****e
What you need is to learn basic Win32 programming and using the windows API. They are almost identical for Windows Mobile and Desktop windows versions so any book on Win32 should teach you the basics.
(Personally I started with MS book on MFC and studio 6 but I would not recommend it)
Finally:
I would gladly explain the parameters of DrawText but I am not quite clear on how much familiarity you have with the Win32 mechanics, since the languages you are used to obscure them unlike C which gives you extra power but also makes you work much harder to get anything done.
Do you know how to handle messages, and how windows manages all abjects using handles? Any familiarity with GDI?
If not, it will be pretty difficult to explain.
Click to expand...
Click to collapse
No GDI Experience. I take it this would be the library of choice for drawing the screen of a today screen app? Stuff like the HTC Home clock or the new Face Contacts - they would likely use Native C++ and GDI? Doesnt strike me as something you would do with a form.
Also, anyone got the skinny on vertically scrolling by click-and-drag inside a today screen app? Just a case of enabling a parameter? Has to be coded manually? Best way to do it smoothly? If you have seen the Conduits Pocket Player 3.x browse list - how it "eases in" and "eases out" at the ends of the list, has inertia so you can "flick" down the list, the alphabetical bar instead of the regular scroll bar - is that all coded manually or is there an api or something that can help?
Thanks for the help!
I just noticed your apps in your sig - checked out LVM time - noticed there was source - wooohoo! I generally pick these things up by example.
All that code just for a (configurable) clock on one line - wow. Great though, a really good example of a today app - minimal enough in functions so it is easier to suss how it all slots together, but full featured enough (implimented example of an options screen - yay!) to show how to do various things.
And Gnu as well! Nice, this will be the basis of my first test project too I think - at least now I have a framework to test out what I want to do and how to go about it without having to work out how to code the basis of the application.
I thank you from the bottom of my heart sir.
I tried to build it in VS2005, but I got a
fatal error C1083: Cannot open include file: 'todaycmn.h': No such file or directory
A quick google search showed todaycmn.h was part of the SDK, I found the file, dropped it into the headers section of the project, but no joy. I will probs just try eVC.
Oh, and having developed a today plugin, maybe you can answer this one:
As far as I can tell so far, debugging isn't very easy with a today app - something to do with the fact that the dll is not releasable? Is this an issue I will come up against? I hope its not a case of "reinstalling" the app each time you want to test... I was thinking maybe along the lines of have it as a normal app for debugging, then make it a today plugin when you want to build to use it?
I dunno, probably trying to run before I can walk, my books shoulda been here today, oh well. Sorry for all the questions...
@evilc:
Are you using standard Win32 or MFC?
You may want to try using MFC since you get the flexibility of native development but with some nice class libraries that make your life easier.
As for click and drag behavior, that is usually implemented by handling the WM_LBUTTONDOWN, WM_LBUTTONUP and WM_MOUSEMOVE.
When you get wm_lbuttondown you set a flag that says the user is dragging. You use wm_mousemove to update the stylus position as long as this flag is set, then you unset it on wm_lbuttonup.
That's the basic idea anyway. Someone made a post about gesture recognition in this forum a few weeks ago with sample code. You should see if you can find that.
Managed Today Screen plugins
See:
http://msdn2.microsoft.com/en-us/library/ms839442.aspx
for some background on the concept.
And:
http://www.christec.co.nz/blog/archives/279
Outlines what I think is a very ingenius technique for managed today screen plugins.
For those of you that want an easy way to make a today screen app in c#. Chris did all the C++ work for you.
Also I forgot to mention that the SDK samples cover all most every application type you can think of. Most of the good ones are Win32 though.
Also, keep in mind that you can use P/Invoke from your C# apps to call native APIs. So don't let people tell you you need to use C++ just because you can access more api's. I will say that you should use C++ for games, or other apps that require high speed or advanced GUI's (it is VERY hard to do interesting gui techniques with C# and interop, trust me).
And finally, I would highly recommend using the most recent version of visual studio you can get (especially if you're using vista), unless your machine can't handle a newer version. I say so because visual studio gets more and more powerful as an editor with each new iteration and I personally can't go back after I get used to the new features they introduce. And the new versions are almost necessary if you're going to do .net development.

Looking for C/C++ Compiler for WM6

I recently got myself an ATT Tilt (Kaiser), which I plan on taking with me to a conference in Europe next month, and I'm not planning on taking a laptop so I can travel lightly afterwards. The phone currently has WM6 on there (I'm not going to play with flashing the ROM until after my trip).
To the point: I want a C/C++ compiler on my phone that I can use for potentially testing a few things over there (assuming the application I have in mind will work, but that's another story). I'm assuming that if I get the compiler working, it will have access to the standard C libs, including network stack.
I've tried PocketGCC, but I can't get it to work. The cabs from pocketgcc.sourceforge.net install fine, but the CMD Prompt won't open (I click on the icon and nothing happens).
Searching these boards, the only reference I've found was to http://www.mobilitysite.com/boards/business-development/135816-pocket-c.html#post1187340, but the links it points to for getting the various files no longer work.
Any suggestions or alternate links on how to get a working compiler on my smartphone?
As a backup, is CeGCC the best option for pre-compiling for the phone? Anyone know if it runs under 64-bit linux? Or if not, under win32 cygwin? Ideally, I'd love to have a cygwin-equivalent on the phone...but I guess that'll be deprecated with Android later on.
Thanks,
- David
Hi David,
I'm also looking for this and the best aproach was a DOS emulator (I think it is called Pocket DOS and there is another one that is free but don't remember the name) and Turbo C. I used it just to test very basic software that was just displayed in the DOS windows. But it was a really really little software (a couple of FORs and couple of variable incrementing), it was not fast to copile/run.
Hope this helps a little.
there is a cool project here, it's C#, not C++ but it might be of interest.
This one is supposed to be C++, but it is old and you may have problems with it. From what I recall, the command shell isn't compatible with wm6, but if you look around you may be able to find one to replace it that works.
Here is a command shell that's supposed to work with WM5/6
Good luck and let us know if you find anything else.
Also, the link to Mamaich's Version on that page you referenced works
Digicrat said:
I
is CeGCC the best option for pre-compiling for the phone? Anyone know if it runs under 64-bit linux?
Click to expand...
Click to collapse
mingw32ce (cegcc) is used to compile haret and roadmap (afaik vlc too).
It runs on amd64 very well. Have not tried it on my old DEC alpha.
Thanks for the quick responses.
edgar: PocketDOS looks interesting, but where can I find versions of Turbo C/C++ compatible with the pocketPC?
The program I'll be testing is actually a simple command-line C application, but it does use networking, UDP to be precise.
The link to Mamiach's link works on that page, but not the links on there for PocketConsole, PocketCMD, or the .bat files, though the bat files can be taken from the rar file itself.
I tried the PocketConsole and PocketCMD versions from the pocketgcc.sourceforge.net site again, and managed to get them (mostly) working after changing the reg key value.
I tried the PocketGCC cab file from gforge. It kind of works, but the test program won't compile. I still had to manually set the path for this, and for some reason it doesn't include gcc but calls the various other parts of it.
I'll try uninstalling the PocketGCC Cab and extracting Mamiach's version again and see if I have better luck with that later in the week and see how that goes.
Looks like I got it working for the most part.
Compilation is slow, but I don't want to waste space on the internal memory extracting all those .rar libs, unless I can get it installed/moved to the SD card later and adjust the paths accordingly (using spaces in file paths is always annoying).
I'm using Mamiach's version of GCC from the link above (extracted to /pgcc), plus PocketConsole and PocketCMD cabs from the pocketgcc.sourceforge.net distribution.
The only lingering (and annoying) issue is that it does not save the PATH setting after closing the cmd prompt.
Correction, I just noticed another more important issue. After switching programs, the CMD prompt seems to disappear. If I open another application, and then close that program, it will take me back to the CMD prompt. However, if I return to the "Today" screen, that prompt is still open but I can't get it back. It does not appear in that little task-switcher icon, nor in the detailed 'Task Manager'.
Any ideas?
Thanks
Update:
I just installed Dotfred's Task Manager. It looks like the problem is that the CMD prompt is being seen as a Process and not as an application. Now the question is can I change that...

What do you use to develop with?

I have been trying to learn how to do some android development for work and keep running into problems. I find it hard to believe that people are able to create a lot of these apps with the Google development tools in such poor condition.
I have set up a development system with eclipse and the android tools. One of the first problems I ran into is ADB crashing whenever I tried to debug and there was a device attached to the system. Didn't matter if I was trying to debug on the device or emulator, ADB would crash. I was finally able to get the problem fixed by using the Composite ADB interface driver instead of the plain ADB interface (would it really hurt Google to add one sentence to the directions to tell people this?)
Now every time I go to debug, the emulator comes up in Chinese/Japaneses. I type in English and it converts it. I can fix it by changing the input method, but I have to do it every time I start the emulator. I have Googled looking for a solution and have found this is a known problem that has been around for almost a year and there is no resolution with it. The bug reports I have found on the android site even lists them still as NEW!
When trying to debug a problem, I wanted to delete the shared preference file for the app as it seems like it had become corrupted and every time it went to read it, the app would force close. (And when this happen, the debugger perspective would come up but for the life of me, I could not find any information as to what caused the fault or any sort of stack trace to look back and see where in my code it failed).
If you are an app developer, are you running into these issues? Have you found ways to work around the problems? I just can't believe that this is the way people develop for this platform. I'm ready to tell my boss that we forget about the platform unless we can find some stable development tools, otherwise we will be spending more time fighting with the tools than working on the app.
If anyone has any suggestions, I would really like to hear them. I'm not a noob when it comes to software development (20+ years as a software engineer), but I have never seen development tools for such a major platform, be this poorly done. What am I missing?
I'm a professional developer as well too. 20 years or so as a C/C++ developer, but I've worked most of my career as a Unix developer. Naturally, I use linux where possible and my Eclipse setup on Gentoo linux is pretty stable. I tried on Win7-64 but it was buggy as heck. I believe that the problem is with Java. There seems to be so many ways to set it up wrong that I'm not sure you can set it up right under windows.
I find it ironic that Oracle is trying to sue Google for making a JVM that actually works!
I havent had any of your mentioned issues. I am running eclipse on a 32 vista machine and a 64 bit windows 7 machine.
Not sure what I may have done different that you for setup. But I followed the Android application development for dummies book. The author goes step by step of what to download and how to install and configure. Even though your software experience is way beyond this book maybe its worth picking it up to read the install notes.
FreeTheWorld said:
I havent had any of your mentioned issues. I am running eclipse on a 32 vista machine and a 64 bit windows 7 machine.
Not sure what I may have done different that you for setup. But I followed the Android application development for dummies book. The author goes step by step of what to download and how to install and configure. Even though your software experience is way beyond this book maybe its worth picking it up to read the install notes.
Click to expand...
Click to collapse
I picked up the book, "Sams Teach Yourself Android Application Development in 24 Hours" and it has a section for setting up the environment too. Followed it to the letter several times and always had this problems. I think the issue comes down to the books were written using version 6 and 7 of the SDK and the current version, 8, has introduced some problems the books don't cover. For example, the tools directory has been split into two directories, tools and platform-tools. When you first download the SDK, you don't get everything you had like before until you update the SDK.
I have talked to several other people who also had the problem with the ADB crashing like I did, even started a thread here about it. No one could get any help anywhere on resolving the issue. I think the problems I have that others don't see is because they started with an earlier version of the SDK.
Gene Poole said:
I'm a professional developer as well too. 20 years or so as a C/C++ developer, but I've worked most of my career as a Unix developer. Naturally, I use linux where possible and my Eclipse setup on Gentoo linux is pretty stable. I tried on Win7-64 but it was buggy as heck. I believe that the problem is with Java. There seems to be so many ways to set it up wrong that I'm not sure you can set it up right under windows.
I find it ironic that Oracle is trying to sue Google for making a JVM that actually works!
Click to expand...
Click to collapse
I have also setup the development platform on a linux system and haven't had the problems I have with Windows 7 64bit. I also feel a lot of the problems have come from the Windows 64bit platform and even windows in general. I tried installing on a clean 64bit and 32bit Windows 7 and was still having the ADB problem. As soon as I get my tax refunds, I'm going to get a work desk setup at home so I can try using my linux system (it sits on the floor with no monitor and is my network server). Boss will really love it if I tell him we have to set up linux platforms to develop on. Guy is a bit of a tight wad when it comes to equipment.
edboston said:
If you are an app developer, are you running into these issues?
Click to expand...
Click to collapse
Nope, I didn't have any stability problems with SDK. I use linux 32-bit, didn't try to work on a Windows, MacOS and/or 64-bit arch.
I've not seen any of your problems, either.
FYI, I followed these instructions to set up the env:
http://developer.android.com/resources/tutorials/hello-world.html
(Environment - WinXP/32 netbook)
Eclipse is buggy. The most annoying issue with it is that the auto complete freezes your computer at times.
An alternative is IntelliJ. They offer a free community addition. I work with one dev that swears by it.
I use Windows7x64 and Ubuntu 10.10 to develop my apps. I use IntelliJ mostly because I find Eclipse to be convoluted overcomplicated mess. I think the Android integration in Eclipse is better, especially around editing some of the key XML files but I despise how projects are organized in Eclipse.
The OS you use really doesn't matter the results are the same, once you're up and running the work will be the same so the OS becomes irrelevant. The IDE becomes the differentiator.
I haven't met with the issues you mentioned, but as you said it can be because I installed the sdk a long time ago (after google anounced the eclair). I'm using eclipse and yes, that program is full of bugs, but I read an article about developing for android in Netbeans (my personal favorite). You can read it here: http://androidportal.hu/2011-01-09/fejlesztes-androidra-netbeans-segitsegevel (it's hungarian, but google translate is our friend)
Sent from my GT-I5700 using XDA App
MotoDev Studio 2.01
stick to 32-bit Galileo
for the slow autocomplete problem, I've made sure to use eclipse Galileo, something in Helios was causing massive lag. Also make sure you're running the 32-bit version of eclipse, even if your machine is 64-bit, there are definitely some bugs last time I tried to install ADT on 64-bit eclipse.
the new tools directory was a bit of a pain after updating to the latest API but nothing too bad once you figured it out.
I haven't had many of the other problems you mentioned. I always debug with adb logcat from terminal, and you can always hop into the device with adb shell.
I use eclipse every day at work so I've kind of gotten used to all the little quirks. I had the chinese text problem with the emulator, but I do most of my testing on a real phone. I use the emulator just to try out different resolutions.

Categories

Resources