Newbie questions

I am a new QNX user and have a list of questions that has been building
up, to which I have not easily been able to fnid answers. Any hints would
be appreciated.

I have inherited a system based on QNX version 4, but it is poorly
documented and I have no information on the kind of development system
that was used, except that it appears to have been running on QNX version
4.25, and the programs, which are written in C and C++ seem to have been
built with the Watcom compiler and toolset.

The target is an embedded pentium board running QNX version 4.25 and using
TCP/IP networking.

I have obtained the QNX RTP CD-ROM and installed it on a PC. This appears
to come with the GNU toolchain. The question is, will it be easy to
migrate the code from Watcom (i.e. does Watcom have any nonstandard
extensions that might have been used, or are there library differences
that could affect anything)? And when built on the QNX RTP system, will
the resulting binaries work on QNX 4.25 (and what about networking)?

I notice that the QNX RTP system seems to be linking with shared libraries
whereas it looks like the old code was statically linked. I assume copying
the shared libraries to the target would be enough to get it going, or
otherwise I could configure the GNU linker to do static linking.

If QNX RTP is not suitable for developing QNX 4 systems, then what system
should I use and how can I get it or set it up? I understand that my
company has licenses for QNX 4, but they are sadly disorganised and nobody
seems to know what the situation is. I notice that I can retrieve updated
versions of QNX 4 and the Watcom tools from the QNX WWW site; are these
likely to work with the existing licenses that we have, or are different
versions licenses separately?

Other questions on QNX RTP:

It installed ok, but did not automatically configure support for the
network adapter in the machine. nettrap showed “io-net -drtl” and after
some experimentation I found that executing “io-net -pttcpip -drtl” would
give me the en0 interface, but trying to configure it with ifconfig
results in errors, for example:

ifconfig en0 192.168.2.93 up

ifconfig: SIOCGIFMETRIC en0: Operation not supported
ifconfig: SIOCDIFADDR: Operation not supported
ifconfig: SIOCAIFADDR: Operation not supported

However if I instead run the Network Cfg tool in the Photon GUI and enter
the IP address then select “Apply”, it then works and “ifconfig en0” will
show the correct address. Trying to set the address with ifconfig still
fails, though.

I found a file buried deep in /etc somewhere which was executing io-net
and so I changed this to have the correct arguments, and that works. The
big problem is that I have to run the Network Cfg tool in the GUI each
time I boot the machine in order to set the IP address and enable the
interface.

The other problem is that the mouse (a microsoft serial type), while
working fine mostly, fails strangely when doing things such as dragging or
scrolling a window, or in fact any time when the screen is being redrawn
for any reason. Moving the mouse at such a time makes it skip around the
screen and the buttons get activated at random even though they are not
pressed. I am guessing that when the CPU is busy drawing the screen,
buffer overruns are occuring on the serial port from the mouse. Rebootnig
the system sometimes causes this problem to improve or get worse. I think
the display is using the “VESA” driver which appears to be supporting a
dumb framebuffer with completely software drawing. Perhaps this worsens
the problem.

Well there you have it - the questions of a QNX newbie. Any advice would
be much appreciated, especially as regards the network problem.


Mario Becroft <mb@gem.win.co.nz>

“Mario Becroft” <mb@gem.win.co.nz> wrote in message
news:9g9c5l$5a1$1@inn.qnx.com

I am a new QNX user and have a list of questions that has been building
up, to which I have not easily been able to fnid answers. Any hints would
be appreciated.

I have inherited a system based on QNX version 4, but it is poorly
documented and I have no information on the kind of development system
that was used, except that it appears to have been running on QNX version
4.25, and the programs, which are written in C and C++ seem to have been
built with the Watcom compiler and toolset.

The target is an embedded pentium board running QNX version 4.25 and using
TCP/IP networking.

I have obtained the QNX RTP CD-ROM and installed it on a PC. This appears
to come with the GNU toolchain. The question is, will it be easy to
migrate the code from Watcom (i.e. does Watcom have any nonstandard
extensions that might have been used, or are there library differences
that could affect anything)? And when built on the QNX RTP system, will
the resulting binaries work on QNX 4.25 (and what about networking)?

QNX6 (CD-ROM) and QNX 4.25 are not source nor binary compatible.
Depending on the archichture of the software porting can be straightforward
or very complexe. It’s hard to said. QNX6 has a migration kit to help
porting.
But in general it’s better to redesign around QNX6 to make use of the
new features.

I notice that the QNX RTP system seems to be linking with shared libraries
whereas it looks like the old code was statically linked. I assume copying
the shared libraries to the target would be enough to get it going, or
otherwise I could configure the GNU linker to do static linking.

Yes. Actually most of the shared library are required by the OS utilities
anyway.

If QNX RTP is not suitable for developing QNX 4 systems, then what system
should I use and how can I get it or set it up? I understand that my
company has licenses for QNX 4, but they are sadly disorganised and nobody
seems to know what the situation is. I notice that I can retrieve updated
versions of QNX 4 and the Watcom tools from the QNX WWW site; are these
likely to work with the existing licenses that we have, or are different
versions licenses separately?

QNX policy has always been one of free upgrade. You can downloaded any
updated
for the product you have a license for. To build QNX4 you need to setup a
PC with QNX4, install all the modules you need ( TCP/IP, watcom, Photon
…etc) and
build from there.

Other questions on QNX RTP:

It installed ok, but did not automatically configure support for the
network adapter in the machine. nettrap showed “io-net -drtl” and after
some experimentation I found that executing “io-net -pttcpip -drtl” would
give me the en0 interface, but trying to configure it with ifconfig
results in errors, for example:

ifconfig en0 192.168.2.93 up

ifconfig: SIOCGIFMETRIC en0: Operation not supported
ifconfig: SIOCDIFADDR: Operation not supported
ifconfig: SIOCAIFADDR: Operation not supported

However if I instead run the Network Cfg tool in the Photon GUI and enter
the IP address then select “Apply”, it then works and “ifconfig en0” will
show the correct address. Trying to set the address with ifconfig still
fails, though.

I found a file buried deep in /etc somewhere which was executing io-net
and so I changed this to have the correct arguments, and that works. The
big problem is that I have to run the Network Cfg tool in the GUI each
time I boot the machine in order to set the IP address and enable the
interface.

QNX6 comes with 2 TCP/IP stack, the tiny (ttcpip) and the full stack (tcpip)
hence if you change the command line for “io-net -ptcpip -drtl” ifconfig
will work. The tiny stack doesn’t support ifconfig. Setup is done
through a program call netmanager (that is invoke by the network cfg tool)

The other problem is that the mouse (a microsoft serial type), while
working fine mostly, fails strangely when doing things such as dragging or
scrolling a window, or in fact any time when the screen is being redrawn
for any reason. Moving the mouse at such a time makes it skip around the
screen and the buttons get activated at random even though they are not
pressed. I am guessing that when the CPU is busy drawing the screen,
buffer overruns are occuring on the serial port from the mouse. Rebootnig
the system sometimes causes this problem to improve or get worse. I think
the display is using the “VESA” driver which appears to be supporting a
dumb framebuffer with completely software drawing. Perhaps this worsens
the problem.

Make sure you have the latest patch (the CD doesn’t have the latest patch).
You can install the patch vial the package manager (assuming you have
internet connection)

Well there you have it - the questions of a QNX newbie. Any advice would
be much appreciated, especially as regards the network problem.


Mario Becroft <> mb@gem.win.co.nz

One important issue that you did not state is why you want
to move to RTP at all. Unless there is a pressing reason,
I can name a few, it would probably not be all that wise
a project.

A few reasons to port:

  1. The lifetime of the system/product is more than 4 years.
  2. You need support for newer hardware.
  3. You will be doing signficant new software development on the system.


    Previously, Mario Becroft wrote in qdn.public.qnxrtp.newuser:

I am a new QNX user and have a list of questions that has been building
up, to which I have not easily been able to fnid answers. Any hints would
be appreciated.

Mitchell Schoenbrun --------- maschoen@pobox.com