This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Ivan

hello, i'm working with c6000 processor and CCS IDE, i try to build a small program but i can't build it correctly, i have the next error:

#161 declaration is incompatible with previous "output_sample" (declared at line 42)

void comm_intr() //for communication/init using interrupt
{
poll=0; //0 since not polling
IRQ_globalDisable(); //disable interrupts
c6713_dsk_init(); //init DSP and codec
CODECEventId=MCBSP_getXmtEventId(DSK6713_AIC23_codecdatahandle);//McBSP1 Xmit

#ifndef using_bios //do not need to point to vector table
IRQ_setVecs(vectors); //point to the IRQ vector table
#endif //since interrupt vector handles this

IRQ_map(CODECEventId, 11); //map McBSP1 Xmit to INT11
IRQ_reset(CODECEventId); //reset codec INT 11
IRQ_globalEnable(); //globally enable interrupts
IRQ_nmiEnable(); //enable NMI interrupt
IRQ_enable(CODECEventId); //enable CODEC eventXmit INT11

output_sample(0); //start McBSP interrupt outputting a sample
}

void output_sample(int out_data) //for out to Left and Right channels
{
short CHANNEL_data;

AIC_data.uint=0; //clear data structure
AIC_data.uint=out_data; //32-bit data -->data structure.....

thanks for your help!

  • Hi,
    Could you attach the complete compiler log including warning and errors.
    Please make sure that you have given library and include path correctly through CCS properties option.

    Which example code are you using ?
    Is that code from TI or any books or any other source ?
  • i wrote a source included in a book "Digital Signal Procesing and Applications with the c6713 and c6416 DSK". The source is the following:

    #include"dsk6713_aic23.h"
    #include"dsk6713_led.h"
    #include"dsk6713_dip.h"

    Uint32 fs = DSK6713_AIC23_FREQ_8KHZ;
    short loop=0;
    short gain=10;
    short sine_table[8]={0, 707, 1000, 707, 0, -707, -1000, -707};

    int main(void) {
    comm_poll();
    DSK6713_LED_init();
    DSK6713_DIP_init();
    while(1){
    if(DSK6713_DIP_get(0)==0){
    output_sample(sine_table[loop]*gain);
    if(++loop>7) loop=0;
    }
    else DSK6713_LED_off(0);
    }
    //return 0;
    }

    I added the following files: c6713dsk.c, c6713dsk.h, vectors_poll.asm, vectors_intr.asm and link to files rts6700.lib,dsk6713bsl.lib,csl6713.lib.

    When I built the project the compiler shows the following error    #161 declaration is incompatible with previous "output_sample" (declared at line 42)    in the source c6713dsk.c

    void comm_intr() //for communication/init using interrupt
    {
    poll=0; //0 since not polling
    IRQ_globalDisable(); //disable interrupts
    c6713_dsk_init(); //init DSP and codec
    CODECEventId=MCBSP_getXmtEventId(DSK6713_AIC23_codecdatahandle);//McBSP1 Xmit

    #ifndef using_bios //do not need to point to vector table
    IRQ_setVecs(vectors); //point to the IRQ vector table
    #endif //since interrupt vector handles this

    IRQ_map(CODECEventId, 11); //map McBSP1 Xmit to INT11
    IRQ_reset(CODECEventId); //reset codec INT 11
    IRQ_globalEnable(); //globally enable interrupts
    IRQ_nmiEnable(); //enable NMI interrupt
    IRQ_enable(CODECEventId); //enable CODEC eventXmit INT11

    output_sample(0); //start McBSP interrupt outputting a sample
    }

    void output_sample(int out_data) //for out to Left and Right channels
    {
    short CHANNEL_data;

    AIC_data.uint=0; //clear data structure
    AIC_data.uint=out_data; .......

    the error is in the bold letters.

    Thank you for your help

  • Hi,
    In reference code , "output_sample" function take argument as pointer to variable but you have used simply integer.
    I think, it might be the problem.

    From Book:
    output_sample(sine_table[loop]*gain);

    Yours:
    void output_sample(int out_data) //for out to Left and Right channels
  • Hi Ivan,

    Still facing any issues ?
    Do update us , and can write us back for further support and clarification.
  • Hello, I tried build the following file "c6713dskinit.c", but mark errors, however I think this file was wrote by Texas Instruments. I have been told that it works with earlier versions of ccs. I have another problem when I try to debug a program, the compiler marks the following error:

    TMS320C671X: GEL: Error loading file '/home/ivan/ti/ccsv6/install_scripts/install_drivers.sh': line 1: '#' must be followed by a preprocessor directive
    TMS320C671X: Trouble Writing Memory Block at 0x0 on Page 0 of Length 0x7fa0: This operation is not supported by this driver
    TMS320C671X: File Loader: Verification failed: Target failed to write 0x00000000
    TMS320C671X: GEL: File: /home/ivan/workspace_v6_1/hola2/Debug/hola2.out: Load failed.

    However I ran as root install_drivers.sh. Could they give me ccsv3 for linux please?

  • Hi Ivan,

    This problem might be accruing due to some project dependencies.
    You can try BSL example projects which are provided by Spectrum Digital and can verify it.

    Below is the link to download C6713DSK Collateral's.
    c6000.spectrumdigital.com/.../revc


    However I ran as root install_drivers.sh. Could they give me ccsv3 for linux please?

    I am not CCS Expert, You can post your queries related to CCS on CCS Forum.
  • Hi Ivan,

    Are you able to resolve your issue.
    Have you tried BSL example code which i have suggested you in above post.