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.

CCS/TMS320F28335: tms320f28335

Part Number: TMS320F28335
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

Hi,

I am new to embedded , i have coded a program for ADC using tms320f28335 while developing i could find some issues like are the registers have to be initialized using "union or struct" and the header file has a desired variable for it , but when i utilize the variable i get an error such as 

Description Resource Path Location Type
#148 declaration is incompatible with "volatile struct ADC_REGS AdcRegs" (declared at line 273 of "..\DSP2833x_Adc.h") main.c /1 line 3 C/C++ Problem


can someone clarify it, and again by declaring some other variable for the struct i could execute the program my question is why the variable in the header file doesn't works?

  • Hi,

    DSP2833x_Adc.h declares AdcRegs variable as follows:

    extern volatile struct ADC_REGS AdcRegs;

    sasi kumar1 said:
    and the header file has a desired variable for it , but when i utilize the variable i get an error such as


    The header does not have a desired variable. It contains a declaration for this variable and the definition of this variable has to be provided somewhere else.
    Your definition or declaration of AdcRegs violates the declaration from the header. 

  • Based on what I see here, I can't give you any specifics on how to fix the problem.  But I can give some general pointers.

    Add the build option --verbose_diagnostics.  The compiler echoes the problem source line with a mark to the point in the source line where the problem begins.  This usually makes the error easier to understand.  Look for this output in the Console view, and not the Problems view.

    Please see this FAQ (not from TI) for general background on how declarations and definitions are typically handled.

    Thanks and regards,

    -George

  • Hi george

    this is the part i found in console unit could you help me out

    Building target: "Example_ADC.out"
    Invoking: C2000 Linker
    "C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.5.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 -g --diag_warning=225 --diag_wrap=off --display_error_number -z -m"Example_ADC.map" --stack_size=0x300 --warn_sections -i"C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.5.LTS/lib" -i"C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.5.LTS/include" --reread_libs --diag_wrap=off --display_error_number --xml_link_info="Example_ADC_linkInfo.xml" --rom_model -o "Example_ADC.out" "./DSP2833x_Adc.obj" "./DSP2833x_GlobalVariableDefs.obj" "./main.obj" "../28335_RAM_lnk.cmd" "../DSP2833x_Headers_nonBIOS.cmd" -llibc.a
    <Linking>

    undefined first referenced
    symbol in file
    --------- ----------------
    _ADC_cal ./DSP2833x_Adc.obj
    _DSP28x_usDelay ./DSP2833x_Adc.obj
    _InitPieCtrl ./main.obj
    _InitPieVectTable ./main.obj
    _InitSysCtrl ./main.obj

    error #10234-D: unresolved symbols remain

    error #10010: errors encountered during linking; "Example_ADC.out" not built
    >> Compilation failure
    makefile:144: recipe for target 'Example_ADC.out' failed
    gmake[1]: *** [Example_ADC.out] Error 1
    gmake: *** [all] Error 2
    makefile:140: recipe for target 'all' failed

    Thanks 

    Sasi

  • You do not link required libs.
    Import an ADC example for 28335x, compare a list of libraries used by your project with a list of libs used by an example.
    Add one by one to find what is needed by your project.
  • Sasi

    Follow Tom's advice. You are missing some source files in your project. I suggest referring to the ADC examples in C2000Ware or starting with one of those then doing your edits.

    Best regards
    Chris
  • Those were the errors from the adc_soc example found from the getting started page, i did include al the libraries

  • Sasi,
    I imported Example_2833xAdcSoc project from C2000Ware v1.0.6.0,
    added dependency on C2000Ware v1.0.6.0 to the project
    and compiled it without any errors or warnings.

  • Sasi

    I see no errors importing that example in C2000Ware 1.00.06.00. Where did you import it from?

    Best regards
    Chris
  • Sasi

    I haven’t heard from you for almost 2 weeks, so I’m assuming you were able to resolve your issue. If this isn’t the case, please reject this resolution and reply to this thread. If this thread locks, please click the "Ask a related question" button and in the new thread describe the current status of your issue and any additional details you may have to assist us in helping to solve your issues.

    Regards,
    Chris
  • Hi Christoper,

    Apologies for the delay reply,

    I am unable to get the result,  As i downloaded the C2000ware and tried to debug a sample project but as for the result i could only find more errors 

  • As your initial issue has been fixed, please mark this thread as resolved and start a new one.

    Please, provide the following information:
    - full Console log,
    - Project -> Properties -> General: Project and Products tabs,
    - Project -> Properties -> Resource -> Linked Resources: Path Variables and Linked Resources tabs.