I am trying to build an OS image for TI OMAP4 Pandaboard. The downloaded BSP can be built but very limited without gcc g++ compiler. I think it much difficult to add the tool chain in QNX Momentics IDE, because there are so many files to be added. Can I manually modify the buildfile to do it? If possible, please give me an example. Thanks in advance.
2 Answers
No, it is not possible to run g++ on your TI OMAP4 Pandaboard (unless you build g++ from sources for the ARM platform using the existing QNX toolchain running on an X86 platform).
Why not possible: QNX releases their build tools only for X86-based hosts. The currently supported host OS-es include some variants of Windows, Linux and QNX but the precondition is that the host hardware is X86-based.
Likely you do not actually want to build your library on the target hardware; it should not matter where you actually do the build (except in very special cases where you build some source code based on user input, etc.)
What you need to do is build your library on your development host using the ARM toolchain (QCC if you want to use the high-level tools; ntoarmv7-g++ if you want to use the familiar g++ interface). Once you have your binary you can include it in the .ifs file. You just need to include a line in the .build file, similar to the following example:
/path/on/targetfs/yourbinary=/path/on/buildmachine/yourbinary
If your build environment is configured so that mkifs finds your binary then you can omit the "path/on/buildmachine" part.
If you are fine with having the binary on your target under /proc/boot then you can omit the "/path/on/targetfs/ part as well.
For ease of development it would usually be more convenient for you to store your binary on the SD card with a FAT filesystem. Then you can just copy your binary to the SD without having to rebuild the .ifs file.
Finally, once you get experienced you will want to export a part of your host-machine's filesystem via CIFS or NFS and mount it directly from your target. This will save all the trouble of having to copy files (and, possibly, reboot the target) in each build cycle. But this is far off from your original question.

- 436
- 2
- 10
-
Thank you nefarious! Your answer is very valuable. But to the question, libupnp is a portable library, which uses configure to check system environment and automatically defines the suitable compiling options. Now I don't know what kinds of options shoud be defined in Momentics. In fact I had it successfully built on host. But it cannot run normally on the target. So I asked the question. – allenchen Dec 04 '13 at 06:09
-
Okay, your real question is "how to build libupnp for QNX." First, here is a link from QNX docs about doing a configure-based build: http://www.qnx.com/developers/docs/6.5.0_sp1/index.jsp?topic=%2Fcom.qnx.doc.neutrino_prog%2Fmake_convent.html&anchor=GNU_configure Second, if you give links to the download locations, including dependencies, that you are using then I may give building it a try to be able to give more specific advice. One problem for both you and me is that the build result not working can well be due to a configuration/usage error even if the build result is correct. – maverick Dec 04 '13 at 14:04
I think you are trying to get the QNX C/C++ compiler to run on your target board. Correct?
If so, rather than installing the Runtime Kit, you install the QNX Software Development Platform and you should be good to go.
You can also use the System Builder to customize your QNX OS, but this is going to be harder than just using the QNX SDP.
One other note: QNX uses qcc
for C and QCC
for C++ instead of gcc
. They both use gcc
under the hood, but to compile on QNX, use qcc
instead of gcc
.

- 2,848
- 2
- 32
- 54
-
But I want to port libupnp, need run configure to determine compiler options. Using QNX SDP, I don't know how to do it. – allenchen Nov 22 '13 at 06:09
-
@allenchen You basically just install the QNX SDP onto your target platform. This will give you the whole development stack. That said, how hard this is really depends on your board and what hoops you have to jump through to get everything to work. It might not be pretty, unfortunately. – kmort Nov 22 '13 at 13:35
-
I don't know whether the QNX SDP can be install on target platform. But I am really doubted. Do you know how to package the compiler chain when building the OS image? – allenchen Nov 24 '13 at 07:43
-
@allenchen What method did you use to get QNX on there originally? Just use the same method with the SDP instead of the runtime environment. – kmort Nov 25 '13 at 13:01
-
I am using libupnp on QNX. It need run configure to check environment options for compiler. – allenchen Nov 27 '13 at 00:58