Other Parts Discussed in Thread: C2000WARE
Tool/software: TI C/C++ Compiler
Hi,
I use C:\ti\c2000\C2000Ware_1_00_03_00\device_support\f2837xs\common\cmd\2837xS_FLASH_CLA_lnk_cpu1.cmd
and it compiles fine with e.g. the cla_iir2.2z_cpu01 example.
If I copy or link 2837xS_FLASH_CLA_lnk_cpu1.cmd to my own project, I get the errors
"J:/workspace/firmware/duc/device_support/f2837xs/common/cmd/2837xS_FLASH_CLA_lnk_cpu1.cmd", line 165: warning #10097:
memory range not found: FLASHB on page 1
"J:/workspace/firmware/duc/device_support/f2837xs/common/cmd/2837xS_FLASH_CLA_lnk_cpu1.cmd", line 165: error #10265:
no valid memory range(NULL) available for placement of ".const_cla"
"J:/workspace/firmware/duc/device_support/f2837xs/common/cmd/2837xS_FLASH_CLA_lnk_cpu1.cmd", line 165: error #10099-D:
program will not fit into available memory. load placement with
alignment/blocking fails for section ".const_cla" size 0x2 page 1
As a workaround, in my own linker command file, I placed all to PAGE = 0 and all seems OK:
MEMORY
{
PAGE 0 :
RAM4CLADATA : origin = 0x008000, length = 0x000800 /* LS0 */
FLASHE2J : origin = 0x088000, length = 0x030000 /* firmware */
}
SECTIONS
{
.scratchpad : > RAM4CLADATA, PAGE = 0
.bss_cla : > RAM4CLADATA, PAGE = 0
/* linker error if PAGE = 1, so RAM4CLADATA moved to PAGE = 0 */
.const_cla : LOAD = FLASHE2J,
RUN = RAM4CLADATA,
RUN_START(_cla_cons_run_start),
LOAD_START(_cla_cons_load_start),
LOAD_SIZE(_cla_cons_load_size),
PAGE = 0
}
This is similar to the suggestion in
Why does 2837xS_FLASH_CLA_lnk_cpu1.cmd not work in any case?
Are there problems when PAGE 0 is used?
Thanks,
Frank