Reply by Richard Williams March 6, 20122012-03-06
staticd,

I do not have a dsk6713, so I can only comment on those details I see in the code.

vectors_intr.asm
I wonder why you have defined all the labels as global, since they are never
referenced by anything.

I see a .global for _c_int11, however, that function/entry point is NOT defined
within this file, however, because you have defined it as being within this
file, the linker does not pick it up from the RTS6700.lib library.
_c_int11 is a interrupt function in gator_kator.c, so should be .ref _c_int11.

in file gator_kator.c
the sample rate is defined as 8k samples per second.
That is not near fast enough to recognise a 50khz signal.
You need a sample rate that is more than twice the target frequency, so the
sample rate has to be greater than 100khz.

The code probably will not be able to keep up with the sample rate due to lack
of input and output buffering and the filter processing being performed during
the interrupt.
BTW: the code really needs double buffering to have any chance of keeping up
with the samples.
There is, in the 'samples' sub directory of the CCS install, a program named
"dsp_app" (or something simular) that has a complete application, properly
written for something very similar to what the code is trying to do.

The 'main()' function exits after making 3 function calls.
When the main() function exits, the program exits.
there should be a
"while(1) {;}"
loop before the closing brace of the main() function so the program does not
immediately exit.

These lines:
#include "dsk6713_aic23.h" // codec support
#include "C6713dskinit.h" // function support

are referencing part of the CCS system supplied headers.
I suspect they should be written as:
#include // codec support
#include // function support

The fir_filter.h file seems to be missing from the project.

the error messages:
"../gator_kator.c", line 23: warning #225-D: function declared implicitly
"../gator_kator.c", line 24: warning #225-D: function declared implicitly
indicate either the functions do not exist or the appropriate header file is not
included.

The warning message:
>> WARNING: invalid version 0, defaulting to 6200
indicates that your project does not have the correct processor selected or you
need to download/install the *.dll for the 6713 processor.
Again,

Look at the file in the samples directory of the CCS installation for how the
code should be written.

On my computer, running linux, the path to the file(s) of interest is
/home/richard/c6x/demo_app/DSK6416/CCStudio/examples/dsk6416/bsl/disk_app
Your path will be somewhat different depending on your OS and how you installed
the CCS application.

There is plenty of other details wrong with the application, but this should be
enough to get you moving in the right direction.

---------- Original Message -----------
From: s...@gmail.com
To: c...
Sent: Mon, 05 Mar 2012 08:51:02 -0500
Subject: [c6x] Problems With CMD file, et al.

> Greetings, and thank you for reading my question.
>
> I have back tracked with my project and built a solid model in Matlab
> to test my algorithm. I have that working pretty well now and I am
> ready to implement it on my dsk6713. When I looked at my old code, it
> was a convoluted mess and I'd like a clean slate. So...I cleaned
> house. Of course, I ran into a few snags but now I am stumped.
>
> Here is the course of events:
>
> 1) I changed my source files, available at
https://github.com/staticd/TheGatorKator/tree/beta
>
> 2) When I compile the code, I get these warnings:
>
> ***************************************************************************
> **** Build of configuration Debug for project TheGatorKator ****
>
> C:\ti\ccsv5\utils\bin\gmake -k all
> subdir_rules.mk:21: warning: overriding commands for target `c6713dskinit.obj'
> subdir_rules.mk:14: warning: ignoring old commands for target `c6713dskinit.obj'
> 'Building file: ../Vectors_intr.asm'
> 'Invoking: C6000 Compiler'
> "C:/ti/ccsv5/tools/compiler/c6000/bin/cl6x" -mv-mv6710+ -g --
> define=CHIP_6713 --
> include_path="C:/ti/ccsv5/tools/compiler/c6000/include" -
> -include_path="C:/Users/staticd/Documents/COLLEGE/EEL 4935
> DSP_FPGA/misc_contents/lib_and_h" --verbose --display_error_number --
> diag_warning"5 --mem_model:data --abi=coffabi -
> -preproc_with_compile --preproc_dependency="Vectors_intr.pp"
"../Vectors_intr.asm"
> TMS320C6x C/C++ Compiler v7.3.1
> Tools Copyright (c) 1996-2011 Texas Instruments Incorporated
> >> WARNING: invalid version 0, defaulting to 6200
> 'Finished building: ../Vectors_intr.asm'
> ' '
> 'Building file: ../c6713dskinit.c'
> 'Invoking: C6000 Compiler'
> "C:/ti/ccsv5/tools/compiler/c6000/bin/cl6x" -mv-mv6710+ -g --
> define=CHIP_6713 --
> include_path="C:/ti/ccsv5/tools/compiler/c6000/include" -
> -include_path="C:/Users/staticd/Documents/COLLEGE/EEL 4935
> DSP_FPGA/misc_contents/lib_and_h" --verbose --display_error_number --
> diag_warning"5 --mem_model:data --abi=coffabi -
> -preproc_with_compile --preproc_dependency="c6713dskinit.pp" "../c6713dskinit.c"
> TMS320C6x C/C++ Compiler v7.3.1
> Tools Copyright (c) 1996-2011 Texas Instruments Incorporated
> >> WARNING: invalid version 0, defaulting to 6200
> "../c6713dskinit.c" ==> c6713_dsk_init
> "../c6713dskinit.c" ==> comm_poll
> "../c6713dskinit.c" ==> comm_intr
> "../c6713dskinit.c" ==> output_sample
> "../c6713dskinit.c" ==> output_left_sample
> "../c6713dskinit.c" ==> output_right_sample
> "../c6713dskinit.c" ==> input_sample
> "../c6713dskinit.c" ==> input_left_sample
> "../c6713dskinit.c" ==> input_right_sample
> 'Finished building: ../c6713dskinit.c'
> ' '
> 'Building file: ../fir_filter.c'
> 'Invoking: C6000 Compiler'
> "C:/ti/ccsv5/tools/compiler/c6000/bin/cl6x" -mv-mv6710+ -g --
> define=CHIP_6713 --
> include_path="C:/ti/ccsv5/tools/compiler/c6000/include" -
> -include_path="C:/Users/staticd/Documents/COLLEGE/EEL 4935
> DSP_FPGA/misc_contents/lib_and_h" --verbose --display_error_number --
> diag_warning"5 --mem_model:data --abi=coffabi -
> -preproc_with_compile --preproc_dependency="fir_filter.pp" "../fir_filter.c"
> TMS320C6x C/C++ Compiler v7.3.1
> Tools Copyright (c) 1996-2011 Texas Instruments Incorporated
> >> WARNING: invalid version 0, defaulting to 6200
> "../fir_filter.c" ==> filter_signal
> 'Finished building: ../fir_filter.c'
> ' '
> 'Building file: ../gator_kator.c'
> 'Invoking: C6000 Compiler'
> "C:/ti/ccsv5/tools/compiler/c6000/bin/cl6x" -mv-mv6710+ -g --
> define=CHIP_6713 --
> include_path="C:/ti/ccsv5/tools/compiler/c6000/include" -
> -include_path="C:/Users/staticd/Documents/COLLEGE/EEL 4935
> DSP_FPGA/misc_contents/lib_and_h" --verbose --display_error_number --
> diag_warning"5 --mem_model:data --abi=coffabi -
> -preproc_with_compile --preproc_dependency="gator_kator.pp" "../gator_kator.c"
> TMS320C6x C/C++ Compiler v7.3.1
> Tools Copyright (c) 1996-2011 Texas Instruments Incorporated
> >> WARNING: invalid version 0, defaulting to 6200
> "../gator_kator.c", line 23: warning #225-D: function declared implicitly
> "../gator_kator.c", line 24: warning #225-D: function declared implicitly
> "../gator_kator.c" ==> c_int11
> "../gator_kator.c" ==> main
> 'Finished building: ../gator_kator.c'
> ' '
> 'Building target: TheGatorKator.out'
> 'Invoking: C6000 Linker'
> "C:/ti/ccsv5/tools/compiler/c6000/bin/cl6x" -mv-mv6710+ -g --
> define=CHIP_6713 --verbose --display_error_number --diag_warning"5 --
> mem_model:data --abi=coffabi -z -m"TheGatorKator.map" -
> -warn_sections -i"C:/ti/ccsv5/tools/compiler/c6000/lib" -
> i"C:/Users/staticd/Documents/COLLEGE/EEL 4935
> DSP_FPGA/project/TheGatorKator" -
> i"C:/ti/ccsv5/tools/compiler/c6000/include" --reread_libs --rom_model -
> o "TheGatorKator.out" "./gator_kator.obj" "./fir_filter.obj"
> "./c6713dskinit.obj" "./Vectors_intr.obj" "../C6713dsk.cmd"
> "../csl6713.lib" "../dsk6713bsl.lib" "../rts6700.lib" TMS320C6x C/C++
> Compiler v7.3.1 Tools Copyright (c) 1996-2011 Texas
> Instruments Incorporated
> >> WARNING: invalid version 0, defaulting to 6200
> error #10056: symbol "_config" redefined: first defined in "./gator_kator.obj";
> redefined in "./c6713dskinit.obj"
> error #10056: symbol "_AIC_data" redefined: first defined in
> "./gator_kator.obj"; redefined in "./c6713dskinit.obj"
> error #10056: symbol "_hAIC23_handle" redefined: first defined in
> "./gator_kator.obj"; redefined in "./c6713dskinit.obj"
> error #10056: symbol "_AIC23CfgData" redefined: first defined in
> "./gator_kator.obj"; redefined in "./c6713dskinit.obj"
> warning #10247-D: creating output section ".vectors" without a SECTIONS
> specification
> error #10010: errors encountered during linking; "TheGatorKator.out"
> not built
>
> >> Compilation failure
> gmake: *** [TheGatorKator.out] Error 1
> gmake: Target `all' not remade because of errors.
>
> **** Build Finished ****
> ***************************************************************************
>
> 3) After some searching, I found these comments (on:
> http://e2e.ti.com/support/microcontrollers/msp43016-bit_ultra-
> low_power_mcus/f/166/t/19751.aspx) Placing ${inputs} before
> ${flags} puts the object files before the runtime library on the link
> command line, thus resolving the reference to the definition in the
> object file. Now rebuilding the project should no longer generate the
> symbol redefined errors. 3a) I know it's a different board than mine but figured I'd give it a
> whirl...so, I did!
>
> 4) Now, I have new problem. Here are the warnings minus all the other
> garbage with is still the same but here is the difference:
***************************************************************************
> "C:/ti/ccsv5/tools/compiler/c6000/bin/cl6x" "./gator_kator.obj"
> "./fir_filter.obj" "./c6713dskinit.obj" "./Vectors_intr.obj"
> "../C6713dsk.cmd" "../csl6713.lib" "../dsk6713bsl.lib"
> "../rts6700.lib" -mv-mv6710+ -g --define=CHIP_6713 --verbose -
> -display_error_number --diag_warning"5 --mem_model:data -
> -abi=coffabi -z -m"TheGatorKator.map" --warn_sections -
> i"C:/ti/ccsv5/tools/compiler/c6000/lib" -
> i"C:/Users/staticd/Documents/COLLEGE/EEL 4935
> DSP_FPGA/project/TheGatorKator" -
> i"C:/ti/ccsv5/tools/compiler/c6000/include" --reread_libs --rom_model -
> o "TheGatorKator.out" TMS320C6x C/C++ Compiler v7.3.1
> Tools Copyright (c) 1996-2011 Texas Instruments Incorporated [C6713dsk.cmd]
> >> WARNING: invalid version 0, defaulting to 6200
> "../C6713dsk.cmd", line 11: error #171: expected a declaration
> At end of source: warning #12-D: parsing restarts here after previous
> syntax error 1 error detected in the compilation of "../C6713dsk.cmd".
>
> >> Compilation failure
> gmake: *** [TheGatorKator.out] Error 1
> gmake: Target `all' not remade because of errors.
>
> **** Build Finished ****
> ***************************************************************************
> 4a) Now, I have a problem with my CMD file, which I did not change.
>
> 5) I am at a loss here and my Google skills are about exhausted and I
> apparently have no idea what I'm doing. If anyone could help me out
> here, I would be very grateful.
>
> BONUS?) I would also like to avoid the implicitly declared functions.
> I added the *.lib files to the project but I still have the warnings.
> Is there any way to get around this as well.
>
> Details:
> -OS: Win7
> -IDE: CCS v 5.1.0.09000
> -platform: TMS320C6713 DSK by Spectrum Digital
>
> Note) If you look at my code, you may notice that some of the .h files
> I reference aren't in there--they are stored offline.
>
> Very Respectfully,
> staticd
------- End of Original Message -------

_____________________________________
Reply by stat...@gmail.com March 5, 20122012-03-05
Greetings, and thank you for reading my question.

I have back tracked with my project and built a solid model in Matlab to test my algorithm. I have that working pretty well now and I am ready to implement it on my dsk6713. When I looked at my old code, it was a convoluted mess and I'd like a clean slate. So...I cleaned house. Of course, I ran into a few snags but now I am stumped.

Here is the course of events:

1) I changed my source files, available at https://github.com/staticd/TheGatorKator/tree/beta

2) When I compile the code, I get these warnings:

***************************************************************************
**** Build of configuration Debug for project TheGatorKator ****

C:\ti\ccsv5\utils\bin\gmake -k all
subdir_rules.mk:21: warning: overriding commands for target `c6713dskinit.obj'
subdir_rules.mk:14: warning: ignoring old commands for target `c6713dskinit.obj'
'Building file: ../Vectors_intr.asm'
'Invoking: C6000 Compiler'
"C:/ti/ccsv5/tools/compiler/c6000/bin/cl6x" -mv-mv6710+ -g --define=CHIP_6713 --include_path="C:/ti/ccsv5/tools/compiler/c6000/include" --include_path="C:/Users/staticd/Documents/COLLEGE/EEL 4935 DSP_FPGA/misc_contents/lib_and_h" --verbose --display_error_number --diag_warning"5 --mem_model:data --abi=coffabi --preproc_with_compile --preproc_dependency="Vectors_intr.pp" "../Vectors_intr.asm"
TMS320C6x C/C++ Compiler v7.3.1
Tools Copyright (c) 1996-2011 Texas Instruments Incorporated
>> WARNING: invalid version 0, defaulting to 6200
'Finished building: ../Vectors_intr.asm'
' '
'Building file: ../c6713dskinit.c'
'Invoking: C6000 Compiler'
"C:/ti/ccsv5/tools/compiler/c6000/bin/cl6x" -mv-mv6710+ -g --define=CHIP_6713 --include_path="C:/ti/ccsv5/tools/compiler/c6000/include" --include_path="C:/Users/staticd/Documents/COLLEGE/EEL 4935 DSP_FPGA/misc_contents/lib_and_h" --verbose --display_error_number --diag_warning"5 --mem_model:data --abi=coffabi --preproc_with_compile --preproc_dependency="c6713dskinit.pp" "../c6713dskinit.c"
TMS320C6x C/C++ Compiler v7.3.1
Tools Copyright (c) 1996-2011 Texas Instruments Incorporated
>> WARNING: invalid version 0, defaulting to 6200
"../c6713dskinit.c" ==> c6713_dsk_init
"../c6713dskinit.c" ==> comm_poll
"../c6713dskinit.c" ==> comm_intr
"../c6713dskinit.c" ==> output_sample
"../c6713dskinit.c" ==> output_left_sample
"../c6713dskinit.c" ==> output_right_sample
"../c6713dskinit.c" ==> input_sample
"../c6713dskinit.c" ==> input_left_sample
"../c6713dskinit.c" ==> input_right_sample
'Finished building: ../c6713dskinit.c'
' '
'Building file: ../fir_filter.c'
'Invoking: C6000 Compiler'
"C:/ti/ccsv5/tools/compiler/c6000/bin/cl6x" -mv-mv6710+ -g --define=CHIP_6713 --include_path="C:/ti/ccsv5/tools/compiler/c6000/include" --include_path="C:/Users/staticd/Documents/COLLEGE/EEL 4935 DSP_FPGA/misc_contents/lib_and_h" --verbose --display_error_number --diag_warning"5 --mem_model:data --abi=coffabi --preproc_with_compile --preproc_dependency="fir_filter.pp" "../fir_filter.c"
TMS320C6x C/C++ Compiler v7.3.1
Tools Copyright (c) 1996-2011 Texas Instruments Incorporated
>> WARNING: invalid version 0, defaulting to 6200
"../fir_filter.c" ==> filter_signal
'Finished building: ../fir_filter.c'
' '
'Building file: ../gator_kator.c'
'Invoking: C6000 Compiler'
"C:/ti/ccsv5/tools/compiler/c6000/bin/cl6x" -mv-mv6710+ -g --define=CHIP_6713 --include_path="C:/ti/ccsv5/tools/compiler/c6000/include" --include_path="C:/Users/staticd/Documents/COLLEGE/EEL 4935 DSP_FPGA/misc_contents/lib_and_h" --verbose --display_error_number --diag_warning"5 --mem_model:data --abi=coffabi --preproc_with_compile --preproc_dependency="gator_kator.pp" "../gator_kator.c"
TMS320C6x C/C++ Compiler v7.3.1
Tools Copyright (c) 1996-2011 Texas Instruments Incorporated
>> WARNING: invalid version 0, defaulting to 6200
"../gator_kator.c", line 23: warning #225-D: function declared implicitly
"../gator_kator.c", line 24: warning #225-D: function declared implicitly
"../gator_kator.c" ==> c_int11
"../gator_kator.c" ==> main
'Finished building: ../gator_kator.c'
' '
'Building target: TheGatorKator.out'
'Invoking: C6000 Linker'
"C:/ti/ccsv5/tools/compiler/c6000/bin/cl6x" -mv-mv6710+ -g --define=CHIP_6713 --verbose --display_error_number --diag_warning"5 --mem_model:data --abi=coffabi -z -m"TheGatorKator.map" --warn_sections -i"C:/ti/ccsv5/tools/compiler/c6000/lib" -i"C:/Users/staticd/Documents/COLLEGE/EEL 4935 DSP_FPGA/project/TheGatorKator" -i"C:/ti/ccsv5/tools/compiler/c6000/include" --reread_libs --rom_model -o "TheGatorKator.out" "./gator_kator.obj" "./fir_filter.obj" "./c6713dskinit.obj" "./Vectors_intr.obj" "../C6713dsk.cmd" "../csl6713.lib" "../dsk6713bsl.lib" "../rts6700.lib"
TMS320C6x C/C++ Compiler v7.3.1
Tools Copyright (c) 1996-2011 Texas Instruments Incorporated

>> WARNING: invalid version 0, defaulting to 6200
error #10056: symbol "_config" redefined: first defined in "./gator_kator.obj";
redefined in "./c6713dskinit.obj"
error #10056: symbol "_AIC_data" redefined: first defined in
"./gator_kator.obj"; redefined in "./c6713dskinit.obj"
error #10056: symbol "_hAIC23_handle" redefined: first defined in
"./gator_kator.obj"; redefined in "./c6713dskinit.obj"
error #10056: symbol "_AIC23CfgData" redefined: first defined in
"./gator_kator.obj"; redefined in "./c6713dskinit.obj"
warning #10247-D: creating output section ".vectors" without a SECTIONS
specification
error #10010: errors encountered during linking; "TheGatorKator.out" not built

>> Compilation failure
gmake: *** [TheGatorKator.out] Error 1
gmake: Target `all' not remade because of errors.

**** Build Finished ****
***************************************************************************

3) After some searching, I found these comments (on: http://e2e.ti.com/support/microcontrollers/msp43016-bit_ultra-low_power_mcus/f/166/t/19751.aspx)

Placing ${inputs} before ${flags} puts the object files before the runtime library on the link command line, thus resolving the reference to the definition in the object file. Now rebuilding the project should no longer generate the symbol redefined errors.


3a) I know it's a different board than mine but figured I'd give it a whirl...so, I did!

4) Now, I have new problem. Here are the warnings minus all the other garbage with is still the same but here is the difference:
***************************************************************************
"C:/ti/ccsv5/tools/compiler/c6000/bin/cl6x" "./gator_kator.obj" "./fir_filter.obj" "./c6713dskinit.obj" "./Vectors_intr.obj" "../C6713dsk.cmd" "../csl6713.lib" "../dsk6713bsl.lib" "../rts6700.lib" -mv-mv6710+ -g --define=CHIP_6713 --verbose --display_error_number --diag_warning"5 --mem_model:data --abi=coffabi -z -m"TheGatorKator.map" --warn_sections -i"C:/ti/ccsv5/tools/compiler/c6000/lib" -i"C:/Users/staticd/Documents/COLLEGE/EEL 4935 DSP_FPGA/project/TheGatorKator" -i"C:/ti/ccsv5/tools/compiler/c6000/include" --reread_libs --rom_model -o "TheGatorKator.out"
TMS320C6x C/C++ Compiler v7.3.1
Tools Copyright (c) 1996-2011 Texas Instruments Incorporated
[C6713dsk.cmd]
>> WARNING: invalid version 0, defaulting to 6200
"../C6713dsk.cmd", line 11: error #171: expected a declaration
At end of source: warning #12-D: parsing restarts here after previous syntax error
1 error detected in the compilation of "../C6713dsk.cmd".

>> Compilation failure
gmake: *** [TheGatorKator.out] Error 1
gmake: Target `all' not remade because of errors.

**** Build Finished ****
***************************************************************************
4a) Now, I have a problem with my CMD file, which I did not change.

5) I am at a loss here and my Google skills are about exhausted and I apparently have no idea what I'm doing. If anyone could help me out here, I would be very grateful.

BONUS?) I would also like to avoid the implicitly declared functions. I added the *.lib files to the project but I still have the warnings. Is there any way to get around this as well.

Details:
-OS: Win7
-IDE: CCS v 5.1.0.09000
-platform: TMS320C6713 DSK by Spectrum Digital

Note) If you look at my code, you may notice that some of the .h files I reference aren't in there--they are stored offline.

Very Respectfully,
staticd

_____________________________________