2017-01-03 11:10:10 +00:00
|
|
|
<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN">
|
|
|
|
|
2017-01-03 11:16:53 +00:00
|
|
|
<!-- $Id: htsoft-downloader.sgml 126 2010-06-15 14:23:02Z maf $ -->
|
2017-01-03 11:10:10 +00:00
|
|
|
|
|
|
|
<refentry>
|
|
|
|
|
|
|
|
<refmeta>
|
|
|
|
<refentrytitle>
|
|
|
|
<application>htsoft-downloader</application>
|
|
|
|
</refentrytitle>
|
|
|
|
<manvolnum>1</manvolnum>
|
|
|
|
</refmeta>
|
|
|
|
|
|
|
|
<refnamediv>
|
|
|
|
<refname>
|
|
|
|
<application>htsoft-downloader</application>
|
|
|
|
</refname>
|
|
|
|
<refpurpose>
|
|
|
|
Download code to PIC microcontroller with HI-TECH version_1 bootloader
|
|
|
|
installed using RS232 serial port.
|
|
|
|
</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<refsynopsisdiv>
|
|
|
|
<cmdsynopsis>
|
|
|
|
<command>htsoft-downloader</command>
|
|
|
|
<arg>-?hv</arg>
|
|
|
|
<arg>-f<replaceable> serial_device</replaceable></arg>
|
|
|
|
<arg>-r<replaceable> retries</replaceable></arg>
|
|
|
|
<arg>-t<replaceable> timeout (.1 second/timeout)</replaceable></arg>
|
|
|
|
<arg>-v<replaceable> verbose level</replaceable></arg>
|
|
|
|
</cmdsynopsis>
|
|
|
|
</refsynopsisdiv>
|
|
|
|
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>DESCRIPTION</title>
|
|
|
|
<para>
|
|
|
|
The <command>htsoft-downloader</command> 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
|
|
|
|
<replaceable>serial_device</replaceable>.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>OPTIONS</title>
|
|
|
|
<variablelist>
|
|
|
|
|
|
|
|
<varlistentry>
|
2017-01-03 11:16:53 +00:00
|
|
|
<term>-f, --serial-device=<replaceable> serial_device</replaceable></term>
|
2017-01-03 11:10:10 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2017-01-03 11:16:53 +00:00
|
|
|
Serial device filename. Examples:
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
<filename>/dev/ttyUSB0</filename> (Linux USB Serial Adapter)
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
<filename>/dev/cuad0</filename> (FreeBSD COM port).
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
The default is <filename>/dev/cuaU0</filename>, a
|
|
|
|
Prolific PL2303 USB to serial adaptor on FreeBSD.
|
2017-01-03 11:10:10 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2017-01-03 11:14:13 +00:00
|
|
|
<varlistentry>
|
2017-01-03 11:16:53 +00:00
|
|
|
<term>-h, --help</term>
|
2017-01-03 11:14:13 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2017-01-03 11:16:53 +00:00
|
|
|
Help
|
2017-01-03 11:14:13 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2017-01-03 11:10:10 +00:00
|
|
|
<varlistentry>
|
2017-01-03 11:16:53 +00:00
|
|
|
<term>-i, --ignore-last-wok-timeout</term>
|
2017-01-03 11:10:10 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2017-01-03 11:16:53 +00:00
|
|
|
Ignore timeout for last WOK after sending reset.
|
2017-01-03 11:10:10 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2017-01-03 11:16:53 +00:00
|
|
|
<term>-r, --pic-retries=<replaceable> retries</replaceable></term>
|
2017-01-03 11:10:10 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Number of times to retry a block. Defaults to 5.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2017-01-03 11:16:53 +00:00
|
|
|
<term>-t, --pic-timeout=<replaceable> timeout</replaceable></term>
|
2017-01-03 11:10:10 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Timeout in .1 second intervals. Defaults to 25.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2017-01-03 11:16:53 +00:00
|
|
|
<term>-v, --verbose=<replaceable> verbose_level</replaceable></term>
|
2017-01-03 11:10:10 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
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.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2017-01-03 11:16:53 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term>--version</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Display software version.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2017-01-03 11:10:10 +00:00
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>EXAMPLE</title>
|
|
|
|
|
|
|
|
<informalexample>
|
|
|
|
<para>
|
|
|
|
Transfer the HEX file spyrus1.1.hex to a PIC connected to
|
|
|
|
<filename>/dev/ttyUSB0</filename> with verbose output. Note that
|
|
|
|
the bootloader in this device does not send the last WOK command, this
|
|
|
|
appears to be harmless.
|
|
|
|
</para>
|
|
|
|
<para>
|
2017-01-03 11:14:13 +00:00
|
|
|
<command>pic-downloader -v9 -i -f /dev/ttyUSB0 < spyrys1.1.hex</command>
|
2017-01-03 11:10:10 +00:00
|
|
|
</para>
|
|
|
|
<screen>
|
|
|
|
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
|
|
|
|
|
|
|
|
...
|
|
|
|
|
2017-01-03 11:14:13 +00:00
|
|
|
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.
|
2017-01-03 11:10:10 +00:00
|
|
|
</screen>
|
|
|
|
</informalexample>
|
|
|
|
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>AUTHOR</title>
|
|
|
|
<para>
|
|
|
|
<author>
|
|
|
|
<firstname>Mark</firstname>
|
|
|
|
<surname>Fullmer</surname>
|
|
|
|
</author>
|
|
|
|
<email>maf@splintered.net</email>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>SEE ALSO</title>
|
|
|
|
<para>
|
|
|
|
Intel Hexadecimal Object File Format Specification Rev A
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
www.htsoft.com
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
http://www.ehl.cz/pic/pic_e.htm
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
</refentry>
|