sendnto
Send an OS image to a target over a serial or parallel port (QNX OS)
Syntax:
sendnto [-eqrv] [-b baud] -d device [-i host[:port]] [-l speed]
[-P regnum[,size]] [-p nto|gdb] [-w timeout[:response]] filename
Runs on:
QNX OS, Linux, Microsoft Windows
Options:
- -b baud
- Set the serial port transfer speed to baud.
- -d device
- Send the image over this device.
You must specify this option.
The form of the device name depends on the host OS:
- Linux: /dev/ttySX
- QNX OS: /dev/serX
- Windows: comX
- -e
- Request an echo from the target for every data record (off by default). An echo may be needed for serial downloads at very high baud rates (>57600 baud) to very slow machines.
- -i host[:port]
- Specify the host (and optionally a port) to send the image to.
- -l speed
- (
el
) Output is to a parallel port with a LAPLINK cable. The speed may be 1...3, with 1 being the fastest. - -P regnum[,size]
- Set the GDB PC register number and size.
- -p nto|gdb
- Set the download protocol to NTO (the default) or GDB.
- -q
- Be quiet; don't print an ongoing percentage of image downloaded.
- -r
- Allow raw file transfers.
- -v
- Be verbose; print an ongoing percentage of download complete.
- -w timeout[:response]
- Wait for timeout seconds or until response has been received before closing the connection.
Description:
The sendnto utility takes an OS image built with mkifs and sends it to a target device using a fast binary protocol. The target computer needs a loader built into its startup code in ROM or FLASH that understands this protocol. The protocol is very simple and is designed to be implemented with minimal code in the target.
The Board Support Packages generally contain IPL source for serial targets.
START
DATA DATA ...
GO
Each record has a sequence number and checksum to ensure data
integrity. The GO
record transfers control to the downloaded
image. The details of this protocol may be determined by examining the
source to sendnto, which is also made available for porting
to other development environments.
Downloads over a parallel port are automatically flow-controlled. Downloads over a serial port assume that the target is fast enough to process the data. For most targets this is true for baud rates up to 57600 baud.
On slower targets with a baud rate of 115200, you may need to specify the -e option to flow
control sendnto with the target. This causes
sendnto to insert an ECHO
record after each
data record. It then pauses and waits for the target to echo of a
+
before sending the next record. If the target fails to
send a +
within 1/10 second, sendnto
times out and sends the next record anyway. If you don't specify the
-e option, the link need only operate in one direction
(write without read from the host's point of view).
When used over a serial link, sendnto uses the existing baud rate and hardware flow control set by the stty command. It programs the link to operate in raw mode. Note that hardware flow control isn't required on the link.
The -v option makes sendnto print a continuously updated percentage as the image is downloaded. This provides feedback during large image downloads over slow links.
Examples:
sendnto -d /dev/ser1 image
sendnto -d /net/server/dev/ser2 image
sendnto -d /dev/par image
sendnto -d /dev/bipar image
Exit status:
- 0
- Successful completion.
- >0
- An error occurred.