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.

Linking error #10010 appears when trying to program TMS320F2812

Other Parts Discussed in Thread: TMS320F2812, SPRC097, TMS320F28335

Hello,

I am trying to program the microcontroller TMS320F2812 on an eZdsp board using CCS 5.1.1.00031. Upon debugging my code, 9 errors appear, the first one being

#10010 errors encountered during linking; "timertry.out" not built

and the following errors possibly related to this one (they regard memory issues). Other posts on the same error message were not helpful in this case.

What I have done:

  1. create a new CCS project, select C2000, F2812, parallel port emulator
  2. write the below code; it is supposed to make two timers work, although I could not test this yet since the code will not run
  3. copy the device-specific header files, DSP281x_Device.h and the ones this file calls, into the project folder
  4. debug

This results in the above error message.

What I have tried to solve the problem:

  • copy DSP281x_GlobalVariableDefs.c into the project folder -> no difference
  • copy DSP281x_DefaultIsr.h, DSP281x_Examples.h, DSP281x_GlobalPrototypes.h, DSP281x_SWPrioritizedIsrLevels.h into the project folder, include the examples header file -> no difference
  • uncomment the 4 Init commands in the code -> no difference
  • copy DSP281x_Headers_BIOS.cmd and DSP281x_Headers_nonBIOS.cmd (one at a time) into the project folder; this produces the error
    #10099-D: run placement fails for
    with the former file and makes no difference with the latter

What could be wrong there? I appreciate your suggestions.

Regards,

Adrian

/*
 * main.c
 *
 * use the   GP timer compare   and the   full-compare unit   of event manager A
 * to get 2 equal PWM signals
 * output pins: T1PWM, T2PWM, PWM1
 */
#include "DSP281x_Device.h"
#include "math.h"
//#include "DSP281x_Examples.h"

void main() {
    float d=0.5;
    EALLOW;
/*
    InitSysCtrl();
    InitPieCtrl();
    InitPieVectTable();
    InitPeripherals();
*/

// GP timer 1 setup -- provides time base for full-compare unit
    EvaRegs.T1CON.bit.FREE=0;        // stop immediately on emulation suspend
    EvaRegs.T1CON.bit.SOFT=0;        // ... second part of it
    EvaRegs.T1CON.bit.TMODE=2;        // continuous up-counting mode
    EvaRegs.T1CON.bit.TPS=0;        // input clock prescaler
    EvaRegs.T1CON.bit.TENABLE=1;    // enable timer
    EvaRegs.T1CON.bit.TCLKS10=0;    // use HSPCLK as clock
    EvaRegs.T1CON.bit.TCLD10=0;        // reload compare register T1CMPR at beginning of switching period
    EvaRegs.T1CON.bit.TECMPR=1;        // enable timer compare

    EvaRegs.T1PR=7499;                // period register = 150MHz/20kHz-1
    EvaRegs.T1CMPR=round(EvaRegs.T1PR*d);    // compare register for GP T1
    EvaRegs.T1CNT=0;                // initialize counter register

// GP timer 2 setup -- uses its own compare functionality
    EvaRegs.T2CON.bit.FREE=0;        // stop immediately on emulation suspend
    EvaRegs.T2CON.bit.SOFT=0;        // ... second part of it
    EvaRegs.T2CON.bit.TMODE=2;        // continuous up-counting mode
    EvaRegs.T2CON.bit.TPS=0;        // input clock prescaler
    EvaRegs.T2CON.bit.T2SWT1=1;        // enabled together with T1
    EvaRegs.T2CON.bit.TCLKS10=0;    // use HSPCLK as clock
    EvaRegs.T2CON.bit.TCLD10=0;        // reload compare register T1CMPR at beginning of switching period
    EvaRegs.T2CON.bit.TECMPR=1;        // enable timer compare
    EvaRegs.T2CON.bit.SET1PR=1;        // use T1's period register

    EvaRegs.T2CMPR=round(EvaRegs.T1PR*d);    // compare register for GP T2
    EvaRegs.T2CNT=0;                // initialize counter register

// GP timer control register (EVA)
    EvaRegs.GPTCONA.bit.T2CTRIPE=0;    // disable trip function that can drive output to high Z
    EvaRegs.GPTCONA.bit.T1CTRIPE=0;
    EvaRegs.GPTCONA.bit.TCMPOE=1;    // enable compare output
    EvaRegs.GPTCONA.bit.T2TOADC=0;    // don't set off ADC
    EvaRegs.GPTCONA.bit.T1TOADC=0;
    EvaRegs.GPTCONA.bit.TCMPOE=1;    // enable timer compare outputs
    EvaRegs.GPTCONA.bit.T2CMPOE=1;    // enable timer 2 compare outputs
    EvaRegs.GPTCONA.bit.T1CMPOE=1;    // enable timer 1 compare outputs
    EvaRegs.GPTCONA.bit.T2PIN=1;    // polarity of GP timer 2 (1 = active L, 2 = active H)
    EvaRegs.GPTCONA.bit.T1PIN=1;

// GP timer compare control register (EVA)
    EvaRegs.COMCONA.bit.CENABLE=1;    // enable compare
    EvaRegs.COMCONA.bit.CLD=0;        // reload compare register CMPR at beginning of switching period
    EvaRegs.COMCONA.bit.ACTRLD=0;    // reload action control register at beginning of switching period
    EvaRegs.COMCONA.bit.FCOMPOE=1;    // enable full compare outputs
    EvaRegs.COMCONA.bit.FCMP1OE=1;    // enable full compare 1 outputs (PWM1,2)
    EvaRegs.COMCONA.bit.C1TRIPE=0;    // disable trip function that can drive output to high Z

// compare action control register (EVA)
    EvaRegs.ACTRA.bit.CMP1ACT=1;     // polarity of PWM1 (1 = active L, 2 = active H)


// CMPR1 register
    EvaRegs.CMPR1=round(EvaRegs.T1PR*d);    // compare register for PWM1

    EDIS;

    while(1){
    ;
    }

}

  • 3446793 said:

    #10010 errors encountered during linking; "timertry.out" not built



    This error is saying that the executable was not built because of previous errors. Check the previous errors in your CCS build console. With those specific error messages you may be able to find answers on previous forum threads as to the cause and how to resolve. If you are unable to, please paste the entire output from the CCS build console to a text file and attach it here so we can take a look.

  • The search for the other errors was not quite conclusive; at least I found no tips that I understood. Below is the text that appears in the CDT Build Console:


    **** Build of configuration Debug for project timertry ****

    C:\ti\ccsv5\utils\bin\gmake -k all
    'Building file: ../main.c'
    'Invoking: C2000 Compiler'
    "C:/ti/ccsv5/tools/compiler/c2000_6.0.3/bin/cl2000" -v28 -ml -mt -g --include_path="C:/ti/ccsv5/tools/compiler/c2000_6.0.3/include" --diag_warning=225 --display_error_number --preproc_with_compile --preproc_dependency="main.pp"  "../main.c"
    "../main.c", line 32: warning #225-D: function declared implicitly
    'Finished building: ../main.c'
    ' '
    'Building target: timertry.out'
    'Invoking: C2000 Linker'
    "C:/ti/ccsv5/tools/compiler/c2000_6.0.3/bin/cl2000" -v28 -ml -mt -g --diag_warning=225 --display_error_number -z -m"timertry.map" --warn_sections -i"C:/ti/ccsv5/tools/compiler/c2000_6.0.3/lib" -i"C:/ti/ccsv5/tools/compiler/c2000_6.0.3/include" --reread_libs --rom_model -o "timertry.out"  "./main.obj" "./DSP281x_GlobalVariableDefs.obj" -l"libc.a" "../2812_RAM_lnk.cmd" "../DSP281x_Headers_nonBIOS.cmd" "../F2812.cmd"
    <Linking>
    "../F2812.cmd", line 84: error: BEGIN memory range has already been specified
    "../F2812.cmd", line 89: error: RESET memory range has already been specified
    "../F2812.cmd", line 89: error: RESET memory range overlaps existing memory
       range RESET
    "../F2812.cmd", line 97: error: RAMM1 memory range has already been specified
    "../F2812.cmd", line 97: error: RAMM1 memory range overlaps existing memory
       range RAMM1
    "../F2812.cmd", line 100: error: RAMH0 memory range overlaps existing memory
       range DRAMH0
    warning #10210-D: creating ".stack" section with default size of 0x400; use the
       -stack option to change the default size

     undefined first referenced

      symbol       in file     
    >> Compilation failure
     --------- ----------------
     _round    ./main.obj      

    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "timertry.out" not built
    gmake: *** [timertry.out] Error 1
    gmake: Target `all' not remade because of errors.

    **** Build Finished ****

    And this is what it says in the Problems window:

    Description    Resource    Path    Location    Type
    #10010 errors encountered during linking; "timertry.out" not built    timertry             C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/10234.html">#10234-D</a>  unresolved symbols remain    timertry             C/C++ Problem
    BEGIN memory range has already been specified    F2812.cmd    /timertry    line 84    C/C++ Problem
    RAMH0 memory range overlaps existing memory    F2812.cmd    /timertry    line 100    C/C++ Problem
    RAMM1 memory range has already been specified    F2812.cmd    /timertry    line 97    C/C++ Problem
    RAMM1 memory range overlaps existing memory    F2812.cmd    /timertry    line 97    C/C++ Problem
    RESET memory range has already been specified    F2812.cmd    /timertry    line 89    C/C++ Problem
    RESET memory range overlaps existing memory    F2812.cmd    /timertry    line 89    C/C++ Problem
    unresolved symbol _round, first referenced in ./main.obj    timertry             C/C++ Problem
    #10210-D creating ".stack" section with default size of 0x400; use the    timertry             C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function declared implicitly    main.c    /timertry    line 32    C/C++ Problem

    Those errors that include "memory range" lead to the file F2812.cmd. This is the one from the header files (sprc097).

    Are the steps that I took correct at all?

  • 3446793 said:
    "../F2812.cmd", line 84: error: BEGIN memory range has already been specified

    These errors should be easy to resolve; most likely what's going on is that F2812.cmd is being included twice. Examine "2812_RAM_lnk.cmd" and "DSP281x_Headers_nonBIOS.cmd". I suspect one of those includes F2812.cmd

  • Your link command is linking in two linker command files 2812_RAM_lnk.cmd and F2812.cmd which likely have some overlapping memory specifications. Depending on whether you want to run from Flash or RAM, exclude one of those files from the build. If running from RAM, keep 2812_RAM_lnk.cmd and exclude F2812.cmd. To exclude a file, select the file in the CCS Project explorer, right click on it and go to Resource Configurations->Exclude from build. That should get rid of the "memory range overlap" errors.

    For the error regarding undefined symbol _round, it means that there is a reference to that symbol in main.c, but a definition was not found. The definition would need to come either from a source file or library.

  • Yes, you two were right! No errors appear any more.

    Thanks for identifying the problems and for the description to solve them.

  • Hi,

    I was conducting a experiment this afternoon, the MCU is TMS320F28335, but 3 errors encountered when compiling,following was the detailed information

    errors:

    Description Resource Path Location Type
    #10010 errors encountered during linking; "TrafficLight.out" not built TrafficLight C/C++ Problem

    Description Resource Path Location Type
    <a href="file:/D:/cc5/ccsv5/tools/compiler/dmed/HTML/10234.html">#10234-D</a> unresolved symbols remain TrafficLight C/C++ Problem

    Description Resource Path Location Type
    unresolved symbol code_start TrafficLight C/C++ Problem

    Infos:

    Description Resource Path Location Type
    #10205-D automatic RTS selection: linking in "rts2800_fpu32.lib" in place of index library "libc.a" TrafficLight C/C++ Problem

    Description Resource Path Location Type
    #10209-D automatic RTS selection: linking in index library "libc.a" TrafficLight C/C++ Problem

    could you please give me some possible solution for the errors? thank you!

  • Is the DSP2833x_CodeStartBranch.asm file included in your project? And do the project linker settings set the entry point to the code_start symbol? Please see this post for some related information.

    Also please avoid adding new issues to very old threads such as this one, as there is the potential that it will get missed. It is best to create a new thread for every new question/issue.