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/LAUNCHXL-CC1352R1: ble5_simple_peripheral_oad_offchip example - all files linked

Part Number: LAUNCHXL-CC1352R1

Tool/software: Code Composer Studio

I'm trying to understand this particular example code (ble5_simple_peripheral_oad_offchip). For some reason, almost all the files in this example (when importing to ccs from resource explorer) are linked to the SDK folder. Its kind of frustrating since any changes I make to the files permanently alter the originals and I cant just delete and reimport like the other examples.

Is there some logic behind linking the files in the example as opposed to copying them like almost all the other examples?

When I try and copy the files individually and remove the link, it creates all kinds of havoc in the linker. I'm hoping this example was just released prematurely?

  • Hello,

    I have reported this inconsistency to our R&D team, hopefully it will be resolved in the next quarterly release.

    I can say that this example is not a premature release and has been fully tested, instead it is likely that the developer of this application was not aware of the link vs copy mechanism. I will make this clear in my report.

    To unblock you in the meantime, I have provided a sample version of the application's projectspec file that will copy certain files into the workspace.  Please modify it as you see fit. The general rule is that if you copy header files in to the workspace, then the workspace must be added to the include paths in the project. In CCS you can do this like: ${PROJECT_LOC}/Application which  for example would add the folder titled "Application" to the workspace.

    /cfs-file/__key/communityserver-discussions-components-files/538/ble5_5F00_simple_5F00_peripheral_5F00_oad_5F00_offchip_5F00_cc13x2r1lp_5F00_app.projectspec

  • The ble project_zero also has some folders linked. I'm sure the other ble examples also suffer from this linking vs copying.

    They're also missing readmes. I don't need a full formatted document, just a quick synopsis. Even some sort of "useful" comments in the source files would help.

    Thanks.

  • Hi,

    The attached file should serve as a reference for copy vs. import.

    I would say that not all files should be copied into the workspace, some such as ICall, OSAL, etc are common code and not intended to be modified, however; I would agree that any application code should be copied into the workspace.

    In the CC13x2 installer I also have not been able to observe any missing readmes in the ble5stack folder., if there are any examples missing readmes, please post them so that we can report this issue as well.
  • My personal opinion (I obviously don't speak for everyone, but I am struggling with the web of complexities in these examples, so I cant be alone) is that any code presented in CCS should live in the workspace so that any changes (either intentional or accidental) don't corrupt other examples, or future re-importing of the examples.

    ICall, OSAL, etc shouldn't need to be edited, but then they should be somehow locked, hidden, or a giant warning in the file should indicate that this is editing the "only copy" of the SDK file, and not the local file. Maybe that should be inherently obvious (it is for me now after struggling with it), but its an added complexity to an already difficult and convoluted set of examples.

    Take the project_zero example. The ble_user_config.c/h files live in the linked ICallBLE folder. Just the name of those files alone indicate user editable. I was trying to integrate the DMM code which appeared to require setting a couple lines in bleStackConfig. Things broke elsewhere and I decided to start from scratch and realized I have no idea if the freshly imported project_zero code was "clean" or if I had monkeyed with something in one of those other linked files. I had to figure out how to reinstall the SDK, which itself was not entirely obvious.

    The fact that the ICallBLE folder is virtual in itself is confusing because the 2 other files linked in that virtual folder do not live in the same SDK folder, so I cant just copy the ble_user_config.c/h into the local ICallBLE folder without setting off a whole chain of compiler/linker issues.

    Virtual folders and linked files certainly serve a purpose, but I think they are doing far more damage and confusion by having them in the examples.

    Pretty much all of the ble5stack examples in v2.10.00.48 are missing readmes, at least in resource explorer.
  • Yes I agree that it is confusing. For example, icall.c,h should not be edited, but ble_user_config should be.

    I will take your feedback to the R&D team.Also I am confirming that the readmes do not appear in resource explorer, but they are in the SDK.
    I am not sure why they do not appear in resource explorer, but I will report this issue as well.
  • Sorry, I feel like I may be splitting hairs here... if the file is in project explorer in CCS, the user can edit the file. Whether they should or not is a different story. My point was that, unless there is some other mechanism to prevent the file from being edited at all, it should be copied, not linked. That way if someone does accidentally edit the file (even if they are not "supposed to"), they dont create a bigger headache that what is confined to the workspace, and easily replaced from the original SDK files by a simple delete and re-import.
  • I understand and see the value in your point. This is valuable feedback, thank you.

    Would you agree that ICall, OSAL, etc should be provided as libraries? So in the project they would be linked as libraries and thus not in project at all? The source code can still be provided as it is today (and a method to rebuild the libs for power users perhaps), but with the library approach, it would cut the number of files the user needs to dig through to use the stack.
  • Yeah, linked as a library (i.e. in the compiler/linker sense) would be the most logical. You’d have to pull out the user editable files and deal with the different requirements for each example. Or have one big library that includes all.

    I’m not quite sure why they weren’t in the stack library already.

    I’ll be honest that the linked project stack (or in the other examples, the linked tirtos project) are a bit confusing, but they just work, so I haven’t looked too deep into them.
  • Thanks for your feedback and for chatting about how to make our applications more user friendly.
    It is heard loud and clear on our end. I will make a report to the R&D team.
  • Another example file that appears to contain code that should be edited is oad_image_header_app.c

    #define SOFTWARE_VER            {'0', '0', '0', '1'}

    (that's from the project_zero example) If you wrap these files in a library, you might want to move that declaration out to another file.

  • Thanks for the suggestion, I agree with you!

    OAD will always be provided in source, we encourage customers to modify this for their needs. Ours is simply a reference design, similar to the applications themselves.