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.

CC2340R5: Several missing files in CC2340R5 code base

Part Number: CC2340R5
Other Parts Discussed in Thread: CC2640R2F, SYSBIOS, CC2640

Hi TI members,

Below is my building environment:

Software

Version

Code Composer Studio

12.3.0.00005 

SimpleLink SDK

7.10.00.35

XDCtools

3.62.1.16_core

We are working on migrating an old project from CC2640R2F to CC2340R5.

I found a function called "DevInfo_AddService()" originated from PROFILES/devinfoservice.c.

I'm not sure if this file is originally generated by SDK or user-defined?

Plus, I also found some functions under PROFILES/simple_stream_profile_server.c, but still not sure where did this file come from?

Another one is C:\ti\simplelink_cc2640r2_sdk_3_40_00_10\kernel\tirtos\packages\ti\sysbios\knl\Task.h, I have some functions defined in it, but I didn't find "Task.h" in CC22340R5 sample codebase.

Furthermore, in Task.h, it would also called a header file "xdc/std.h", and std.h called "ti/targets/select.h".

But "ti/targets/select.h" could only be found in C:\ti\simplelink_cc2640r2_sdk_3_40_00_10\kernel\tirtos\packages\ti\targets\select.h. I didn't find any similar file under SimpleLink SDK 7.10.00.35 's path.

Please help us clarify how to use/find these functions in CC2340 codebase.

Thanks.

BR,

  • Hello,

    Both functions (addService and simple_stream) are part of profiles and not part of the base. When you create a custom profile you add these functions. For example in the basic_ble profile the addservice function can be found inside common->profiles->  simple_gatt_profile.c.

    I wouldnt worry too much about finding the specific task.h file as the framework between the cc2340 and cc2640 have changed a bit. What did this file do for your project?

    Kind Regards,

    Rogelio

  • Hi,

    1. I thought I might have to find those files since I would like to keep the behavior in our old CC2640R2F projects the same as the newly created CC2340R5 project.

    While I migrated these functions into CC2340R5, CCS reported that there's reference missing issue.

    And I found originally in CC2640R2F, it used PROFILES/devinfoservice.c to define this function.

    Shall I define DevInfo_AddService in some newly generated files on my own under common/profiles/ ?

    2. What shall I do to "create a custom profile" in CCS?

    Thanks.

    BR,

  • Hello,

    A good reference to create a custom profile would be the cc26xx SLA 

    https://dev.ti.com/tirex/content/simplelink_academy_cc13xx_cc26xxsdk_6_40_00_00/modules/ble5stack/ble_01_custom_profile/ble_01_custom_profile.html

    The workshop is still being created for the cc23xx but a lot of the information is the same. What I would focus on your migration would not be trying to migrate functions but instead try to recreate the functionality of your application with the new framework. May I ask what example is your project based on and what it acheives?

    Kind Regards,

    Rogelio

  • Hi,

    Our resigned colleagues developed the old CC2640R2F project based on simple serial socket server project.

    But currently I'm not completely sure of how the framework has changed between cc2640 to cc2340.

    So it's pretty hard for me to simply "recreate the functionality of your application with the new framework".

    For example, the function "DevInfo_AddService()" seemed to register a service via GATT.

    It was from PROFILES/devinfoservice.c, but in basic_ble sample project there's even no PROFILES/ folder.

    So I'm confused if I shall create the sample file like CC2640R2F did or has this function been moved to somewhere else?

    Thanks.

    BR,

  • Hi YW,

    I agree adjusting to the new framework will take some work, but overall the new framework is to ease development of new projects. 

    An example of adding a service is currently found in the Basic_ble example in the 7.10 SDK I would also look into the data_stream example as that example has a custom profile that transmits UART data over BLE very similar to the simple_serial_socket examples.

    Inside the app->profiles->app_dev_info.c

    Kind Regards,

    Rogelio

  • Hi,

    1. Do you recommend creating a new project based on data stream or simply include the file containing the "DevInfo_addService" function?

    2. How about the "SimpleSerialSocketServer_createTask" ?

    It would be using struct "Task_Params", which was defined in C:\ti\simplelink_cc2640r2_sdk_3_40_00_10\kernel\tirtos\packages\ti\sysbios\knl\Task.h.

    How has this function been migrated in the new framework?

    Thanks.

    BR,

  • Hello,

    I do believe using the data stream example could give you a head start rather than just the bare bones basic_ble project.

    The new framework now only uses FreeRTOS to create tasks, we have a good example on creating a task in the basic ble SLA.

    https://dev.ti.com/tirex/explore/node?node=A__AFoqdUGZLKAbxTCpmdnABw__SIMPLELINK-ACADEMY-CC23XX__gsUPh5j__LATEST

    Under the Merge Drivers Section

    Kind Regards,

    Rogelio