Skip to content

Commit 06c825f

Browse files
committed
Checksum the vector table of the LPC54XXX
LPC devices require a checksummed vector table to boot. To ensure this most programmers automatically compute the checksum when programming flash. This causes problems with verification if the original image does not have a checksummed vector table. This is because when reading the data back the checksum location differs from the original image. To fix this verification failure this patch adds a post build hook to checksum the vector table of the LPC54XXX. This fixes flash verification failures due to the checksum not matching.
1 parent 39b4872 commit 06c825f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

targets/targets.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -821,6 +821,7 @@
821821
"detect_code": ["1054"],
822822
"device_has": ["USTICKER", "RTC", "ANALOGIN", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES", "FLASH"],
823823
"release_versions": ["2", "5"],
824+
"post_binary_hook": {"function": "LPCTargetCode.lpc_patch"},
824825
"device_name" : "LPC54114J256BD64"
825826
},
826827
"MCU_LPC546XX": {
@@ -832,6 +833,7 @@
832833
"inherits": ["Target"],
833834
"device_has": ["USTICKER", "RTC", "ANALOGIN", "EMAC", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES", "FLASH", "TRNG"],
834835
"device_name" : "LPC54628J512ET180",
836+
"post_binary_hook": {"function": "LPCTargetCode.lpc_patch"},
835837
"overrides": {
836838
"network-default-interface-type": "ETHERNET"
837839
}

0 commit comments

Comments
 (0)