Part Number: AM263P4-Q1
Hello,
I need to extract the initializers for .data variables which are used for such things as conversion from ADC value to physical value (i.e. the m and c in y = mx +c) into a hex file. The hex file is then imported into Vector CANape and modified as part of calibration activity.
The initializers are of course the contents of a copy table. I have already switched off copy table compression to make this feasible.
In my application, the copy table in question starts at CAL_DATA_SECTION load address + 8. The offset of 8 bytes is because the first 8 seem to be a copy length specifier which I don't need.
.cinit 0 70137268 000078d8
70137268 00006a20 (.cinit..data.load) [load image]
7013dc88 000006f0 (.cinit.CAL_DATA_SECTION.load) [load image]
In this build, I want to extract, address 0x7013DC90 (= load address 0x7013DC88 +8)

With reference to the tiarmhex utility 19. Hex Conversion Utility Description — TI Arm Clang Compiler Tools User's Guide, I first tried specifying by a SECTIONS directive:
SECTIONS
{
.cinit.CAL_DATA_SECTION.load
}
But got the error:
warning: section .cinit.CAL_DATA_SECTION.load not found in
(./core_0/core_0.out)
fatal error: no initialized sections in input files
However, after some trial and error, with the following script:
"./core_0/core_0.out"
--intel
--image
--exclude .text*
--exclude .vectors
--exclude .rodata
ROMS
{
cal_data_section : origin=0x7013dc90, length=0x6F0, memwidth=8
}
I managed to get a file called core_0.i0 containing the expected data:

My problem now is that I don't know at link time the load address nor length of the copy table for CAL_DATA_SECTION. A problem that could be avoided if the SECTIONS directive worked.
To start with, can I fix the load address of CAL_DATA_SECTION please?
