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:
This results in the above error message.
What I have tried to solve the problem:
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 #10010 errors encountered during linking; "timertry.out" not built
If a post answers your question please mark it with the "Verify Answer" button
Search the wikis for common questions: CGT, BIOS, CCSv3, CCSv4Track a known bug with SDOWP. Enter the bug id in the "Find Record ID" box
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 DRAMH0warning #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 remainerror #10010: errors encountered during linking; "timertry.out" not builtgmake: *** [timertry.out] Error 1gmake: 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++ ProblemBEGIN memory range has already been specified F2812.cmd /timertry line 84 C/C++ ProblemRAMH0 memory range overlaps existing memory F2812.cmd /timertry line 100 C/C++ ProblemRAMM1 memory range has already been specified F2812.cmd /timertry line 97 C/C++ ProblemRAMM1 memory range overlaps existing memory F2812.cmd /timertry line 97 C/C++ ProblemRESET memory range has already been specified F2812.cmd /timertry line 89 C/C++ ProblemRESET memory range overlaps existing memory F2812.cmd /timertry line 89 C/C++ Problemunresolved 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"../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.