First version of lpcprog man page
authorNathael Pajani <nathael.pajani@ed3l.fr>
Wed, 28 Aug 2013 11:42:46 +0000 (13:42 +0200)
committerNathael Pajani <nathael.pajani@ed3l.fr>
Wed, 28 Aug 2013 11:42:46 +0000 (13:42 +0200)
lpcprog.1 [new file with mode: 0644]

diff --git a/lpcprog.1 b/lpcprog.1
new file mode 100644 (file)
index 0000000..6896c3d
--- /dev/null
+++ b/lpcprog.1
@@ -0,0 +1,128 @@
+.TH LPCPROG "1" "August 2013" "LPC Tools 1.02" "User development Tools"
+.SH NAME
+lpcprog \- NXP's LPC micro-controllers flasher
+.SH SYNOPSIS
+.B lpcprog
+\fI\-d serial_device\fR \fI\-c command\fR [\fIOPTIONS\fR] ... [\fIFILE\fR]
+.SH DESCRIPTION
+.\" Add any additional description here
+.PP
+Use ISP protocol to flash LPC micro-controllers over serial line.
+.PP
+For all commands the target micro-controller must be in ISP mode and waiting for
+synchronisation ISP command (default state when entering ISP mode). See ISP MODE
+AND CODE READ PROTECTION section for more details.
+.PP
+A FILE argument \fBmust\fR be given for dump and flash commands. For flash command
+this file is the data (program) to be written to LPC internal Flash memory. For dump
+command, it will store the actual content of the LPC internal flash memory.
+.PP
+Mandatory arguments to long options are mandatory for short options too.
+.TP
+\fB\-p\fR, \fB\-\-parts\fR==\fIPARTS\fR
+Use PARTS as parts desription file instead of the default ones. See PARTS DESCRIPTION
+FILES section for more information on default parts desription files and order of
+precedence.
+.TP
+\fB\-d\fR, \fB\-\-device\fR=\fIDEV\fR
+Use DEV as host serial line to programm the target. Full path must be provided.
+Device node files are usually located in /dev/ directory.
+.TP
+\fB\-c\fR, \fB\-\-command\fR=\fICOMMAND\fR
+Command to execute. COMMAND must be one of \fBid\fR, \fBdump\fR, \fBflash\fR,
+\fBblank\fR or \fBgo\fR.
+See COMMANDS section for commands description.
+.TP
+\fB\-b\fR, --baudrate=BAUD
+Use BAUD as the baudrate for communication with the target device. Defaults to
+115200.
+.TP
+\fB\-t\fR, \fB\-\-trace\fR
+Turn on trace output of serial communication with target device
+.TP
+\fB\-f\fR, \fB\-\-freq\fR=\fIFREQ\fR
+Use FREQ (KHz) as the oscilator frequency of target device. Defaults to 10000 KHz
+.TP
+\fB\-n\fR, \fB\-\-no\-user\-code\fR
+Do not compute a valid user code for exception vector 7. See USER CODE section.
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+Display help information and exit
+.TP
+\fB\-v\fR, \fB\-\-version\fR
+Display version information and exit
+.SH COMMANDS
+.PP
+The command must be one of \fBid\fR, \fBdump\fR, \fBflash\fR, \fBblank\fR or \fBgo\fR.
+.TP
+\fBid\fR
+The \fBid\fR command displays the LPC part identification ID, the uid (unique ID),
+and the bootloader version of the connected target device.
+.TP
+\fBdump\fR
+Dump the whole connected target's flash memory content to the given file. This command
+requires a file argument.
+.TP
+\fBflash\fR
+Flash the content of the file given as argument to the beginning of the connected
+target's flash memory. Automatic computation of the User Code is made and User Code is
+stored in the 7th exception vector. Use \fB\-n\fR option to prevent User Code
+modification. If you need to write your file to a different flash section, use the
+\fBlpcisp\fR tool.
+.TP
+\fBblank\fR
+Erase the whole flash.
+.TP
+\fBgo\fR
+Unsupported Yet. Reset the target using hardware reset button or power cycle the
+device to start the programm.
+.SH "PARTS DESCRIPTION FILES"
+Default parts description files are /etc/lpctools_parts.def or ./lpctools_parts.def
+The parts description file is parsed for LPC device description for dump, blank, and
+flash commands. If none of the defaults exist and no existing file is supplied
+using \fB\-p\fR option, these command cannot execute. If the part description is not
+found in the first found file, the command will not execute either.
+If no \fB\-p\fR option is provided, the programm looks for lpctools_parts.def in the
+current directory first, and then in the /etc/ directory.
+.PP
+The content of parts description files is a list of LPC parts description.
+Each line holds one part description. Lines starting by # are comments.
+Refer to the default file found in the /etc/ directory for more information on the
+line format.
+.SH "USER CODE"
+A valid User Code is requiered by the LPC bootloader to start the internal user
+programm. User Code is considered valid if the reserved exception vector location 7
+(offset 0x 0000 001C in the vector table) contains the 2’s complement of the
+check-sum of table entries 0 through 6. This causes the checksum of the first 8
+table entries to be 0.
+.PP
+If the signature is not valid the LPC enters ISP mode.
+.PP
+The default behavior of \fBlpcprog\fR is to compute a valid code for the 7th
+exception vector and modify the programmed binary data to include this valid code.
+You can prevent this by using \fB\-n\fR option.
+.SH "ISP MODE AND CODE READ PROTECTION"
+Code Read Protection is a mechanism that allows "the user" to enable different
+levels of "security" in the system so that access to the on-chip flash and use of
+the ISP can be restricted. When needed, CRP is invoked by programming a specific
+pattern in flash location at 0x0000 02FC. IAP commands are not affected by the
+code read protection.
+.PP
+If your device Does not enter ISP state, or if some commands do not succeed, it may
+be because the CRP mechanism is in use on your device.
+.SH AUTHOR
+Written by Nathael Pajani.
+.SH "REPORTING BUGS"
+Report bugs to bug@techno-innov.fr
+.br
+Techno-Innov home page: <http://www.techno-innov.fr/>
+.br
+Software Git Repository: <http://git.techno-innov.fr/>
+.SH COPYRIGHT
+Copyright \(co 2013 Techno-Innov
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
+.br
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+.SH "SEE ALSO"
+lpcisp(1)