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.

Compiler/CCSTUDIO-C2000: _DSP28x_usDelay is undefined even i include the header file, F28M36x_Examples.h.

Part Number: CCSTUDIO-C2000

Tool/software: TI C/C++ Compiler

Hi, 

In my application code, i have called DELAY_US() which is defined in F28M36x_Examples.h. 

In my file, C28_ADC.cpp for example, i did include #include "F28M36x_Examples.h" but the compiler still show undefined symbol. 

undefined                                          first referenced
symbol                                                        in file
--------- ----------------
_DSP28x_usDelay                          ./Code/BSP/C28_ADC.obj

The CCS version: 7.2.0.00013 i am using. 

The device support library i use is C:\ti\controlSUITE\device_support\f28m36x\v207\MWare\driverlib\ccs

Can you please help ?

  • Hello,

    Can you check you've added the file F28M36x_usDelay.asm to your project? When you expand your project in Project Explorer, this file should be listed.

    If not, you can add it by right clicking project name, Add Files.., navigate to the file: C:\ti\controlSUITE\device_support\f28m36x\v208\F28M36x_common\source\F28M36x_usDelay.asm, and select "Link to files" if you don't plan to modify it.

    Regards,
    Elizabeth
  • Hi Elizabeth,

    1. First, i tried to add the file directory to the project setting. in "Include Options" in Properties of my project, this DOES NOT work. And I can see the source folder C:\ti\controlSUITE\device_support\f28m36x\v208\F28M36x_common\source but the F28M36x_usDelay.asm doesn't show in the source folder.

    2. I link the file as you mentioned, and choose link location relative to: PROJECT_LOC but it showed "could not link: F28M36x_usDelay.asm"

    3. WORK if i manually copy F28M36x_usDelay.asm to one of my folder without changing any project settings.

    Can you please let me know
    1. what is the proper way to do since I don't plan to change this file, F28M36x_usDelay.asm?
    2. If i really need to add the file to the folder, is any folder in the project fine or i need to add it to the folder which will call this delay?
  • Hi,

    Your 3rd method is fine. One reason the 2nd method may not have worked is if you did the 3rd method before trying 2nd method (adding the file to the project and then trying to link the same file to the project).

    You could try the linking the file after deleting the file from your project folder and checking in Project Explorer that it is no longer listed. But manually adding the file to a project folder is good, too.

    Regards,
    Elizabeth
  • Hi Elizabeth,

    I tried 3rd method and this is still NOT working. Any way i can check if the linking files is set properly?
  • Hi,

    In the .project file within the project folder, there should be a section called linkedResources that lists the file name and location of all files linked to your project. You can look at .project files of examples in controlSUITE to see this format. The .project can be directly modified to link files as well, so that's an option you can consider.

    Regards,
    Elizabeth