The armhex utility apparently does not handle linker sections greater that 0xFFFF bytes. When I have .text that exceeds that size the size saturates to 0xFFFF and all the data for the section is included. The result is a hex file that cannot be parsed.
No warnings are given by armhex and I haven't found an option that properly splits the section.
Here are the relevant lines from my
CM linker file:
MEMORY
{
FIRMWARE : origin = 0x00204020, length = 0x0003BFD0
}
SECTIONS
{
.text : > FIRMWARE, PALIGN(16)
}
Map output file:
.text 0 00204020 00010340
armhex arguments:
"C:/ti/ccs1260/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/bin/armhex" --memwidth=8 --romwidth=8 --diag_wrap=off --ascii -o "cm.hex" "cm.out"
When I then try to parse the hex file output:
Block Address: 0x204020; Length: 0xFFFF
Parsing for following blocks then fails because the length value in the hex file was truncated but the entire 0x10340 bytes of data are present in the hex file.
I have also tried splitting the FIRMWARE memory into 0xFFF0 sized chunks, but that does not allow the usage of PALIGN which causes other alignment/fill issues