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.

TMS320F28388D: Rebuild driverlib_cm for specific project

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE

Hi there,

I'm working on a project for the F28388D CM core. I used one of the driverlib_cm examples as a starting point, so the project includes a reference (linked resource) to driverlib_cm.lib.

In the project there's also a \device folder containing driverlib_cm.h, together with another subfolder \driverlib_cm (excluded from build) containing driverlib_cm source and header files.




Question 1:
Why is this last folder (driverlib_cm *.c and *.h files) included in the project? Wouldn't the project only need the driverlib_cm.lib file and a path to the associated *.h files?


Then in driverlib_cm's sysctl.h there is a definition for the CM clock frequency CM_CLK_FREQ. This definition is used elsewhere in the library for I2C, SSI, and UART calculations. So if the actual CM clock frequency (as set by CPU1) is different, then I need to rebuild the driverlib_cm.lib library.

Question 2:
How do I rebuild driverlib_cm.lib for my project? Please note I don't want to rebuild the lib in the C2000WARE installation folder because another CM project may use a different clock frequency.
Should I use the driverlib_cm source files in the project's \device\driverlib_cm\ folder, and build a project-specific driverlib_cm.lib? Then I would use the local project's driverlib_cm.lib instead of the linked resource in C2000WARE. My only concern then would be to handle updates manually when a new C2000WARE version is released.


I would like to know the recommended working method for such a situation. I can imagine there are more cases where a project-customized driverlib would be needed.

Thanks and kind regards,
Arjan


  • Hi, 

    Please find responses to your question below

    1. You are correct, only need the driverlib_cm.lib file and the associated header files are needed. The last folder "driverlib_cm" is excluded from the build , it can be used only to refer/see the driverlib code. 

    2. You can rebuild the driverlib_cm.lib by importing the project from the C:\ti\c2000\C2000Ware_4_01_00_00\driverlib\f2838x\driverlib_cm folder into CCS and change the output file path by right clicking on the Project -> Properties -> Build.  You can specify a path for the output file and then link the rebuilt lib in your project.

    Best Regards

    Siddharth

  • Hi Siddharth,

    Thanks for your feedback. Importing the driverlib_cm project from C2000WARE didn't quite work because the projectspec defines "link" instead of "copy". But after manually copying the folder into a project it worked fine.

    I'm now using different Build Configurations for the different clock settings, defining CM_CLK_FREQ in the compiler's Predefined Symbols, and using different output file names.

    Thanks and kind regards,
    Arjan