DSPRelated.com
Forums

Linking error in Sine8_led

Started by lanc...@yahoo.com December 8, 2009
Dear all

I recently acquired a TMS320C6713 and the code composer V 3.1 along with it, for the purpose of my final year thesis for my undergraduate course. I also bought Digital Signal and Processing with C6713 by Rulph Chassaing.

I was trying the first example Sine8_led. I followed all his instructions and while compiling I got the following message:

--------------------------- Sine8_led.pjt - Debug ---------------------------
[c6713dskinit.c] "C:\CCStudio_v3.1\C6000\cgtools\bin\cl6x" -g -s -fr"C:/CCStudio_v3.1/MyProjects/Practice/Sine8_led/Debug" -d"CHIP_6713" -mv6710 -@"../../../MyProjects/Practice/Sine8_led/Debug.lkf" "c6713dskinit.c"

[vectors_poll.asm] "C:\CCStudio_v3.1\C6000\cgtools\bin\cl6x" -g -s -fr"C:/CCStudio_v3.1/MyProjects/Practice/Sine8_led/Debug" -d"CHIP_6713" -mv6710 -@"../../../MyProjects/Practice/Sine8_led/Debug.lkf" "vectors_poll.asm"

[Sine8_LED.c] "C:\CCStudio_v3.1\C6000\cgtools\bin\cl6x" -g -s -fr"C:/CCStudio_v3.1/MyProjects/Practice/Sine8_led/Debug" -d"CHIP_6713" -mv6710 -@"../Sine8_led/Debug.lkf" "Sine8_LED.c"

[Linking...] "C:\CCStudio_v3.1\C6000\cgtools\bin\cl6x" -@"Debug.lkf"

>> warning: creating output section .vecs without SECTIONS specification
>> warning: can't find a memory area named 'IVECS' on page 0 for allocation of
'.vectors'
>> error: can't find any memory areas for allocation of '.vectors'
>> error: can't allocate '.vectors' into 'IVECS' (page 0)
>> error: errors in input - ./Debug/Sine8_led.out not built

>> Compilation failure

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

I would be very grateful if anyone could help me to understand what the error means and what is causing it.

Thanks a lot in advance.
P.S: I initially had an error in opening the dsk6713_aic23.h file, which was resolved when I copied all the support files to the sine8_led folder, following which I had the above mentioned error.

_____________________________________
Lance,

The error messages mean there is no 'appropriate' linker command file.
A good name for the file would be Sine8_Led.cmd.

This linker command file must be included in the project.
The best location for the linker command file would be in the root director of the Sine8_Led project.

In the 'examples' sub directory of the CCS 3.1 are several examples of linker command files.
Non of those examples are likely to be exactly right for your project.
SO you will have to edit them a bit.

The 'help' menu item contains details of the format of the linker command files, including syntax, memory entries, section entries, optional items, etc.

In general, take one of the example files, copy it to your project directory, then edit it as needed for your project.

Most of the entries in an example linker command file will be unchanged as they describe all the 'standard' stuff. Just those few entries you will need for your specific project will replace those few entries needed for the specific example project.

If you need more detail about the contents of a linker command file,

You may want to read spru301c.pdf which is the C6000 code composer studio tutorial. Which discusses how to organize a project, etc.

You may want to read spru186q.pdf which is the C6000 assembly language tools users guide. Section 7.5 discusses the details of the linker command file syntax.

You should NOT have copied the system header files to your project directory.
Rather, in the project/build options/...
there is an entry where you put in the path to the include files, another to the system library files, etc.
You mayl also want to add the appropriate 'rts' library to your project library files.
You can read about the 'rts' library files in the CCS 'help'

BTW:
All the info you ever wanted to know about CCS and related items can be found by going to and searching for it (including the .pdf files I mentioned above).
It takes a bit of practice to find things quickly due mostly to the huge amount of information available.


R. Williams
---------- Original Message -----------
From: l...@yahoo.com
To: c...
Sent: Tue, 08 Dec 2009 03:24:15 -0500
Subject: [c6x] Linking error in Sine8_led

>
>
> Dear all
>
> I recently acquired a TMS320C6713 and the code composer V 3.1 along with it, for the purpose of my final year thesis for my undergraduate course. I also bought Digital Signal and Processing with C6713 by Rulph Chassaing.
>
> I was trying the first example Sine8_led. I followed all his instructions and while compiling I got the following message:
>
> --------------------------- Sine8_led.pjt - Debug ---------------------------
> [c6713dskinit.c] "C:\CCStudio_v3.1\C6000\cgtools\bin\cl6x" -g -s -fr"C:/CCStudio_v3.1/MyProjects/Practice/Sine8_led/Debug" -d"CHIP_6713" -mv6710 -@"../../../MyProjects/Practice/Sine8_led/Debug.lkf" "c6713dskinit.c"
>
> [vectors_poll.asm] "C:\CCStudio_v3.1\C6000\cgtools\bin\cl6x" -g -s -fr"C:/CCStudio_v3.1/MyProjects/Practice/Sine8_led/Debug" -d"CHIP_6713" -mv6710 -@"../../../MyProjects/Practice/Sine8_led/Debug.lkf" "vectors_poll.asm"
>
> [Sine8_LED.c] "C:\CCStudio_v3.1\C6000\cgtools\bin\cl6x" -g -s -fr"C:/CCStudio_v3.1/MyProjects/Practice/Sine8_led/Debug" -d"CHIP_6713" -mv6710 -@"../Sine8_led/Debug.lkf" "Sine8_LED.c"
>
> [Linking...] "C:\CCStudio_v3.1\C6000\cgtools\bin\cl6x" -@"Debug.lkf"
>
> >> warning: creating output section .vecs without SECTIONS specification
> >> warning: can't find a memory area named 'IVECS' on page 0 for allocation of
> '.vectors'
> >> error: can't find any memory areas for allocation of '.vectors'
> >> error: can't allocate '.vectors' into 'IVECS' (page 0)
> >> error: errors in input - ./Debug/Sine8_led.out not built
>
> >> Compilation failure
>
> Build Complete,
> 4 Errors, 2 Warnings, 0 Remarks.
>
> I would be very grateful if anyone could help me to understand what the error means and what is causing it.
>
> Thanks a lot in advance.
>
> P.S: I initially had an error in opening the dsk6713_aic23.h file, which was resolved when I copied all the support files to the sine8_led folder, following which I had the above mentioned error.
------- End of Original Message -------
Dear Richard,

Thanks a lot for your response. You were perfectly right, the problem was with the linker file. The file which was instructed to be included was c6713dsk.cmd. Later on, when I went through the contents of the cmd file, I noticed that the line "IVECS: org=0h, len=0x220" was missing somehow. When I added the line, the error was solved. Thanks for your response and the additional information you gave, they are really helpful.

The project was complied but however it gave me two warnings:

>> warning: creating output section .vecs without SECTIONS specification
>> warning: Detected a near (.bss section relative) data reference to the symbol
_DSK6713_AIC23_codecdatahandle defined in section .far. The
reference occurs in
C:\CCStudio_v3.1\MyProjects\Practice\Sine8_led\Debug\c6713dskinit.obj, section .text, SPC offset 00000058. Either make the symbol near data by placing it in the .bss section, or make the references to the symbol far. For C/C++ code use 'far' or 'near' modifiers on the type definition of the symbol or compile with the --mem_model:data switch.
Build Complete,
0 Errors, 2 Warnings, 0 Remarks.

When I loaded the program on to the DSK and ran it, it was not giving me the required output(a tone on both the line out and headphones outputs). I tried single stepping to find out the problem and I found out that it was getting stuck on a particular command(***):

CHANNEL_data=AIC_data.channel[RIGHT]; //swap left and right channels
AIC_data.channel[RIGHT]=AIC_data.channel[LEFT];
AIC_data.channel[LEFT]=CHANNEL_data;
***if (poll) while(!MCBSP_xrdy(DSK6713_AIC23_DATAHANDLE));//if ready to transmit
MCBSP_write(DSK6713_AIC23_DATAHANDLE,AIC_data.uint);//write/output data

I understand that it might be waiting for the mcbsp signal, and apparently since it is not receiving, the card hangs there. How is this signal generated?.

* I am new to this forum as so, I am not sure if i can post this here as this no longer pertains to the link error. I am sorry, if this has to be posted under a new topic.

Thanks

Regards
Lance

Dear all
>
>I recently acquired a TMS320C6713 and the code composer V 3.1 along with it, for the purpose of my final year thesis for my undergraduate course. I also bought Digital Signal and Processing with C6713 by Rulph Chassaing.
>
>I was trying the first example Sine8_led. I followed all his instructions and while compiling I got the following message:
>
>--------------------------- Sine8_led.pjt - Debug ---------------------------
>[c6713dskinit.c] "C:\CCStudio_v3.1\C6000\cgtools\bin\cl6x" -g -s -fr"C:/CCStudio_v3.1/MyProjects/Practice/Sine8_led/Debug" -d"CHIP_6713" -mv6710 -@"../../../MyProjects/Practice/Sine8_led/Debug.lkf" "c6713dskinit.c"
>
>[vectors_poll.asm] "C:\CCStudio_v3.1\C6000\cgtools\bin\cl6x" -g -s -fr"C:/CCStudio_v3.1/MyProjects/Practice/Sine8_led/Debug" -d"CHIP_6713" -mv6710 -@"../../../MyProjects/Practice/Sine8_led/Debug.lkf" "vectors_poll.asm"
>
>[Sine8_LED.c] "C:\CCStudio_v3.1\C6000\cgtools\bin\cl6x" -g -s -fr"C:/CCStudio_v3.1/MyProjects/Practice/Sine8_led/Debug" -d"CHIP_6713" -mv6710 -@"../Sine8_led/Debug.lkf" "Sine8_LED.c"
>
>[Linking...] "C:\CCStudio_v3.1\C6000\cgtools\bin\cl6x" -@"Debug.lkf"
>
>> > warning: creating output section .vecs without SECTIONS specification
>> > warning: can't find a memory area named 'IVECS' on page 0 for allocation of
> '.vectors'
>> > error: can't find any memory areas for allocation of '.vectors'
>> > error: can't allocate '.vectors' into 'IVECS' (page 0)
>> > error: errors in input - ./Debug/Sine8_led.out not built
>
>> > Compilation failure
>
>Build Complete,
> 4 Errors, 2 Warnings, 0 Remarks.
>
>I would be very grateful if anyone could help me to understand what the error means and what is causing it.
>
>Thanks a lot in advance.
>P.S: I initially had an error in opening the dsk6713_aic23.h file, which was resolved when I copied all the support files to the sine8_led folder, following which I had the above mentioned error.
>
>_____________________________________

_____________________________________
Lance,

regarding the line:
***if (poll) while(!MCBSP_xrdy(DSK6713_AIC23_DATAHANDLE));//if ready to transmit

I assume your program has a boolean variable names 'poll' and it is set to 'true' .
The program is waiting for the selected McBSP peripheral to be idle.

You might try setting 'poll' to false, as a test to see if the output now occurs.

Is the selected McBSP peripheral setup somewhere in the program so it can perform transmit operations?

Is the GPIO pin for the external output peripheral 'ready' signal set to the 'ready to receive' state?

R. Williams

---------- Original Message -----------
From: l...@yahoo.com
To: c...
Sent: Wed, 09 Dec 2009 06:58:44 -0500
Subject: [c6x] Re: Linking error in Sine8_led

>
>
> Dear Richard,
>
> Thanks a lot for your response. You were perfectly right, the problem was with the linker file. The file which was instructed to be included was c6713dsk.cmd. Later on, when I went through the contents of the cmd file, I noticed that the line "IVECS: org=0h, len=0x220" was missing somehow. When I added the line, the error was solved. Thanks for your response and the additional information you gave, they are really helpful.
>
> The project was complied but however it gave me two warnings:
>
> >> warning: creating output section .vecs without SECTIONS specification
> >> warning: Detected a near (.bss section relative) data reference to the symbol
> _DSK6713_AIC23_codecdatahandle defined in section .far. The
> reference occurs in
> C:\CCStudio_v3.1\MyProjects\Practice\Sine8_led\Debug\c6713dskinit.obj, section .text, SPC offset 00000058. Either make the symbol near data by placing it in the .bss section, or make the references to the symbol far. For C/C++ code use 'far' or 'near' modifiers on the type definition of the symbol or compile with the --mem_model:data switch.
>
> Build Complete,
> 0 Errors, 2 Warnings, 0 Remarks.
>
> When I loaded the program on to the DSK and ran it, it was not giving me the required output(a tone on both the line out and headphones outputs). I tried single stepping to find out the problem and I found out that it was getting stuck on a particular command(***):
>
> CHANNEL_data=AIC_data.channel[RIGHT]; //swap left and right channels
> AIC_data.channel[RIGHT]=AIC_data.channel[LEFT];
> AIC_data.channel[LEFT]=CHANNEL_data;
> ***if (poll) while(!MCBSP_xrdy(DSK6713_AIC23_DATAHANDLE));//if ready to transmit
> MCBSP_write(DSK6713_AIC23_DATAHANDLE,AIC_data.uint);//write/output data
>
> I understand that it might be waiting for the mcbsp signal, and apparently since it is not receiving, the card hangs there. How is this signal generated?.
>
> * I am new to this forum as so, I am not sure if i can post this here as this no longer pertains to the link error. I am sorry, if this has to be posted under a new topic.
>
> Thanks
>
> Regards
> Lance
>
> Dear all
> >
> >I recently acquired a TMS320C6713 and the code composer V 3.1 along with it, for the purpose of my final year thesis for my undergraduate course. I also bought Digital Signal and Processing with C6713 by Rulph Chassaing.
> >
> >I was trying the first example Sine8_led. I followed all his instructions and while compiling I got the following message:
> >
> >--------------------------- Sine8_led.pjt - Debug ---------------------------
> >[c6713dskinit.c] "C:\CCStudio_v3.1\C6000\cgtools\bin\cl6x" -g -s -fr"C:/CCStudio_v3.1/MyProjects/Practice/Sine8_led/Debug" -d"CHIP_6713" -mv6710 -@"../../../MyProjects/Practice/Sine8_led/Debug.lkf" "c6713dskinit.c"
> >
> >[vectors_poll.asm] "C:\CCStudio_v3.1\C6000\cgtools\bin\cl6x" -g -s -fr"C:/CCStudio_v3.1/MyProjects/Practice/Sine8_led/Debug" -d"CHIP_6713" -mv6710 -@"../../../MyProjects/Practice/Sine8_led/Debug.lkf" "vectors_poll.asm"
> >
> >[Sine8_LED.c] "C:\CCStudio_v3.1\C6000\cgtools\bin\cl6x" -g -s -fr"C:/CCStudio_v3.1/MyProjects/Practice/Sine8_led/Debug" -d"CHIP_6713" -mv6710 -@"../Sine8_led/Debug.lkf" "Sine8_LED.c"
> >
> >[Linking...] "C:\CCStudio_v3.1\C6000\cgtools\bin\cl6x" -@"Debug.lkf"
> >
> >> > warning: creating output section .vecs without SECTIONS specification
> >> > warning: can't find a memory area named 'IVECS' on page 0 for allocation of
> > '.vectors'
> >> > error: can't find any memory areas for allocation of '.vectors'
> >> > error: can't allocate '.vectors' into 'IVECS' (page 0)
> >> > error: errors in input - ./Debug/Sine8_led.out not built
> >
> >> > Compilation failure
> >
> >Build Complete,
> > 4 Errors, 2 Warnings, 0 Remarks.
> >
> >I would be very grateful if anyone could help me to understand what the error means and what is causing it.
> >
> >Thanks a lot in advance.
> >P.S: I initially had an error in opening the dsk6713_aic23.h file, which was resolved when I copied all the support files to the sine8_led folder, following which I had the above mentioned error.
> >
> >_____________________________________
> >
> >
------- End of Original Message -------

_____________________________________