mirror of https://github.com/ARMmbed/mbed-os.git
PSOC6.py: remove silicon ID check
PSoC 6 hex files contain 4-byte chip ID at virtual offset 0x90500002 added by PSoC Creator or cymcuelftool from .cymeta ELF section. merge_images compares chip ID in CM0+ and CM4 hex files and raises an exception in case of mismatch. Chip ID is different for each MPN (for example, 0xE2072100 for CY8C6347BZI-BLD53 and 0xE2062100 for CY8C6247BZI-D54). CM0+ prebuilt images target CY8C6347BZI-BLD53 but should be compatible with other PSoC6 MPNs. Remove the check to enable merging CM0+ images with CM4 applications built for different MPNs, with empty or absent cymetadata.pull/9466/head
parent
16e544d9b4
commit
226edc1abd
|
@ -26,7 +26,6 @@ from intelhex import IntelHex
|
||||||
from intelhex.compat import asbytes
|
from intelhex.compat import asbytes
|
||||||
|
|
||||||
from ..config import ConfigException
|
from ..config import ConfigException
|
||||||
from ..targets import HookError
|
|
||||||
|
|
||||||
|
|
||||||
# Patch Cypress hex file:
|
# Patch Cypress hex file:
|
||||||
|
@ -76,14 +75,8 @@ def merge_images(hexf0, hexf1=None):
|
||||||
ihex.padding = 0x00
|
ihex.padding = 0x00
|
||||||
ihex.loadfile(hexf0, "hex")
|
ihex.loadfile(hexf0, "hex")
|
||||||
if hexf1 is not None:
|
if hexf1 is not None:
|
||||||
# get chip ID from metadata and compare
|
# Merge the CM0+ image
|
||||||
ihex1 = IntelHex(hexf1)
|
ihex1 = IntelHex(hexf1)
|
||||||
type0 = ihex.tobinarray(start=0x90500002, size=4)
|
|
||||||
type1 = ihex1.tobinarray(start=0x90500002, size=4)
|
|
||||||
if type0 != type1:
|
|
||||||
raise HookError(
|
|
||||||
"Incompatible processor type: %s in '%s' and 0x%s in '%s'"
|
|
||||||
% (hexf0, type0, hexf1, type1))
|
|
||||||
ihex.merge(ihex1, 'ignore')
|
ihex.merge(ihex1, 'ignore')
|
||||||
return ihex
|
return ihex
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue