LPC2000 flash writing improved

The LPC2000 flash driver is able to calculate the checksum that's used by the bootloader to identify a valid flash image.
`` #flash bank lpc2000 base size 0 0 lpc_variant target # cclk calc_checksum flash bank lpc2000 0x0 0x40000 0 0 lpc2000_v1 0 14765 calc_checksum``
When 'calc_checksum' is specified in the LPC2000 flash bank configuration, the flash writing code inserts the correct checksum whenever a write to offset 0x0 of at least 32 byte (size of the exception vectors) occurs.
flash probe 0
Uses the IAP routines to check the erase state of all flash sectors
flash erase 0 x y
Erases flash blocks x to y using IAP calls
flash info 0
Prints information about the flash bank (block sizes, block starting offsets, erase state)
flash write 0 FILE OFFSET
Writes the binary FILE to the LPC2000 internal flash starting at OFFSET.

social