Hardcoded dependency on DCCM_BUILD.SIZE0 and SIZE1 fields
anthony-kolesov opened this issue · 1 comments
anthony-kolesov commented
Currently there is a code: https://github.com/foss-for-synopsys-dwc-arc-processors/openocd/blob/master/src/target/arc32.c#L762 where C code has hard dependency on DCCM_BUILD containing fields SIZE0 and SIZE1 - it first reads those fields, then checks version of the DCCM. However in the DCCM version 5, there is only a single field SIZE, as a result with respective register description OpenOCD fails to start with an error message
Info : JTAG tap: arc-em.cpu tap/device found: 0x200444b1 (mfg: 0x258, part: 0x0044, ver: 0x2)
Error: Target not examined yet
in procedure 'reset' called at file "share/openocd/scripts/board/snps_iotdk.cfg", line 37
in procedure 'ocd_bouncer'
The solution is that code should first read only DCCM_BUILD.VERSION and if it is 3 or 4, then execute current code, but if it is 5, then execute different code that aligns with PRM.
anthony-kolesov commented
The same issues applies to ICCM_BUILD register.