htsoft-downloader

Name

htsoft-downloader -- Download code to PIC microcontroller with HI-TECH version_1 bootloader installed using RS232 serial port.

Synopsis

htsoft-downloader [-?hv] [-f serial_device] [-r retries] [-t timeout (.1 second/timeout)] [-v verbose level]

DESCRIPTION

The htsoft-downloader command is an implementation of a download application for the HI-TECH version_1 PIC bootloader. An Intel Hexadecimal Object File Format Specification Rev A (ie a .hex file from picc, MPLAB, gpasm, or other PIC compatible toolchains) is read on standard output and downloaded to a PIC on the serial_device.

OPTIONS

-h

Help

-f serial_device

Serial device filename. Examples:

/dev/ttyUSB0 (Linux USB Serial Adapter)

/dev/cuad0 (FreeBSD COM port).

The default is /dev/cuaU0, a Prolific PL2303 USB to serial adaptor on FreeBSD.

-r retries

Number of times to retry a block. Defaults to 5.

-t timeout

Timeout in .1 second intervals. Defaults to 25.

-v verbose_level

Increasing the verbosity level will produce debug messages indicating the status of the download. A level of 9 will include all debugging output. A level of 1 will indicate the overall status of the transfer.

EXAMPLE

Transfer the HEX file spyrus1.1.hex to a PIC connected to /dev/ttyUSB0 with verbose output. Note that the bootloader in this device does not send the last WOK command, this appears to be harmless.

pic-downloader -v9 -f /dev/ttyUSB0 < spyrys1.1.hex

Waiting for bootloader..........

upload block: load_offset=0x0000 bytes_to_send=32
Dwrite: cmd=E3 load=0000 bytes=20 csum=F8
write: data=01833000018A280400003020008430652020300700E830FE00E7306500843067

upload block: load_offset=0x0020 bytes_to_send=32
Dwrite: cmd=E3 load=0010 bytes=20 csum=AF
write: data=202530A0008430E8202017833010008430362020120A118A2DBD060401800A84

...

upload block: load_offset=0x1FFA bytes_to_send=6
Dwrite: cmd=E3 load=0FFD bytes=06 csum=AA
write: data=00CB30C42EBD
wDONE: reply=F8, expecting E4wwwwpic-downloader: htsoft_v1bl_done(): failed
PIC reset failed.

AUTHOR

Mark Fullmer

SEE ALSO

Intel Hexadecimal Object File Format Specification Rev A

www.htsoft.com

http://www.ehl.cz/pic/pic_e.htm