circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

Issue 138 January 2002
EXPLORING QNX NEUTRINO


by Duane Mattern

Start Installation Tools Hareware Examples What's Missing? What You Get Sources & PDF

TOOLS

You won’t be able to use the C compiler until you install it from the package. Follow the options under the package manager for straightforward directions. You can connect to the software repository on the QNX web site or on the QNX CD, as illustrated in Photo 5. The packages include Korean, Japanese, as well as Chinese langu-age supplements. QNX RTP supports C and C++ with the GCC-2.95. There is a qcc command, however, qcc is a front-end to GCC.

(Click here to enlarge)

Photo 5—From the shelf, you can also run the Package Manager. The Package Manager allows you to install additional programs and applications from the QNX web site or, as shown, from the CD-ROM. This step has to be performed before a C compiler is available. What you see here is a QNX CD from January.

The purpose of qcc is to provide an abstraction layer to mask the differences between various compilers (GNU GCC, Watcom, and Metrowerks). There is also cc front-end, which is used to mask the differences between available compilers. This front-end also invokes the appropriate compiler (C or C++) based on file extensions and currently it invokes GCC/G++.

For project code management, the make, CVS, and RCS utilities are part of this QNX distribution. If you prefer to do cross development, there is a cross-compiler version of the GCC compiler that will allow development on Windows for a Neutrino target. But, I haven’t used it, because self-hosting make more sense on x86 platforms.

Besides compilers, let’s see what else you get. In the lower left-hand corner of Photo 3a, there is a Launch button that is similar to the Start button in Windows. This button brings up a number of submenus. The default submenus are shown in Table 1.

Table 1—These QNX applications are available from the shelf in the Photon GUI.

Snapshot (from the Utilities window) is the screen/window capture utility I used to capture images for this article. Under the Development menu, there is an option for PhAB, which is the Photon Application Builder shown in Photo 6. This is a neat utility that is similar to Visual Basic, except that it is C-based. PhAB allows you to drag-and-drop various controls to a desktop application.

(Click here to enlarge)

Photo 6 —One of the applications available from the shelf is the Photon Application Builder, (PhAB). This is an IDE for programming the Photon GUI. I works similar to Visual Basic by generating C code stubs. You can see scroll bars, push buttons, check boxes, a calendar, and more.

You have to complete the code stubs provided by PhAppBuilder. In my experience, it works reasonably well, but there are caveats. Make sure you read the documentation before starting a project, because certain restrictions are imposed to prevent PhAB from wiping out your work. Also, not all of the controls are fully functional. I was never able to get horizontal charting control (PtTrend) to function properly.

As with any package, it takes a while to learn the nuances before becoming proficient, but PhAB is a quick way to get up to speed on developing applications for the Photon GUI. Also, if you get serious about QNX, there is a wealth of third-party tools. Check the QNX web site for purchasing information.