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.

C2000 piccolo launchpad - problem building

Other Parts Discussed in Thread: CONTROLSUITE, TMS320F28027

Hello,

I recently installed the c2000 launchpad and managed to compile and debug the demo program (CCS V5_2).

So far, so good.

Then I tried to create my first program (just blinking an led) and found some issues :

I added the launchpad folder under controlsuite as include path for the compiler and as search path for the linker, that way I managed to have the incldues resolved (clk.h etc).

Now, if I hit "build" the compiler seems to do it's job without complaining, tried to add an error to the code and it is correctly displayed as error.

However I get a variable number of linker errors such as 

unresolved symbol _CLK_init, first referenced in ./main.obj led2 C/C++ 

I assume that symbol should be defined somewhere in "C:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\lib" which I added in the linker search path, am I wrong?.

Also, if I check the run/debug settings -> launch configuration  I get this error related to the "program" tab :

Specified Program ( Texas Instruments XDS100v1 USB Emulator/C28xx )  does not exist

What does this mean?

I am a bit lost, suggestions are welcome :)

  • Hi Francesco,

    Find out which c file has the CLK_init function and add it to your project: Project->Add Files.  To find which file has the missing function, you could run this command from the command line, for example:  findstr /s /i /c:"CLK_init" *.*        That just searches within all files for the CLK_init phrase.

    "Specified Program ( Texas Instruments XDS100v1 USB Emulator/C28xx ) "  means CCS can't find your jtag programmer, which is on board your dev kit.  Check device manager under USB, do you see anything named XDS?

  • Thanks Jut,

    actually I found a workaround , but I am trying to understand which folders need to be included each time I start a new project.

    The workaround I used was to clone the demo project, remove the source code and add my main.c

    That worked, however trying to include the same folders in a new project did not... so I am definitely missing something.

    Same thing about the jtag emulator : it is exactly the same as i the demo project (and indeed the device selected is the same), but in the demo (or in the cloed project) it works, in the one I created from scratch it does not (it gives that weird error at least).

    I believe that the clk.h adc.h etc are generic for the device family (with each device having its own set of headers, but with the same name / prototypes across the family) so I would not expect them to be be specific for the demo project.

    I checked various user guides, but did not find anything about the functions (i.e. GPIO_setMode() etc) with some documentation on what they do, in which files are supported etc etc.

    Basically, when I start a new CSS Project for the C2000 Piccolo, besides selecting the specific device and the jtag programmer, what else should I modify in the project properties?

    Is there any documentation at all for this? I probably missed it

  • You may need to modify compiler and/or linker search paths so they can locate necessary header files and libraries.  This stuff is probably documented in the ccs user guide (i've never looked at it though).

  • Well, that's exactly my point :)

    Was not able to find that info in the docs, not sure which doc should I check for it either....

    I did not go through the "optimizing C/C++ compiler" so far, might be that one, not sure.

    Hopefully it's one of these, anyways http://www.ti.com/tool/launchxl-f28027?DCMP=c2x-launchpad&HQS=c2000-launchpad#Technical Documents

  • Francesco,

    I believe you are missing the driverllib.lib file which is located in f2802x_common/lib.  This library file contains pre-compiled objects for the driver library.  All of the example projects should have the driver library linked to them (you should be able to see it in the project navigator.  Additionally there is a project for the driver library which can be imported, modified, and recompiled if changes to the driver library need to be made for your applications.


    Regards,

    Trey

  • Thanks Trey!

    That was definitely it.

    Just in case others are stuck with the same issue : 

    Basically, creating a new project from scratch and having selected device = TMS320F28027 and XDS100V1 Usb Emulator, I had to :

    1) in project -> properties -> CCS Build -> C2000 Compiler -> Include Options -> add dir : "C:\ti\controlSUITE\development_kits\C2000_LaunchPad"

    2) in project -> properties -> CCS Build -> C2000 Linker -> File Search Path -> Include library : "C:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\lib\driverlib.lib"

    Thanks again!

  • No problem!  Glad to hear you got it working!

    Trey

  • Hi Francesco,

    When i start the project from scratch do i have to add the c2000 compiler & c2000 linker path all the time ?

    and my project is not loading from Flash. what are the step that i should do in the program to make my program to load from Flash

  • Manoj,

    Try importing one of the example projects in controlSUITE for the LaunchPad.  Each of these projects has two different build configurations.  One builds and links the project to run from RAM, the other Flash.

    If you dig deeper in the project properties you'll see that the main thing that changes is the linker command file used.  There are also some #defines that are activated in flash builds (for instance the call to memcpy).

    Trey

  • halo Francesco,

    i follow your guide and the compilation is good.

    Just left one warning. function declared implicitly on below line

     PIE_setDebugIntVectorTable(myPie);

    usually occur when encounter this line.

    Any idea on this problem?

  • i searched online,

    _DEBUG needed to be added on predefined symbols

    to enable debug function.

    So 

    PIE_setDebugIntVectorTable(myPie);
    PIE_enable(myPie);

    is for debug purposes?

    if dont want debug function, can delete it?

  • Sorry, not sure.

    I believe debug might be needed to enable the JTAG debugging, i..e  with CCS, if you are compiling the code, laoding into the device and you are done, no debugging involved, then you may eventually not need it

  • The _DEBUG define is only needed if you want the debug vector table function.  It is not actually needed to debug the device.

  •  Dear Trey,

    The folllowing are the steps i did to store my own code in Flash memory,

    After creating my own project with the name azim4 & adding the linker files

    1) In the Project properties => General => Manage Configuration => New

    2) I typed the name as FLASH & under import from existing projects => Examplef2802xLEDBlink>Flash

    3) I set the FLASH as Active.

    4) In GENERAL => Main (TAB) => advance settings (TAB) => Linker command file => F2802x_Headers_nonBIOS.cmd

    5) My linker files were replaced by the examples so i added the linker files again , i did not delete the examples linkers.

    6) When i was dumping i got the following error

    C28xx: GEL: Encountered a problem loading file: C:\Users\Azim\workspace_v5_3\azim4\FLASH\Example_F2802xLEDBlink.out Could not open file

    Please note : My output file should be azim4.out and not Example_F2802xLEDBlink.out.

    When i execute using debug configuration i have no GEL file errors and i get my output as azim4.out only .

    Only after setting to FLASH Active I am getting this error also the output file execution is happening in

    Example_F2802xLEDBlink.out , but not in azim4.out

    Azim

     

  • how about adding _FLASH in predefined symbol at c2000 compiler

  • Hi Azim,

    I would like you to quickly go through this file:

    3817.3301.TI_Running_from_Flash_spra958l.pdf

    Regards,

    Gautam

  • Azim,

    After you created the new build configuration, did you build the project?  It sounds like CCS isn't able to find the out file.  If you did build it, did you check to ensure the project built successfully?

  • Dear Trey,

    You are right the ccs is not able to find the output file.

    Even when i built , it is not able to find the output file

     

     

     

  • Azim,

    Can you look in the output directory (it should be named the same as your build configuration) and see if there is a *.out file there?

    Is the project building successfully?

  • Dear Tan Chin,

    It gets automatically added in the predefines when you import . I have personally checked it. 

    The problem at the  moment  is when we import the configuration from the example files our project's output file

     is not detected by the ccs compiler . Its is instead returning error as could not open exampleled.out file (the

     example project from which i imported the settings).

     

     

     

     

  • Dear Gautam,

    I have read the pdf sent by you. 

    It has the details regarding FLASH programing for  c2802x devices .

    But it does not contain the detail's of the linkers which are found in the Examples FLASH congfigurations.

    The thing is i'am not able get the right  linker options for example  there is a link in the example's 

    C2000 linker => file search path tab 

    "${INSTALLROOT_F2802x_V200}/F2802x_common/cmd/F2802x_generic_flash.cmd"