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.

CCS/CC2640R2F: CCS Cloud optimisation level

Part Number: CC2640R2F
Other Parts Discussed in Thread: CCSTUDIO

Tool/software: Code Composer Studio

Hi,

Is there any way that I can set the optimisation level to 0 in CCS Cloud?

I am working with the CC2640R2F LAUNCHPAD and have developed a bunch of code in CCS desktop. I am now trying to port over working code to CCS Cloud but every time that I hit an issue it is practically impossible to debug it.

I am doing this in preparation for BLE workshops and, if I can't understand what is going on, workshop attendees have no hope. The issues are simple - you often cannot set breakpoints on the desired line of code on screen (previously discussed this in this forum) and, worse, if you can set a breakpoint, single stepping from then on does not step on what you are seeing on screen. This means that you cannot even monitor the value of a variable as you single step - it might have already been set or, in actuality, it gets set on some unrelated line of code.

I have tried editing the hidden .cproject file but I can't save it as it is read only. I understand your policy of not allowing project level changes in CCS Cloud but the tool is unusable if you can't turn optimisation off. Can you make Level 0 the default?

Please help - I have workshops dependent on getting a workable environment up and running.

Kind regards,

ac

  • Hello Andrew,
    Unfortunately it is not yet possible to modify the project build options in CCS cloud.

    As for the default optimization level - new ARM projects in CCS cloud are created with the -g option for debug and no -o option, hence there would be no optimization enabled. Is that not the case for your projects?

    Thanks
    ki
  • Hi Ki-Soo,

    Thank you for your response.

    >> As for the default optimization level - new ARM projects in CCS cloud are created with the -g option for debug and no -o option, hence there would be no optimization enabled. Is that not the case for your projects?

    The project is ProjectZero - I am modifying that with code ported over from CCS Desktop. It is running with Level 4 optimisation.

    When you say "new projects in CC Cloud.." I guess that this does not cover ProjectZero since it is not a "new project?" If so, can you turn off optimisation for ProjectZero centrally? It makes no sense having a project designed for learning purposes to be running at Level 4 optimisation.

    Kind regards,
    ac
  • Heere is the opt level statement in .cproject:

    <option id="com.ti.ccstudio.buildDefinitions.TMS470_16.9.compilerID.OPT_LEVEL.155836749" name="Optimization level (--opt_level, -O)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_16.9.compilerID.OPT_LEVEL" useByScannerDiscovery="false" value="com.ti.ccstudio.buildDefinitions.TMS470_16.9.compilerID.OPT_LEVEL.4" valueType="enumerated"/>

    ac
  • Andrew Coad said:
    When you say "new projects in CC Cloud.." I guess that this does not cover ProjectZero since it is not a "new project?"

    Yes that is correct. Imported projects would use what settings were originally there. If it originally had -o4 explicitly set, then that would be fully optimized code.

    Andrew Coad said:
    If so, can you turn off optimisation for ProjectZero centrally?

    There is no way to modify options for projects in cloud.

    Andrew Coad said:
    It makes no sense having a project designed for learning purposes to be running at Level 4 optimisation.

    yes I would agree. The project is provided by the SDK so the people who support the SDK need to modify the example project with the correct build options.

    Which project zero are you using? Are you using the "empty" project as mentioned in the link below?

    http://dev.ti.com/tirex/#/?link=Software%2FSimpleLink%20CC2640R2%20SDK%2FSimpleLink%20Academy%2FLabs%2FTI%20Drivers%2FProject%20Zero

    Thanks

    ki

  • Hi Soo-Ki,

    Thank you for your reply.  The project that I am using I picked up from here:

    To get it into CCS Desktop I downloaded the project from above location then imported it using the CCS Project import wizard. For CCS Cloud I directly imported it from the location above (clicked on the project then clicked on the Import to CCS Cloud button in the top right corner.

    Kind regards,

    AC

  • Ok... yep that project has -o4 explicitly enabled. And you can't change it in cloud. The folks who create simplelink academy would need to provide a projectspec that does not have optimization enabled to allow for a good debug experience
  • Hi Ki-Soo,

    I'd like to know if this ticket can be closed. Have the simple link acedemy folks got this change on their radar? Is there anything I need to do to move it along?

    Regards,
    ac
  • Hello Andrew,
    I spoke to the developers of the SimpleLink Academy and they are already working (in general) to address this. The examples for the newer CC26x2 and CC13x2 devices are already available with a lower optimization setting (-o2). Regarding the example for CC2640R2, there is no immediate plans to fix this since there are no immediate plans to release an updated SDK for it. But the request is under consideration for the future.

    Thanks
    ki
  • Hi Ki,

    Thanks for your response. Can you recommend the quickest/least effort way of getting out of this situation? I have considerable code added to Project_Zero which I need to retain. Also, the example code is Project_Zero is very useful for students to look at.

    If I port all of the code to Project_Zero CCS Desktop then upload that to github then import that into CCS Cloud, will the compiler settings carry through?

    Alternatively, is there any other project that I can import into CCS Cloud that has optimsation turned off, trash all the code and copy over the entire Project_Zero code?

    I'm asking for your advice here as I don't want to go down blind alleys and waste my time.

    Kind regards,
    ac
  • One option is to download your custom Project Zero, that is in cloud, to your desktop and then import it to desktop CCS. Then you can use CCS to change the optimization level and then import the project back to cloud. Your changes should carry through. One limitation is that if the project has any pre/post build steps, the project will not be able to be built in cloud. So be sure to remove any such steps before importing to cloud

    Thanks

    ki