| Porting GCC and Binutils to Windows CE |
(Oct. 16, 2003)
Earlier this year, Vitaliy Pronkin, a young Russian programmer, launched a project to port the open source GCC C/C++ compiler and supporting tools (library, manager, linker, etc.) to Windows CE and the Pocket PC platform. The result, according to Vitaliy, is that it is now possible to develop applications directly on a Pocket PC PDA using the standard C/C++ programming language. Specifically, source code written in eVC (MFC isn't supported yet) can be built and then executed directly on the Pocket PC (or other Windows CE device) without conversion or additional runtimes, he says.
To learn more about this interesting project, WindowsForDevices.com conducted an email interview with Vitaliy Pronkin regarding his GCC/binutils port to Pocket PC and Windows CE. Here's what we learned . . .
WindowsForDevices: How long has the project existed?
Vitaliy: I started it somewhere in March, 2003. I built the cross-compiler and tools quite quickly, then began to work on a native port; and when the compiler and assembler were done, I found a big problem with the linker that I couldn't solve for a long time. I almost stopped work on the project, and resumed only several weeks ago. But this time, I found what the problem was quickly, built some other tools, and when the work was done I created a website with first public version.
WindowsForDevices: Who is working on the project?
Vitaliy: The answer is short: only me.
WindowsForDevices: Why did you start the project?
Vitaliy: You know, there are several other programming/scripting languages ported/created for the Windows CE platform -- PocketC, Perl, Python, nScript, and so on. But they aren't suitable for real development -- they either require an additional interpretator at runtime, or support only a subset of the language, or can't be used for writing native PocketPC and console applications by their nature. Also, I want to develop/test programs on the go on my primary language, C/C++, and want source codes/output binaries to be compatible with other systems without requiring special runtime conversion. Really, we can use PocketPC devices in many, many ways, but weren't able to develop normal programs on them! (I tried to use Java because its compiler is also Java-based and I got it running without problems, but it's very slow and in any case worse than generating native code.)
WindowsForDevices: Is it the only C/C++ compiler available that actually runs directly on a Pocket PC / Windows CE device?
Vitaliy: As far as I know, it's the only real onboard C compiler
WindowsForDevices: What are the project's general objectives and goals?
Vitaliy: My main goal was simply to build a normal C/C++ compiler and tools for the Pocket PC platform. By "normal", I mean that it must be able to compile code taken from a desktop system with little or no changes, and that the code generated won't require any additional runtime libraries or interpretators to run.
WindowsForDevices: What is the project's current status?
Vitaliy: Briefly: My main goal is achieved. I can build samples from the Microsoft SDK (not all, perhaps; I haven't tested everything yet) without changes -- you only need to remove two commas from the resource file.
In more detail: I just ported GCC/Binutils; its pocket version has all features from the desktop one (I don't think I need to describe them here). However, the SDK isn't just a compiler and linker -- it's a set of tools plus libraries plus includes, and so on, and here I have much left to do. Includes and libraries can be taken from the standard Microsoft SDK (some changes to includes may be required because of differences between the GCC and Microsoft compilers). Tools consist of the compiler itself, assembler, linker, preprocessor, and resource compiler.
What's currently unfinished: no MFC support, no standard C++ libraries (IO streams, etc.), there are problems with floating-point emulation, and exception handling isn't fully supported.
WindowsForDevices: What versions of Windows Embedded does it work on?
Vitaliy: I have tested it on Windows Mobile 2003 and PocketPC 2002 devices. Basically, it requires an ARM processor but doesn't use any special system features -- it's just set of console tools! So I think it will work on any Windows CE device with an ARM-compatible processor. But I don't have any other devices to try, so I'm awaiting feedback from owners of different devices.
WindowsForDevices: What is the advantage of your GCC/binutils tools over Microsoft's standard language tools?
Vitaliy: Because I didn't want to build tools better than standard but just wanted to have them onboard, I can simply answer that there are no advantages -- source code is compatible and enough. But now I want to be able to compile not only GUI applications using standard libraries taken from desktop eVC, I also want to compile console applications taken from any system and originally written for GCC compiler. I can't guarantee that this will be done sometime (and really I don't want to simply port many GNU libraries and tools), but at least standard C++ libraries and exception handling will be done, I hope. Taking into account that the standard eVC tools don't support C++ style exceptions and many standard libraries/functions (especially for developing console apps), it turns out that my tools are in some cases better than Microsoft's.
WindowsForDevices: Where can developers obtain the software?
Vitaliy: The "official" download site is here. It can also be downloaded from PocketGear, but I recommend visiting official site regularly -- I'll update it more often than any other download location. I think there will be many new versions in the near future.
WindowsForDevices: What's your future development roadmap?
Vitaliy: Of course the main task is to test it on different sources, find, and fix existing problems. After that -- exception handling, standard C++ library, MFC support, shell for easier usage, text editor, and maybe some other libraries for better compatibility with different sources.
WindowsForDevices: Thank you for sharing your thoughts on your project -- and good luck!
About Vitaliy Pronkin: Vitaliy is a 19-year-old student attending the Department of Mechanics and Mathematics of Moscow State University. His specialties include programming, web-development and design, and system administration. In the small amount of time that remains after studing and work, Vitaly likes to find relaxation in music, computer games, and collecting "small figures of snails." Vitaly says one of his goals is to make PDAs more independent from desktops.
(Click here for further information)
|
|
|