DSPRelated.com
Forums

about link.cmd

Started by zhugas August 30, 2010
my link.cmd is ok in ccs2.2 but in ccs3.3 there is an error
-c
-heap 0x01
-stack 0x1000
-l rts6700.lib
MEMORY {
IRAM : origin = 0x400, len = 0x2fc00
CACHE_L2 : origin = 0x30000, len = 0x10000
BOOT_RAM : origin = 0x0, len = 0x400
SDRAM : origin = 0x80000000, len = 0x1000000
}

SECTIONS
{
.boot_load > BOOT_RAM
.vectors > IRAM
.CODE_IN_CHIPRAM > IRAM
{
OS_CPU_A.obj
OS_CPU_C.obj
ucos_ii.obj
} > IRAM
.DATA_IN_CHIPRAM > IRAM

.stack: fill=0xc0ffee {} > IRAM

.bss > SDRAM
.far > SDRAM
.text > SDRAM
.cinit > SDRAM
.const > SDRAM
.cio > SDRAM
.stitch > SDRAM
.pinit > SDRAM
.switch > SDRAM
.sysmem > SDRAM
}
[Linking...] "G:\ti\CCStudio_v3.3\CodeGenerationTools6.0.18\bin\cl6x" -@"Debug.lkf"

>> LINK_CCS3.cmd: error: system error, can't open file 'OS_CPU_A.obj' for
input: No such file or directory

>> Compilation failure

Build Complete,
2 Errors, 0 Warnings, 0 Remarks.

2.I add an path before the obj files
./debug/OS_CPU_A.obj
then
[Linking...] "G:\ti\CCStudio_v3.3\CodeGenerationTools6.0.18\bin\cl6x" -@"Debug.lkf"

>> error: symbol _OSIntCtxSw is defined multiple times: ./Debug/OS_CPU_A.obj
and H:\\work\\BD2PVT\\uCOS-II\\C6713Port\\Debug\\OS_CPU_A.obj
>> error: symbol _Disable_int is defined multiple times: ./Debug/OS_CPU_A.obj
and H:\\work\\BD2PVT\\uCOS-II\\C6713Port\\Debug\\OS_CPU_A.obj

3.in ccs2.2 there is an warning

>> warning: creating output section DATA_IN_CHIPRAM without SECTIONS

what should i do

_____________________________________
zhugas,

I see several problems.
The first one is: the CCS project has pointers to the .obj files from the earlier
version of CCS. Those files need to be removed from the project and the correct files
in the ./debug/*.obj added to the project.
Second one is: The lib file should be listed in the project file, not in the link.cmd
file.
Then remove the path prefixes from the link.cmd file.
Then, in the project file, add the path to the libraries and add the libraries to the
project.

There are a couple of others, but I would suggest fixing the above obvious problems
first.

R. Williams
---------- Original Message -----------
From: "zhugas"
To: c...
Sent: Tue, 31 Aug 2010 02:13:28 -0000
Subject: [c6x] about link.cmd

> my link.cmd is ok in ccs2.2 but in ccs3.3 there is an error
> -c
> -heap 0x01
> -stack 0x1000
> -l rts6700.lib
> MEMORY {
> IRAM : origin = 0x400, len = 0x2fc00
> CACHE_L2 : origin = 0x30000, len = 0x10000
> BOOT_RAM : origin = 0x0, len = 0x400
> SDRAM : origin = 0x80000000, len = 0x1000000
> }
>
> SECTIONS
> {
> .boot_load > BOOT_RAM
> .vectors > IRAM
> .CODE_IN_CHIPRAM > IRAM
> {
> OS_CPU_A.obj
> OS_CPU_C.obj
> ucos_ii.obj
> } > IRAM
> .DATA_IN_CHIPRAM > IRAM
>
> .stack: fill=0xc0ffee {} > IRAM
>
> .bss > SDRAM
> .far > SDRAM
> .text > SDRAM
> .cinit > SDRAM
> .const > SDRAM
> .cio > SDRAM
> .stitch > SDRAM
> .pinit > SDRAM
> .switch > SDRAM
> .sysmem > SDRAM
> }
> [Linking...] "G:\ti\CCStudio_v3.3\CodeGenerationTools6.0.18\bin\cl6x" -
> @"Debug.lkf"
> >> LINK_CCS3.cmd: error: system error, can't open file 'OS_CPU_A.obj' for
> input: No such file or directory
>
> >> Compilation failure
>
> Build Complete,
> 2 Errors, 0 Warnings, 0 Remarks.
>
> 2.I add an path before the obj files
> ./debug/OS_CPU_A.obj
> then
> [Linking...] "G:\ti\CCStudio_v3.3\CodeGenerationTools6.0.18\bin\cl6x" -
> @"Debug.lkf"
> >> error: symbol _OSIntCtxSw is defined multiple times: ./Debug/OS_CPU_A.obj
> and H:\\work\\BD2PVT\\uCOS-II\\C6713Port\\Debug\\OS_CPU_A.obj
> >> error: symbol _Disable_int is defined multiple times: ./Debug/OS_CPU_A.obj
> and H:\\work\\BD2PVT\\uCOS-II\\C6713Port\\Debug\\OS_CPU_A.obj
>
> 3.in ccs2.2 there is an warning
>
> >> warning: creating output section DATA_IN_CHIPRAM without SECTIONS
>
> what should i do
------- End of Original Message -------

_____________________________________
zhugas,

Always reply to the group, not individually to me.

Go to the 'project' menu
go to the 'build options' menu
remove the path to the old .obj files
look through your source code and remove any references to the old .obj files

it is perfectly ok to use the Debug.lkf file.
That file should be updated each time you modify either the list of files in the
project or the link parameters.
Be sure to save the project after assuring that only the correct files are listed in
the project, do the 'save' after any changes to the project.

The following statement may be a bit mis-leading.
"in the ./debug/*.obj added to the project"

Actually, NO .obj file should be added to the project.
rather the source files for the project plus the library files for the project should
be added to the project (any .obj files should be deleted from the project)
Then perform the 'dependancies' scan of the project so that all .h files are included
in the project.

The project should have a path to the source files that you want to use.
All references, anywhere in the project, that point toward the old .obj files has to be
removed.

R. Williams
---------- Original Message -----------
From: "zhugas"
To: "Richard Williams"
Sent: Wed, 01 Sep 2010 04:33:18 -0000
Subject: Re: about link.cmd

> R. Williams
> Thanks!
> I fixed the second one.But the first one you mentioned, I don't
> know how to remove .obj files.It seems like ccs use "Debug.lkf", when
> i delete this file,ccs creat it automatically. what should i do?
> Thanks again. zhugas
> --- In c..., "Richard Williams" wrote:
> >
> > zhugas,
> >
> > I see several problems.
> > The first one is: the CCS project has pointers to the .obj files from the earlier
> > version of CCS. Those files need to be removed from the project and the correct
files
> > in the ./debug/*.obj added to the project.
> > Second one is: The lib file should be listed in the project file, not in the
link.cmd
> > file.
> > Then remove the path prefixes from the link.cmd file.
> > Then, in the project file, add the path to the libraries and add the libraries to
the
> > project.
> >
> > There are a couple of others, but I would suggest fixing the above obvious problems
> > first.
> >
> > R. Williams
> >
------- End of Original Message -------

_____________________________________
R. Williams
thanks.
I fixed the second one.But the first one you mentioned, I don't know how to remove the .obj files.It seems like ccs use "Debug.lkf", when i delete the file "Debug.lkf", ccs creat this file automaticly.
zhugas
Zhugas,

The as I stated in a prior email, it is not actually the .obj files that need to be
removed. It is the *path* to the old versions of the files, that were created by the
old version of the CCS tool.
Somewhere in the project, those old .obj files are being referenced. Those references
need to be removed.

You should never have to remove the Debug.lkf file. That file is updated by CCS when
ever a source file is compiled (and also at other times).

R. Williams
---------- Original Message -----------
From: gang zhu
To: c...
Sent: Tue, 31 Aug 2010 02:05:34 -0700 (PDT)
Subject: Re: [c6x] about link.cmd

> R. Williams
> thanks.
> I fixed the second one.But the first one you mentioned, I don't
> know how to remove the .obj files.It seems like ccs use "Debug.lkf",
> when i delete the file "Debug.lkf", ccs creat this file automaticly.
> zhugas
------- End of Original Message -------

_____________________________________