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.

Issue with debug build of CSL_USB_CdcExample v2.50.00

Hi all,

                I tried to use the sample CCL USB sample program “C55 Low Power Chip Support Library v2.50.00\c55xx_csl\ccs_v4.0_examples\usb\CSL_USB_CdcExample”. The release build of this project works fine i.e. the device got recognized as a virtual com port and communication between the host PC and EVM is established.

But the debug build of the project is not working. I am getting the windows prompt ‘USB Device not recognized’. 

Analysis done:  I checked out the difference between release build and debug build.

Optimization level of CSL_USB_CdcExample\Release is 2 and optimization of cslVC5505\Release (library  for CSL_USB_CdcExample) is 3.

Optimization is off in case of debug build.

So tried the debug build with optimization levels as defined for release build and it worked fine. Issue is regarding optimization, and the code works fine only if optimization is ON.

CCS version  4.1.0.02002, CGS version - TI v4.3.2, DSP/BIOS - 5.41.00.06

1)Could anyone please explain how to solve this issue. I need to work the CCL USB sample program for both release build and debug build. ?

2)Is there any way to turn off optimization of a function alone ?

 Thanks in advance

  • Hi, 

    All settings should be the same for release and debug.

    Regarding your tools, the Release notes mention on page 20 that it is recommended to use CCS v4.1.2, CG v 4.3.6, and DSP/BIOS v5.41.02.14 or later. There are some issues with the previous versions. 

  • But the release build works fine with above mentioned settings. Problem is with debug build. 

    Also "All settings should be the same for release and debug" statement is not correct. Both build should differ(atleast in terms of optimization level).

    This is the sample project from TI. The project itself shows difference in the settings of debug and release build. And here the problem is with optimization level.

    Code works fine only if optimization of debug is same as that of release build. Any suggestion of this type of behavior. 

    1)Could anyone please explain how to solve this issue. I need to work the CCL USB sample program for both release build and debug build. ?

    2)Is there any way to turn off optimization of a function alone ?

  • The only way that I am aware of to turn off the optimization is by changing the settings and clearing the optimizations level. You're right, the optimization settings are the only thing to differ between builds. 

    The example has been tested without optimizations in debug mode and it worked correctly. Have you updated all of the tools you are using as suggested?

  • Hi,

    CSL CDC example works with CCS environment suggested in CSL release notes.

    You cannot disable optimization level for a function but you can do at file level. Right click on the file in CCS project Window and select 'Properties' which will open build settings for that file. In the 'C/C++ Build Window' Look for 'Tool Settings->C5500 Compiler->Basic Options' You can change the optimization by changing the filed 'Optimization Level'. You can move all the function which needs different optimization level to one file and set the optimization as needed.

    Regards,

    Pratap

  • Hi,

         Could you provide the CSL CDC example that worked when debug mode is selected(i.e with optimization off).

    Also for release build the CGS version used was - 4.3.2 and DSP BIOS version was - 5.41.00.06 and it worked. So these versions should also work for debug mode, right ?