Hello,
I am finding my way with CCS5.1 and got some trouble configuring new tools.
I have a legacy v3.3 project. I have imported it to CCS 5.1.1 using import legacy project wizard.
In my previous project I have custom linker file. At the beginning of memory image we define 3 custom sections for primary bootloader, secondary boot and program image descriptor. To do that we used command file with following commands:
custom.cmd:
SECTIONS { .init_booting: {} > primary_boot .booting: {} > main_boot .info: {} > prg_info }
Source file for bootloader contains
#pragma CODE_SECTION (primary_loader, ".init_booting"); #pragma CODE_SECTION (boot_main, ".booting");
and info section contents is defined elsewhere. We used to mentioned above custom.cmd as linker input and it worked fine. Now with ccs 5.1 it does not work. I have specified that linked command file in Project\Properties\General\Linker command file. But assembled image is wrong. Here is excerpt from the map file:
MEMORY CONFIGURATION name origin length used unused attr fill
---------------------- -------- --------- -------- -------- ---- --------
primary_boot 00000000 00000100 00000000 00000100 RWIX
main_boot 00000100 00000200 00000000 00000200 RWIX
prg_info 00000300 00000010 00000010 00000000 RWIX
IRAM 00000320 0007fce0 00076454 0000988c RWIX
IHRAM 00080000 00080000 00080000 00000000 RWIX
So as one can see, primary_boot and main_boot sections are just empty. Moreover, there is unintended .vers section created and 0x0 and space from 0x0 to 0x320 is occupied by wrong code.
SECTION ALLOCATION MAP output attributes/ section page origin length input sections
-------- ---- ---------- ---------- ----------------
.vers 0 00000000 00000038 COPY SECTION
00000000 00000038 myprj_cfg.obj (.vers)
$BRID 0 00000000 000005a8 COPY SECTION
00000000 00000014 csl6416.lib : csl.obj ($BRID)
00000014 000000e4 : csl_edma.obj ($BRID)
000000f8 00000064 : csl_gpio.obj ($BRID)
0000015c 000002c0 : csl_tcp.obj ($BRID)
0000041c 00000064 : csl_timer.obj ($BRID)
00000480 000000b0 : csl_vcp.obj ($BRID)
00000530 00000078 : csl_irq.obj ($BRID)
.info 0 00000300 00000010 00000300 00000010 info.obj (.info)
I am sure booting.c was compiled and I see booting.obj in the output directory. It just was not linked properly. Please advise, how to resolve.