LPCPROG(1) | User development Tools | LPCPROG(1) |
lpcprog - NXP's LPC micro-controllers flasher
lpcprog -d serial_device -c command [OPTIONS] ... [FILE]
Use ISP protocol to flash LPC micro-controllers over serial line.
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.
A FILE argument must 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.
Mandatory arguments to long options are mandatory for short options too.
The command must be one of id, dump, flash, blank or go.
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 -p 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 -p option is provided, the program looks for lpctools_parts.def in the current directory first, and then in the /etc/ directory.
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.
A valid User Code is requiered by the LPC bootloader to start the internal user program. 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.
If the signature is not valid the LPC enters ISP mode.
The default behavior of lpcprog is to compute a valid code for the 7th exception vector and modify the programed binary data to include this valid code. You can prevent this by using -n option.
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 programing a specific pattern in flash location at 0x0000 02FC. IAP commands are not affected by the code read protection.
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.
Code Read Protection will not be implemented as it goes against the license of this tool and against the free software philosophy.
Written by Nathael Pajani.
Report bugs to bug@techno-innov.fr
Techno-Innov home page: <http://www.techno-innov.fr/>
Software Git Repository: <http://git.techno-innov.fr/>
Copyright © 2013 Techno-Innov License GPLv3+: GNU GPL
version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO
WARRANTY, to the extent permitted by law.
July 2014 | LPC Tools 1.07 |