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/TMS320F2812: Run from Flash _Blink LED_Compilation ERROR.

Part Number: TMS320F2812

Tool/software: Code Composer Studio

hi,

AM new in TI processor. Am trying to do ADC program in TMS320F2812. before i go to ADC am trying to blink LED by running code from flash memory.

by referring documents and links i tried to build some codes for blinking LEDs. But unfortunately its not getting build and throwing some error.

I checked the linker and other options but not getting idea from where the error is getting generating.

The errors are shown below. and the code has been attached for reference. 

Kindly provide me some solution so that i can move to forward.

**** Clean-only build of configuration Debug for project 2812__LED_Blink ****

"C:\\ti\\ccsv8\\utils\\bin\\gmake" -k -j 4 clean -O

DEL /F "2812__LED_Blink.hex" "2812__LED_Blink.out"
DEL /F "DSP281x_CSMPasswords.obj" "DSP281x_GlobalVariableDefs.obj" "DSP281x_MemCopy.obj" "DSP281x_PieCtrl.obj" "DSP281x_PieVect.obj" "DSP281x_SysCtrl.obj" "blink.obj"
DEL /F "DSP281x_GlobalVariableDefs.d" "DSP281x_MemCopy.d" "DSP281x_PieCtrl.d" "DSP281x_PieVect.d" "DSP281x_SysCtrl.d" "blink.d"
DEL /F "DSP281x_CSMPasswords.d"
Could Not Find D:\workspace\TI_DSP\TI2812\2812__LED_Blink\Debug\2812__LED_Blink.hex
Could Not Find D:\workspace\TI_DSP\TI2812\2812__LED_Blink\Debug\DSP281x_CSMPasswords.obj
Could Not Find D:\workspace\TI_DSP\TI2812\2812__LED_Blink\Debug\DSP281x_GlobalVariableDefs.d
Could Not Find D:\workspace\TI_DSP\TI2812\2812__LED_Blink\Debug\DSP281x_CSMPasswords.d
Finished clean

**** Build Finished ****

**** Build of configuration Debug for project 2812__LED_Blink ****

"C:\\ti\\ccsv8\\utils\\bin\\gmake" -k -j 4 all -O

Building file: "../DSP281x_CSMPasswords.asm"
Invoking: C2000 Compiler
"C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/bin/cl2000" -v28 -ml -mt --include_path="D:/workspace/TI_DSP/TI2812/2812__LED_Blink" --include_path="C:/tidcs/c28/DSP281x/v120/DSP281x_headers/include" --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/include" --advice:performance=all -g --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="DSP281x_CSMPasswords.d_raw" "../DSP281x_CSMPasswords.asm"
Finished building: "../DSP281x_CSMPasswords.asm"

Building file: "../DSP281x_MemCopy.c"
Invoking: C2000 Compiler
"C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/bin/cl2000" -v28 -ml -mt --include_path="D:/workspace/TI_DSP/TI2812/2812__LED_Blink" --include_path="C:/tidcs/c28/DSP281x/v120/DSP281x_headers/include" --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/include" --advice:performance=all -g --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="DSP281x_MemCopy.d_raw" "../DSP281x_MemCopy.c"
Finished building: "../DSP281x_MemCopy.c"

Building file: "../DSP281x_PieCtrl.c"
Invoking: C2000 Compiler
"C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/bin/cl2000" -v28 -ml -mt --include_path="D:/workspace/TI_DSP/TI2812/2812__LED_Blink" --include_path="C:/tidcs/c28/DSP281x/v120/DSP281x_headers/include" --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/include" --advice:performance=all -g --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="DSP281x_PieCtrl.d_raw" "../DSP281x_PieCtrl.c"
Finished building: "../DSP281x_PieCtrl.c"

Building file: "../DSP281x_PieVect.c"
Invoking: C2000 Compiler
"C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/bin/cl2000" -v28 -ml -mt --include_path="D:/workspace/TI_DSP/TI2812/2812__LED_Blink" --include_path="C:/tidcs/c28/DSP281x/v120/DSP281x_headers/include" --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/include" --advice:performance=all -g --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="DSP281x_PieVect.d_raw" "../DSP281x_PieVect.c"
Finished building: "../DSP281x_PieVect.c"

Building file: "../DSP281x_SysCtrl.c"
Invoking: C2000 Compiler
"C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/bin/cl2000" -v28 -ml -mt --include_path="D:/workspace/TI_DSP/TI2812/2812__LED_Blink" --include_path="C:/tidcs/c28/DSP281x/v120/DSP281x_headers/include" --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/include" --advice:performance=all -g --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="DSP281x_SysCtrl.d_raw" "../DSP281x_SysCtrl.c"
Finished building: "../DSP281x_SysCtrl.c"

Building file: "../DSP281x_GlobalVariableDefs.c"
Invoking: C2000 Compiler
"C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/bin/cl2000" -v28 -ml -mt --include_path="D:/workspace/TI_DSP/TI2812/2812__LED_Blink" --include_path="C:/tidcs/c28/DSP281x/v120/DSP281x_headers/include" --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/include" --advice:performance=all -g --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="DSP281x_GlobalVariableDefs.d_raw" "../DSP281x_GlobalVariableDefs.c"
Finished building: "../DSP281x_GlobalVariableDefs.c"

Building file: "../blink.c"
Invoking: C2000 Compiler
"C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/bin/cl2000" -v28 -ml -mt --include_path="D:/workspace/TI_DSP/TI2812/2812__LED_Blink" --include_path="C:/tidcs/c28/DSP281x/v120/DSP281x_headers/include" --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/include" --advice:performance=all -g --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="blink.d_raw" "../blink.c"
Finished building: "../blink.c"

Building target: "2812__LED_Blink.out"
Invoking: C2000 Linker
"C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/bin/cl2000" -v28 -ml -mt --advice:performance=all -g --diag_warning=225 --diag_wrap=off --display_error_number -z -m"2812__LED_Blink.map" --stack_size=0x400 --warn_sections -i"C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/lib" -i"D:/workspace/TI_DSP/TI2812/2812__LED_Blink" -i"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/c2000/lib" -i"C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_18.1.2.LTS/include" --reread_libs --diag_wrap=off --display_error_number --xml_link_info="2812__LED_Blink_linkInfo.xml" --rom_model -o "2812__LED_Blink.out" "./DSP281x_CSMPasswords.obj" "./DSP281x_GlobalVariableDefs.obj" "./DSP281x_MemCopy.obj" "./DSP281x_PieCtrl.obj" "./DSP281x_PieVect.obj" "./DSP281x_SysCtrl.obj" "./blink.obj" "../DSP281x_Headers_nonBIOS.cmd" "../F2812.cmd" -llibc.a -lrts2800_ml.lib
<Linking>
warning #10247-D: creating output section "ramfuncs" without a SECTIONS specification

undefined first referenced
symbol in file
--------- ----------------
_ADCINT_ISR ./DSP281x_PieVect.obj
_CAPINT1_ISR ./DSP281x_PieVect.obj
_CAPINT2_ISR ./DSP281x_PieVect.obj
_CAPINT3_ISR ./DSP281x_PieVect.obj
_CAPINT4_ISR ./DSP281x_PieVect.obj
_CAPINT5_ISR ./DSP281x_PieVect.obj
_CAPINT6_ISR ./DSP281x_PieVect.obj
_CMP1INT_ISR ./DSP281x_PieVect.obj
_CMP2INT_ISR ./DSP281x_PieVect.obj
_CMP3INT_ISR ./DSP281x_PieVect.obj
_CMP4INT_ISR ./DSP281x_PieVect.obj
_CMP5INT_ISR ./DSP281x_PieVect.obj
_CMP6INT_ISR ./DSP281x_PieVect.obj
_DATALOG_ISR ./DSP281x_PieVect.obj
_ECAN0INTA_ISR ./DSP281x_PieVect.obj
_ECAN1INTA_ISR ./DSP281x_PieVect.obj
_EMUINT_ISR ./DSP281x_PieVect.obj
_ILLEGAL_ISR ./DSP281x_PieVect.obj
_INT13_ISR ./DSP281x_PieVect.obj
_INT14_ISR ./DSP281x_PieVect.obj
_MRINTA_ISR ./DSP281x_PieVect.obj
_MXINTA_ISR ./DSP281x_PieVect.obj
_NMI_ISR ./DSP281x_PieVect.obj
_PDPINTA_ISR ./DSP281x_PieVect.obj
_PDPINTB_ISR ./DSP281x_PieVect.obj
_PIE_RESERVED ./DSP281x_PieVect.obj
_RTOSINT_ISR ./DSP281x_PieVect.obj
_SCIRXINTA_ISR ./DSP281x_PieVect.obj
_SCIRXINTB_ISR ./DSP281x_PieVect.obj
_SCITXINTA_ISR ./DSP281x_PieVect.obj
_SCITXINTB_ISR ./DSP281x_PieVect.obj
_SPIRXINTA_ISR ./DSP281x_PieVect.obj
_SPITXINTA_ISR ./DSP281x_PieVect.obj
_T1CINT_ISR ./DSP281x_PieVect.obj
_T1OFINT_ISR ./DSP281x_PieVect.obj
_T1PINT_ISR ./DSP281x_PieVect.obj
_T1UFINT_ISR ./DSP281x_PieVect.obj
_T2CINT_ISR ./DSP281x_PieVect.obj
_T2OFINT_ISR ./DSP281x_PieVect.obj
_T2PINT_ISR ./DSP281x_PieVect.obj
_T2UFINT_ISR ./DSP281x_PieVect.obj
_T3CINT_ISR ./DSP281x_PieVect.obj
_T3OFINT_ISR ./DSP281x_PieVect.obj
_T3PINT_ISR ./DSP281x_PieVect.obj
_T3UFINT_ISR ./DSP281x_PieVect.obj
_T4CINT_ISR ./DSP281x_PieVect.obj
_T4OFINT_ISR ./DSP281x_PieVect.obj
_T4PINT_ISR ./DSP281x_PieVect.obj
_T4UFINT_ISR ./DSP281x_PieVect.obj
_TINT0_ISR ./DSP281x_PieVect.obj
_USER10_ISR ./DSP281x_PieVect.obj
_USER11_ISR ./DSP281x_PieVect.obj
_USER12_ISR ./DSP281x_PieVect.obj
_USER1_ISR ./DSP281x_PieVect.obj
_USER2_ISR ./DSP281x_PieVect.obj
_USER3_ISR ./DSP281x_PieVect.obj
_USER4_ISR ./DSP281x_PieVect.obj
_USER5_ISR ./DSP281x_PieVect.obj
_USER6_ISR ./DSP281x_PieVect.obj
_USER7_ISR ./DSP281x_PieVect.obj
_USER8_ISR ./DSP281x_PieVect.obj
_USER9_ISR ./DSP281x_PieVect.obj
_WAKEINT_ISR ./DSP281x_PieVect.obj
_XINT1_ISR ./DSP281x_PieVect.obj
_XINT2_ISR ./DSP281x_PieVect.obj
_rsvd_ISR ./DSP281x_PieVect.obj

error #10234-D: unresolved symbols remain

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

**** Build Finished ****

Thanks,

Nikhil TI2812.rar

  • Nikhil,

    The F2812 is an extremely old device and I strongly suggest consider a more current device. In any case, you might want to review the F2812 workshop at:

    processors.wiki.ti.com/.../C2000_Archived_Workshops

    Note that this workshop uses a very early version of CCS and you will need to create new projects to run with the newer versions of CCS.

    I hope this helps. If this answers your question, please click the green "Verified Answer" button. Thanks.

    - Ken
  • Hi ken,

    Thank you for reply.

    I cannot change the device which is already using in a board. in Same board we would like to update the firmware. but we dont have the source code of current firmware.

    I hope the error is related to linking file. But not able to understand related to which linking file.

    Am going through the document which you suggest and trying as mentioned.

    Lets see what happen. If i can over come the issue it will be great. until then am keeping this post as open.

    thank you.

  • hi,

    The attached code is successfully build without an error. (blinking GPIO Example)

    1) But if am uncomment the following function it throws an error. 

    here is the commented part 

    // Initialize the PIE vector table with pointers to the shell Interrupt
    // Service Routines (ISR).
    // This will populate the entire table, even if the interrupt
    // is not used in this example. This is useful for debug purposes.
    // The shell ISR routines are found in DSP281x_DefaultIsr.c.
    // This function is found in DSP281x_PieVect.c.

    // InitPieVectTable();              // This Function giving ERROR

    2) More over i did not used MEM COPY instruction to save Important codes to RAM. Does it make any issue ?

    Whether the code make any problem to the device? Because i am not using 2 function which i can see in other flash example.

    please make your comments.

  • FlashDSP.rarhi,

    The attached code is successfully build without an error. (blinking GPIO Example)

    1) But if am uncomment the following function it throws an error. 

    here is the commented part 

    // Initialize the PIE vector table with pointers to the shell Interrupt
    // Service Routines (ISR).
    // This will populate the entire table, even if the interrupt
    // is not used in this example. This is useful for debug purposes.
    // The shell ISR routines are found in DSP281x_DefaultIsr.c.
    // This function is found in DSP281x_PieVect.c.

    // InitPieVectTable();              // This Function giving ERROR

    2) More over i did not used MEM COPY instruction to save Important codes to RAM. Does it make any issue ?

    Whether the code make any problem to the device? Because i am not using 2 function which i can see in other flash example.

    please make your comments.

  • Nikhil,

    Yes, the memcpy() is needed for flash. Please reference the following application report:

    www.ti.com/lit/spra958

    I hope this helps. If this answers your question, please click the green "Verified Answer" button. Thanks.

    - Ken
  • hi,

    i have added the MEMCOPY (). 

    Its look like this 

    // InitPieVectTable();

    // Step 4. Initialize all the Device Peripherals:
    // This function is found in DSP281x_InitPeripherals.c
    // InitPeripherals(); // Not required for this example

    // Step 5. User specific code:

    // Call Flash Initialization to setup flash waitstates

    MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);

    // This function must reside in RAM

    InitFlash();

    1) Now am able to debug the firmware with hardware and working fine. But if am loading the program to the controller and trying to run without debugger its not running. Anything else to add in project.

    2) if am enabling InitPieVecTable(); it is throwing an error. Which supporting file i should have to include to overcome the issue.

    -nikhil

  • Nikhil,

    Do you include CodeStartBranch.asm? Is it being linked to the proper location?

    Compare your project to the flash lab exercise in the F2812 workshop (link provided in my first reply). Also, compare your project to the spra958 application report. You did not provide enough information to answer your second question.

    - Ken
  • Hi,
    By adding CodeStartBranch.asm into project it start running from Flash.

    2) If am calling the function InitPieVecTable(); project building gets fail.
    I already added DSP281x_PieVect.c. in project but still it is giving some error.
    so am building the project by commenting the function call of InitPieVecTable();

    Actually am not understanding why its showing error if am calling this function.
    Can you help me in this. ?
  • Nikhil,

    In main() the function that needs to be called is InitPieCtrl(). The InitPieCtrl() function has the memcpy() function which copies the PieVectTable to the PIE RAM and enables it.

    I hope this helps. If this answers your question, please click the green "Verified Answer" button. Thanks.

    - Ken
  • Nikhil,

    It's been a while since I have heard from you last. Therefore, I am assuming that my last reply resolve your issue. If this isn’t the case, please reject this resolution or reply to this thread. If this thread locks, please make a new thread describing the current status of your issue. Thank you.

    - Ken
  • Hi ken,

    in main() , InitPieCtrl() has already called.

    But in next line while calling  InitPieVectTable(); building projects getting error.

    Here attached the screen shots of project building result. Please check it.

    _nikhil

  • Nikhil,

    Are you trying to run one of our example projects? From your Project Explorer window it looks like you included everything into one project folder (i.e. no include folders, paths for the compiler, etc.). This not the ideal way of structuring your project. For example, DSP281x_Device.h includes all of the other .h files, which would be in an include folder. I suggest looking at the workshop lab exercises again, and trying an example project to learn the proper way of setting up a project.

    Note that USER12_ISR is declared in DSP281x_DefaultIsr.h, and used in DSP281x_PieVect.c and DSP281x_DefaultIsr.c.

    - Ken
  • Hi Ken,

    Am not referring the project structure instead i just refereed the main function and all. 

    Am trying my own example by referring some of example projects. 

    So if am creating a include folder and adding header files to it will it resolve the issue?

     Similarly source file also i will include in a folder.

    let me try once as you suggested.

    _nikhil

  • Nikhil,

    This is exactly what I am telling you. Sometimes the order of the #includes will matter. (This happened to me a few weeks ago with a similar error). Use the header files in their default location and configure the project properties with the paths, etc. You could also have your own "user_common" folder for the include file that you create. As a suggestion, refer to the F28379D workshop for the setup of the files:

    processors.wiki.ti.com/.../C2000_Multi-Day_Workshop

    I know that you are using the F2812, but the setup will be very similar to the F28379D and this workshop uses more current versions of the tools, etc. See lab exercise 5, step 3. Also, see the lab files and folders for reference. You could replace the "${PROJECT_ROOT}" with the path to the header files, or make a copy of the files/folders like we do in the workshop.

    I hope this helps. If this answers your question, please click the green "Verified Answer" button. Thanks.

    - Ken
  • Nikhil,

    It's been a while since I have heard from you last. Therefore, I am assuming that my last reply resolve your issue. If this isn’t the case, please reject this resolution or reply to this thread. If this thread locks, please make a new thread describing the current status of your issue. Thank you.

    - Ken