Hi all,
Currently I am using a very old TI DSP -> C33 to build some firmware for our device.
I met a problem, before the feature enhancement, the code size of the compiled .dat file is about 7600KB, after the feature enhancement, the code size became to 9820KB, then I compared the two .dat file before and after enhancement, I found that the later one have two code segment.
It looks like:
$A840000,
00 94 60 C0 00 98 60 C0 00 9C 60 C0 00 A0 60 C0 01 61 60 C0 00 A8 60 C0
00 00 00 00 00 00 00 00 00 AC 60 C0 00 BA 60 C0 00 BE 60 C0 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00
...
$A1000000,
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
...
ETX
While in the original code, there is only one code segment,
$A840000,
00 94 60 C0 00 98 60 C0 00 9C 60 C0 00 A0 60 C0 01 61 60 C0 00 A8 60 C0
00 00 00 00 00 00 00 00 00 AC 60 C0 00 BA 60 C0 00 BE 60 C0 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00
...
ETX
I want to know is is there any size limitation for the lnk30.exe? If the code size is more than the limitation, does lnk30.exe automatically divide the code into two segments?
If it is, then how can we optimize our code to limit the code two one segment? Or can we modify the limitation for the linker?
Because our download tool only support to download one code segment to our device, so if there are two code segment, the download tool will always report an error.
Thank you very much!