User Guide - lpcprog#
This user’s guide describes how to use lpcprog application.
Command line interface#
lpcprog#
Utility for communication with the bootloader on target.
lpcprog [OPTIONS] COMMAND [ARGS]...
Options
- -v, --verbose#
Print more detailed information
- -vv, --debug#
Display more debugging information.
- --version#
Show the version and exit.
- --help#
Show this message and exit.
- -f, --family <family>#
Select the chip family.
- Options:
lpc804 | lpc810 | lpc812 | lpc845 | lpc865
- -r, --revision <revision>#
Chip revision; if not specified, most recent one will be used
- -p, --port <port>#
Port/device for serial communication
- -t, --timeout <ms>#
Sets timeout when waiting on data over a serial line. The default is 1000 milliseconds.
- -b, --baudrate <baudrate>#
baudrate
- Options:
9600 | 19200 | 38400 | 57600 | 115200 | 230400 | 460800
blank-check-sectors#
This command is used to blank check one or more sectors of on-chip flash memory.
lpcprog blank-check-sectors [OPTIONS] START END
Arguments
- START#
Required argument
- END#
Required argument
compare#
This command is used to compare the memory contents at two locations.
lpcprog compare [OPTIONS] SOURCE DESTINATION LENGTH
Arguments
- SOURCE#
Required argument
- DESTINATION#
Required argument
- LENGTH#
Required argument
erase-page#
Erase one or more page(s) of on-chip flash memory.
Start and end are page indices.
lpcprog erase-page [OPTIONS] START_INDEX END_INDEX
Arguments
- START_INDEX#
Required argument
- END_INDEX#
Required argument
erase-sector#
Erase one or more sectors of on-chip memory.
lpcprog erase-sector [OPTIONS] START END
Arguments
- START#
Required argument
- END#
Required argument
get-families#
Shows the full family info for commands in this group.
lpcprog get-families [OPTIONS]
get-info#
Get information about the chip.
lpcprog get-info [OPTIONS]
go#
Execute a program residing in RAM or flash memory..
lpcprog go [OPTIONS] ADDRESS
Options
- -t, --thumb#
Thumb mode
Arguments
- ADDRESS#
Required argument
prepare-sectors#
Prepare one or more sector(s) of on-chip flash memory.
Start and end are page indices.
This command must be executed before executing “Copy RAM to flash” or “Erase Sector(s)”, or “Erase Pages” command.
lpcprog prepare-sectors [OPTIONS] START_INDEX END_INDEX
Arguments
- START_INDEX#
Required argument
- END_INDEX#
Required argument
program-flash#
This command is used for programming the flash memory.
Choose either sector or page.
Before programming, the flash sector is erased. Data are aligned to page size and the copied to RAM before writing the sector. After programming, verification of data is performed.
lpcprog program-flash [OPTIONS]
Options
- --erase, --no-erase#
Do not erase before programming
- --verify, --no-verify#
Do not verify after programming
- -p, --page <page>#
Start page, choose sector or page
- -s, --sector <sector>#
Start sector, defaults to 0
- -b, --binary <FILE>#
Required Binary file to program
read-crc-checksum#
This command is used to read the CRC checksum of a block of RAM or flash memory.
lpcprog read-crc-checksum [OPTIONS] ADDRESS LENGTH
Arguments
- ADDRESS#
Required argument
- LENGTH#
Required argument
read-flash-signature#
This command is used to read the flash signature generated by the flash controller.
lpcprog read-flash-signature [OPTIONS] START END
Options
- -m, --mode <mode>#
Flash controller mode
- -w, --wait-states <wait_states>#
Number of wait states
Arguments
- START#
Required argument
- END#
Required argument
read-memory#
This command is used to read data from RAM or flash memory.
This command is blocked when code read protection is enabled.
lpcprog read-memory [OPTIONS] ADDRESS LENGTH
Options
- -r, --raw#
Do not use hexdump format
- -b, --binary <binary>#
Path to output binary file
Arguments
- ADDRESS#
Required argument
- LENGTH#
Required argument
set-baud-rate#
This command is used to change the baud rate.
lpcprog set-baud-rate [OPTIONS]
Options
- -s, --stop-bits <stop_bits>#
Stop bits
- -r, --baud-rate <baud_rate>#
Required Baud rate
- Options:
9600 | 19200 | 38400 | 57600 | 115200 | 230400 | 460800
set-echo#
When ON the ISP command handler sends the received serial data back to the host.
lpcprog set-echo [OPTIONS] ECHO
Arguments
- ECHO#
Required argument
sync#
Sync connection.
lpcprog sync [OPTIONS]
Options
- -r, --retries <retries>#
Retries for synchronization
- -f, --frequency <frequency>#
Crystal frequency
unlock#
This command is used to unlock Flash Write, Erase, and Go commands.
lpcprog unlock [OPTIONS]
write-ram#
Download data to RAM.
lpcprog write-ram [OPTIONS]
Options
- -a, --address <address>#
RAM address where data bytes are to be written.
- -b, --binary <FILE[,BYTE_COUNT] | {{HEX-DATA>#
Required Binary file to program