Skip to content

Commit 226edc1

Browse files
committed
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.
1 parent 16e544d commit 226edc1

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

tools/targets/PSOC6.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
from intelhex.compat import asbytes
2727

2828
from ..config import ConfigException
29-
from ..targets import HookError
3029

3130

3231
# Patch Cypress hex file:
@@ -76,14 +75,8 @@ def merge_images(hexf0, hexf1=None):
7675
ihex.padding = 0x00
7776
ihex.loadfile(hexf0, "hex")
7877
if hexf1 is not None:
79-
# get chip ID from metadata and compare
78+
# Merge the CM0+ image
8079
ihex1 = IntelHex(hexf1)
81-
type0 = ihex.tobinarray(start=0x90500002, size=4)
82-
type1 = ihex1.tobinarray(start=0x90500002, size=4)
83-
if type0 != type1:
84-
raise HookError(
85-
"Incompatible processor type: %s in '%s' and 0x%s in '%s'"
86-
% (hexf0, type0, hexf1, type1))
8780
ihex.merge(ihex1, 'ignore')
8881
return ihex
8982

0 commit comments

Comments
 (0)