ARM: LPC18xx/43xx On-chip Flash Loader Vector Checksum Calculation
Information in this knowledgebase article applies to:
When I load an example to the internal flash on the LPC18xx/43xx and correctly set the boot pins, the program still won't run.
What could be wrong?
The most likely reason this happens is that the application does not fulfill the criteria for Valid User Code. Unlike the on-chip flash loaders for other LPC devices, the flash loader for LPC18xx/43xx on-chip flash does not calculate the NXP specific vector table checksum. So the on-chip boot loader will not detect valid user code and does not boot from it.
The reason for this different behavior is that LPC18xx/43xx can boot from different flash banks. It is up to the user to place the vector table in flash bank A or B. The generic flash loader must NOT modify the flash bank which does not contain the vector table.
Add the checksum to the output file with a user command that runs automatically after the build. MDK-ARM also supplies the suitable command line tool for this purpose.
In Options for Target — User — Run User Programs After Build/Rebuild add:
$K\ARM\BIN\ELFDWT.EXE !L BASEADDRESS(0x1A000000)
If your application starts from bank A.
$K\ARM\BIN\ELFDWT.EXE !L BASEADDRESS(0x1B000000)
if your application starts from bank B.
Note for creating a HEX file with valid checksum:
$K\ARM\ARMCC\BIN\fromelf.exe --i32combined -o !H !L
Then, fromelf.exe reads the AXF file with valid checksum and converts it to a HEX file.
Note: - ModernULINK Pro drivers handle the placing of the checksum value, so calling fromelf.exe is no longer required.
Last Reviewed: Thursday, February 15, 2018
of your data.