Other Parts Discussed in Thread: TMS570LC4357,
While investigating use of the GCC ARM compiler for a C++ project using a TMS570LC4357 with HALCoGen 04.07.01 noticed that on attempting to get the CCS debugger to verify a program was getting a verification error:
CortexR5: File Loader: Verification failed: Values at address 0x08001500 do not match Please verify target memory and memory map.
Where the linker map file showed the address with the verification error was the start of the .ARM.extab section:
.ARM.extab 0x08001500 0x62ec *(.ARM.extab* .gnu.linkonce.armextab.*)
The HL_sys_link.ld GCC linker script created by HALCoGen contains the following entries for sections related to C++ exception handling:
.ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >RAM .ARM : { __exidx_start = .; *(.ARM.exidx*) __exidx_end = .; } >FLASH
The Exception Handling ABI for the Arm® Architecture shows that the .ARM.extab and .ARM.exidx sections both contain read-only data:
The issue is that the HALCoGen HL_sys_link.ld GCC linker script is incorrectly placing the .ARM.extab section in RAM rather than FLASH.
After correcting the linker script to place .ARM.extab in FLASH rather than RAM then the program verification was successful.
A search of HALCoGen 04.07.01 found the following "template" linker script files which all appear to the same error:
Search ".ARM.extab*" (8 hits in 8 files of 1695 searched)
C:\ti\Hercules\HALCoGen\v04.07.01\drivers\TMS570LC4357ZWT\SYSTEM570v000\sys_link.ld (1 hit)
Line 63: .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >RAM
C:\ti\Hercules\HALCoGen\v04.07.01\drivers\TMS570LC4357ZWT\SYSTEM570v000\sys_link_freeRTOS.ld (1 hit)
Line 73: .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >RAM
C:\ti\Hercules\HALCoGen\v04.07.01\drivers\TMS570LS0432PZ\SYSTEM570v000\sys_link.ld (1 hit)
Line 62: .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >RAM
C:\ti\Hercules\HALCoGen\v04.07.01\drivers\TMS570LS0432PZ\SYSTEM570v000\sys_link_freeRTOS.ld (1 hit)
Line 72: .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >RAM
C:\ti\Hercules\HALCoGen\v04.07.01\drivers\TMS570LS1227ZWT\SYSTEM570v000\sys_link.ld (1 hit)
Line 63: .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >RAM
C:\ti\Hercules\HALCoGen\v04.07.01\drivers\TMS570LS1227ZWT\SYSTEM570v000\sys_link_freeRTOS.ld (1 hit)
Line 73: .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >RAM
C:\ti\Hercules\HALCoGen\v04.07.01\drivers\TMS570LS3137ZWT\SYSTEM570v000\sys_link.ld (1 hit)
Line 63: .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >RAM
C:\ti\Hercules\HALCoGen\v04.07.01\drivers\TMS570LS3137ZWT\SYSTEM570v000\sys_link_freeRTOS.ld (1 hit)
Line 73: .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >RAM