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.

Recommendations for portable BLE application/project configuration?

Other Parts Discussed in Thread: CC2650, CC2640R2F-Q1, CC2540T, CC2640, CC2640R2F

We have a BLE Peripheral Application we would like to target at multiple TI chips (cc2540T, cc2650, cc2640R2F-Q1) to meet different power, temperature & qualification constraints.

So far we have experimented by just manually copying our application source over the simple_peripheral examples in the cc4540T & cc2650 SDK source trees and using the existing SDK project definitions to build. (We have created a shim to hide the Stack API differences).

We now want to create project definition(s) so that we can place our source in a separate directory and build against any of these TI stacks/chips. Our initial goal is to build against the cc2650 & cc2640R2F-Q1 stacks as they at least share the arm/CCS toolchain. Are there any guidelines for modifying a project definition to achieve this goal?

I have embarked on copying and modifying the example project definition so that it refers to SDK resources via an single environment variable but I got as far as this error when building:-

Can't find import file: '../../../../../src/common/cc26xx/kernel/cc2640/config/cc2640.cfg' (not found along ...)

and decided I should ask for advice before digging any deeper in this direction!

  • Erratum: "So far we have experimented by just manually copying our application source over the simple_peripheral examples in the cc4540T & cc2650 SDK source trees" should have read: "So far we have experimented by just manually copying our application source over the simple_peripheral examples in the cc2640RF & cc2650 SDK source trees". We have not tried porting to the cc2540T yet.
  • Hello John,

    We provide a porting / migration guide for each SDK release, either posted to the BLE wiki or included in the SDK. The respective release notes will have more details. All of our released SDKs (excluding the BLE5 EVAL SDK) share a common set of APIs but there are some structural differences that require you to migrate your application. I suggest starting with the migration guides that correspond to SDKs that you are using.

    Best wishes
  • JXS,

    I was not clear: We have already made our application source portable and it runs on both cc2640R2F & cc2650 using an abstraction layer that hides target differences.

    What I am struggling with here is how to modify the project definitions so that we can check our own source and project definitions into one directory and build that against multiple (unmodified) TI Stacks/SDKs checked out into their own directories. So far I have been checking out our sources over the top of the simple_peripheral sources in the SDK trees and building them using the example simple_peripheral project configurations. This is not a satisfactory solution going forward.

    A specific example: In my efforts to modify our copy of the cc2650 project to build against a TI SDK in another directory, I have defined "TI_BLE_SDK_2_2_1_DIR" in the environment to point to the SDK directory and replaced this line in app_ble.cfg:-

        utils.importFile("../../../../../src/common/cc26xx/kernel/cc2640/config/cc2640.cfg");

    With this:-

        var sdkPath = String(java.lang.System.getenv("TI_BLE_SDK_2_2_1_DIR")).trim();
        utils.importFile("src/common/cc26xx/kernel/cc2640/config/cc2640.cfg", sdkPath);

    This builds fine. However, my initial attempt to use this environment variable in the "Path Variables" results in "Invalid Location" for the Linked Resources (See TI_SDK_DIR variable below):-

    I can certainly keep digging in this hole but first wanted to ask if there was "a better way" to organise and define portable _projects_ that will build against multiple TI Stacks?

    /John

  • Hi John,

    Unfortunately, such an approach was not a design consideration as there were changes to the project file structure. It's good that you have designed your code to be portable, but I don't see an way to 'commonize' the project / workspace structure. I believe what you are seeing with Linked Resources is a chicken/egg scenario where the prebuild is expecting these args to be in place before the RTOS cfg file is parsed.

    Best wishes
  • > I don't see an way to 'commonize' the project / workspace structure

    Having separate projects for different targets is acceptable, indeed it is unavoidable for cc2540T/IAR, but having hard-coded absolute paths (to SDK, RTOS, Tools) in the project is not acceptable because this prevents C.I. builds. How do you configure these projects for C.I. at TI? I am now thinking that it would be best to check out all the related resources into a common build root directory and then use relative paths in each of the separate project definitions.

    /John

    (P.S. Are you also saying that having multiple projects in a common CCS workspace would also be a problem for some reason?)