Showing posts with label PocketPC. Show all posts
Showing posts with label PocketPC. Show all posts

Tuesday, April 21, 2009

Finally: One language, three worlds.

Eureka. At last. With the release of the System.Windows.Forms assembly for Mono a dream comes true. Well, this sounds a little over the top but it felt like that the first time I got my 'SimpleTerm' application running on Ubuntu. SimpleTerm is C# application for serial port (RS232) communication that I originally created for the PocketPC using SharpDevelop. By using only CLR functions that are available in the Compact Framework I could build an application that runs on a PDA and a desktop, unchanged!. So it was exactly the same bytecode on both platforms. Now this does not work on the Mono platform (although there seems to be a way to patch the bytecode itself) but after I imported the project into MonoDevelop and just compiled it, it actually worked ! Which could be considered as a breakthrough merely for the fact that it supports serial communication !. So it's not just a 'Hello World window' with an OK button but its a real application that even supports the most underappreciated form of digital communication. And I say 'underappreciated' because the RS232 specification was established in 1969 and it has been the main form of communication between computers for over 35 years. But it is only since the release of System.IO.Serialport in version 2 of the CLR that serial communication is really supported out of the box in a mainstream development framework. I know this is not an issue for most people, but if you are working with instruments and microcontrollers whose only means of communication is still plain RS232 it is a real revelation.
The image shown here is a combination of three screenshots, one of a PocketPC emulator, one from an Ubuntu system running within a virtual machine and one from a 'standard' Windows XP computer. The text in the main window of the application shows the result of a call to 'Environment.OSVersion' which indeed reports the operating system and version on all three systems.

Wednesday, August 15, 2007

The Big Step: Microsoft Visual Studio

So it finally had to happen. I purchased and started to use Visual Studio 2005. After using Borland C++ Builder for more than 10 years for all my Windows (and even DOS) programming, the Pocket PC platform turned out be the decision maker. From the start the only way to write programs for the Pocket PC platform has been through Microsoft. And they also made it very easy by giving away the free Embedded Visual Basic, followed by Embedded VisualC. But today, now everybody has a Pocket PC, none of these tools is being supported, and they also refuse to work with the new Windows Mobile 5 devices. Now this could be a great starting point for some Microsoft bashing, but actually I read some explanation on a MS-Developer blog that makes sense. Since the embedded versions where completely separate projects within Microsoft, the development and support started to suffer from the fact that the developers also worked on the commercial Visual Studio product. And it's just a fact of life that supporting a commercial product has a higher priority...
But I've written all my software using EVC 3 and 4. And so I struggled some time by using old PocketPC's for debugging, actually waiting for Borland to come up with the 'Delphi for PocketPC'. But I don't think this will happen for a while, and I even wonder if they ever will produce something for the PocketPC platform. So I finally had to get Visual Studio 2005 to continue supporting my embedded Visual C apps. Fortunately I could go for an Visual Studio 2005 Upgrade, because I already owned C++ Builder, making it a bearable € 250,-.
And now I must agree, the Visual Studio environment a a giant leap forward compared to the old EVC programs. The editor is much more up to date, it compiles faster, has a better debugger, and (surprise, surprise) also supports direct emulation on your desktop PC, even when your program uses ActiveX controls or external DLL's !.

Thursday, April 27, 2006

Free programming for the Pocket PC

Pocket PC,s are hot. Prices of Pocket PC's are falling, and with the car navigation as 'killer application' the number of users is increasing rapidly. So programming for the Windows Mobile platform is getting more important. And let's face it: it's fun two write programs that you without carrying a bulky laptop.

There are a few possibilities to write Pocket PC software. The 'easiest' way is to buy the the complete Visual Studio .NET suite. This has all the bells and whistles required to write Pocket PC applications in using Visual C or the .NET Compact Framework. Unfortunately it's also rather expensive...
Fortunately Microsoft also tries to promote the platform by giving away the free Embedded VisualC SDK. Though a little bit 'outdated' in appearance, it's a fully functional IDE , with compiler, debugger and emulator for writing MFC-based C++ code. So far I've written all my software using EVC 3 and 4 and it works quite satisfactory. It's probably still the most efficient way to write Pocket PC programs because the C++ language is very close to the Windows API. Unfortunately it's also difficult to master, and the learning curve is steep and long.

It should be easier to use the .NET Compact Framework, which is standard on Windows Mobile 2003 and higher. Unfortunately the only 'supported' way to write .NET CF programs is by using Visual Studio. So if you're not that rich you'll have to go the unsupported way:

Programming the .NET Compact Framework without Visual Studio

Although Microsoft insists that you can not compile .NET Compact Framework (.NET CF) applications without owning Visual Studio .NET, it is in fact possible. Check out Ward's article at http://www.ward.nu/computer/teletekst/compile.html on how to do this.