The easiest way to transfer an image to your target is using a ROM monitor, a simple program that runs when you first
power on the board. The ROM monitor lets you communicate with your board via a command-line interface (over a serial or IP link),
so you can download images to the board's system memory and burn images into flash.
Note:
If your board doesn't have a ROM monitor, you probably can't use the download services in the IDE, so you have to get the image
onto the board in
some other way.
The IDE provides two mechanisms for transferring image files: serial terminals or the TFTP server.
Opening a serial terminal
The IDE includes a Terminal view so you can talk to your target without having to leave the IDE and use
an external program like HyperTerminal.
To open a serial terminal and talk to your target:
- Connect your target and host with a serial cable.
-
Select .
-
Expand Terminal, then select Terminal and click
OK.
The IDE displays the Terminal view, typically in the bottom right area.
-
Click the Open Terminal button () in the view toolbar to open the Launch Terminal
window.
- In the Choose terminal dropdown, select Serial Terminal, then select your communications
settings (e.g., serial port, baud rate) and click OK.
You can now interact with your target by typing in the view and transfer files with the Send File
button, as explained in the next section.
Transferring files over a serial connection
In the Terminal view, the Send file button
()
becomes active as soon as you open a serial connection with the target.
To transfer a file:
-
Using either the Terminal view or another method (outside the IDE), configure your target so that
it's ready to receive an image. For details, see your hardware documentation.
-
In the view toolbar, click the Send file button
().
-
In the Data Transmission dialog box, below the File to transfer box, select the file by doing one of
the following actions:
- Click Workspace and in the File Selection dialog box, select a file and click
OK.
- Click Filesystem and in the File Selection dialog box, select a file from your
host filesystem and click Open.
- In the Select transfer protocol area, select Transfer a file using the QNX sendnto protocol
or Transfer raw binary data over the connection.
Note:
The QNX
sendnto protocol sends a sequence of records, including the start record, data records,
and a go record. Each record has a sequence number and checksum. Your target must be running an IPL (or other software)
that understands this protocol.
- Click Finish.
The IDE begins transferring the file over the serial connection. To stop the transfer, you can click the stop button
()
next to the progress bar.
Transferring files over TFTP
The IDE has a TFTP server for transferring image files to the target. This feature eliminates the need to use an external
service for downloading images (assuming your target supports TFTP downloads). The TFTP server searches all QNX System Builder
projects for system images whenever it receives download requests from a bootloader program.
To use this feature, your target must be
configured for IP communications.
Before powering on your target board (and hence, before its bootloader program runs), you must start the TFTP server.
You can configure the IDE to automatically start it, by selecting and checking
Start TFTP Server when IDE opens.
Note:
If you're running as a non-root user on Linux, you must run the server on a port higher than 2015. To set the port, in
the same TFTP Server dialog, enter a number in the Port field.
When you're finished configuring the TFTP server, click
OK to save the settings and close the dialog.
If necessary, you can manually start the server:
- Select .
- Click OK to open the view. By default, it appears at the bottom right.
In the view toolbar, click the View Menu dropdown (), then click Start.
For the remainder of the IDE session, the TFTP server listens for incoming transfer requests and fulfills them.
The internal TFTP server handles the requests, while the view shows the host IP address and port on which the server listens
for them and the location where it looks for image files.
The view also provides the status of current and past transfers, by displaying the requested filename, a progress bar, and a
status message during each transfer (in the grey area below the host information). You'll see data in this area just after you
power on your board and its bootloader begins downloading image files. You can clear the view of all completed transactions
by clicking the Clear button ().
The TFTP server recognizes files in the
images directory of all open QNX System Builder projects,
so you don't need to specify this path. However, the IDE deletes the contents of this directory during builds,
so if you want to transfer files that aren't generated by the IDE, you must configure a new path:
- Select .
- Click New to open the Add New Search Path window, then manually enter a
directory or click a button to select a workspace or filesystem location from a file selector.
Click OK to save the settings and close the preferences window.
The TFTP server is now aware of the contents of your selected directory.
Other image transfer methods
If your target board doesn't have an integrated ROM monitor, you may not be able to transfer your image over a serial or TFTP
connection. In this case, you must use another method, such as:
- SD Card — copy the image to an SD Card plugged into your host, then plug the card into your target
- Flash programmer — manually program your flash with an external programmer
- JTAG/ICE/emulator — use such a device to program and communicate with your target
To learn how to connect to your particular target board, consult your hardware and BSP documentation.