I am trying to convert a visual linker file(.rcp) to .cmd(text linker) by configuring the .cdb as well as writing custom linker file(.cmd) to include some custom sections details. I am writing the linker file entries by comparing the map files generated using the two types of linkers. Is my approach correct? Are there any other methods to serve the purpose?
I am using CCS v 2.20 and the map file generated by building the project, linking with visual linker has some ($BRID) written besides some object files. These object files start at the same location and are of type "hole". Does anyone know what $BRID means?
When i port the $BRID sections as below
.sec1: {} > SDRAM{ sample.obj ($BRID)}
I am getting an error: "adding D:\Myprojects\sample.obj ($BRID) to multiple output sections". But from the map file, I can see that no other output section has added sample.obj ($BRID).
"$BRID" is a debug information section; it should not be allocated to target memory. It describes properties of branches, such as whether they are calls. It is no longer used in more recent versions of the compiler; a DWARF-based encoding is used instead.
I have to initially try building the project using text linker with the same version of compiler tools which were used for building the same project using Visual Linker. In this context, while making a text linker command file by looking in to the map file generated from the Visual Linker, you mean to say that i can ignore the $BRID sections from being included in the linker command file?
Yes, I'm saying that you should not even mention $BRID in your linker command file.
Are you saying that the Visual Linker produced a map file that claimed that $BRID was allocated to target memory? That would indicate a bug of some sort.
Yes, I will try linking the project using a text linker in which i will not include the section .template which contained $BRID object files.
Here is the section .template as is seen in the map file generated by Visual Linker for the project. i think the .template is a custom section created by user in Visual Linker.
output attributes/ section page origin length input sections -------- ---- ---------- ---------- ----------------
output attributes/
section page origin length input sections
-------- ---- ---------- ---------- ----------------
.template * 0 81eb2530 00000000 COPY SECTION 81eb2530 00000018 util.obj ($BRID) 81eb2530 00000098 uscmon.obj ($BRID) 81eb2530 00000014 rts6400.lib : vsprintf.obj ($BRID) 81eb2530 0000000c : trgmsg.obj ($BRID) ......... .......... ..... .................. 81eb2530 00000064 csl6415.lib : csl_timer.obj ($BRID) 81eb2530 00000088 : csl_pci.obj ($BRID) ...... ................... .............. ...... 81eb2530 00000004 bios.a64 : utl_putc.o64 ($BRID) 81eb2530 00000004 : utl_halt.o64 ($BRID) .......... ...... ........ .............. 81eb2530 00000018 acmon.obj ($BRID) ............ ........... ............. ..........
.template
* 0 81eb2530 00000000 COPY SECTION
81eb2530 00000018 util.obj ($BRID)
81eb2530 00000098 uscmon.obj ($BRID)
81eb2530 00000014 rts6400.lib : vsprintf.obj ($BRID)
81eb2530 0000000c : trgmsg.obj ($BRID)
......... .......... ..... ..................
81eb2530 00000064 csl6415.lib : csl_timer.obj ($BRID)
81eb2530 00000088 : csl_pci.obj ($BRID)
...... ................... .............. ...... 81eb2530 00000004 bios.a64 : utl_putc.o64 ($BRID)
81eb2530 00000004 : utl_halt.o64 ($BRID)
.......... ...... ........ ..............
81eb2530 00000018 acmon.obj ($BRID)
............ ........... ............. ..........
You can see that all the input sections start at 0x81eb2530 and have different lengths. So i think they are not allocated to target memory and need not be included in the linker command file. Am i right?
Yes.. I got things working even without including section containing $BRID object files in Text Linker file..
Thanks for the support...