htsoft-downloader 1 htsoft-downloader Download code to PIC microcontroller with HI-TECH version_1 bootloader installed using RS232 serial port. 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 -f, --serial-device= 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. -h, --help Help -i, --ignore-last-wok-timeout Ignore timeout for last WOK after sending reset. -r, --pic-retries= retries Number of times to retry a block. Defaults to 5. -t, --pic-timeout= timeout Timeout in .1 second intervals. Defaults to 25. -v, --verbose= 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. --version Display software version. 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 -i -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=0x1FF8 bytes_to_send=8 Dwrite: cmd=E3 load=0FFC bytes=08 csum=7E write: data=246B120A158A3400 wDONE: reply=F0, expecting E4wPIC reset sent. AUTHOR Mark Fullmer maf@splintered.net SEE ALSO Intel Hexadecimal Object File Format Specification Rev A http://www.htsoft.com http://www.microchip.com http://www.ehl.cz/pic/pic_e.htm ftp://ftp.htsoft.com/hitech/samples/bootldr.zip