• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Development Tools » TI C/C++ Compiler » TI C/C++ Compiler - Forum » Linking error #10010 appears when trying to program TMS320F2812
Share
TI C/C++ Compiler
  • Forum
Options
  • Subscribe via RSS

Linking error #10010 appears when trying to program TMS320F2812

Linking error #10010 appears when trying to program TMS320F2812

This question is answered
3446793
Posted by 3446793
on May 06 2012 20:41 PM
Intellectual790 points

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){
    ;
    }

}

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • AartiG
    Posted by AartiG
    on May 07 2012 12:51 PM
    Guru68895 points

    3446793

    #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.


    If a post answers your question please mark it with the "Verify Answer" button

    Search the wikis for common questions: CGT, BIOS,  CCSv3, CCSv4
    Track a known bug with SDOWP. Enter the bug id in the "Find Record ID" box

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • 3446793
    Posted by 3446793
    on May 07 2012 13:41 PM
    Intellectual790 points

    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?

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Archaeologist
    Posted by Archaeologist
    on May 07 2012 14:28 PM
    Verified Answer
    Verified by 3446793
    Mastermind40550 points

    3446793
    "../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

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • AartiG
    Posted by AartiG
    on May 07 2012 15:31 PM
    Verified Answer
    Verified by 3446793
    Guru68895 points

    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.


    If a post answers your question please mark it with the "Verify Answer" button

    Search the wikis for common questions: CGT, BIOS,  CCSv3, CCSv4
    Track a known bug with SDOWP. Enter the bug id in the "Find Record ID" box

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • 3446793
    Posted by 3446793
    on May 07 2012 18:50 PM
    Intellectual790 points

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

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

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use