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.

Usage of the Chip Support Library on C55x DSP



All:

I have seen an established practice of including ONLY the CSL modules to support the peripherals being used on a particular DSP. For instance, if it is not planned to use the USB on a part, I do not see a reason for including the csl_usb.c module or any of the CSL modules associated with USB. This means that overall, the amount of program space being occupied by CSL for a particular product application would be reduced, sometimes drastically.

If a particular function (say I2S or UART) needs to be added at some point, then copying the associated CSL module into the directory would be done.

I would like to know if anyone has seen any problems with this method of development...

 

  • Todd,

    I can't foresee any issues with this approach as it would not make logical sense to include peripheral driver code for a peripheral that you do not plan to use in your application.

  • Michael S said:

    Todd,

    I can't foresee any issues with this approach as it would not make logical sense to include peripheral driver code for a peripheral that you do not plan to use in your application.

    Does this mean the linker is not smart enough to leave out unused functions/modules in the final binary file?

  • If you don't use any functions from a particular element (*.obj) of the CSL library archive, the linker won't include that *.obj element in the final .out file it produces.

    Furthermore, you can use the compiler option:

    "Place each function ina separate subsection" (--gen_funcsubsections or -mo)

    when building the CSL library and when building your project.  This will allow the linker to ignore and not include specfic functions that are not being called.  For example if in csl_dma.c, you never call the function DMA_getConfig( ), that function will not take up memory space in your final .out file.

    -Shawn

  • Thanks for the clear answer Shawn!