This appendix presents information specific to GNAT for QNX 7 cross configurations.
This section is a starting point for using GNAT to develop and execute Ada programs for Blackberry’s QNX 7 target environment. We assume that you know how to use GNAT in a native environment and how to start an ssh or other login session to connect to your board running QNX.
We also assume that you have installed the QNX Software Development platform.
To compile code for a QNX target using GNAT Pro, you will need to first set up your environment from the QNX Software Development platform. For example:
$ source ~/qnx700/qnxsdp-env.sh
With GNAT, the easiest way to build the basic
Hello World program is
gprbuild. For the aarch64 QNX target this would look
$ gprbuild --target=aarch64-nto-qnx hello using project file .../_default.gpr Compile [Ada] hello.adb Bind [gprbind] hello.bexch [Ada] hello.ali Link [link] hello.adb
(The first line is the command entered by the user – the subsequent three
are the programs run by
This creates the executable hello, which you then need to load on the board to run it.
Integration with Momentics¶
The GNAT Pro toolchain can be integrated with the Momentics development environment by installing the GNATbench plugin. Once installed, comprehensive documentation on how to use GNATbench with QNX is available in the help menu.