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.

CC2642R: Simple_Peripheral Example Project Issues

Part Number: CC2642R

Open CCS 9.0.1.00004, import project simple_peripheral_app_CC26X2R1_LAUNCHXL_tirtos_ccs into the workspace from simplelink_cc13x2_26x2_sdk_3_10_00_53 SDK, "Build Project"...

>> Compilation failure
Build of libraries failed.
subdir_rules.mk:12: recipe for target 'build-295672945-inproc' failed
"C:/ti/simplelink_cc13x2_26x2_sdk_3_10_00_53/source/ti/devices/DeviceFamily.h", line 173: fatal error: #error directive: "DeviceFamily_XYZ undefined. You must define a DeviceFamily_XYZ!"
1 catastrophic error detected in the compilation of "C:/ti/simplelink_cc13x2_26x2_sdk_3_10_00_53/kernel/tirtos/packages/ti/sysbios/family/arm/cc26xx/Boot.c".
Compilation terminated.

Why doesn't the example work right out of the box?

Also, the reason I was loading this project in the first place was to see the changes that version 3.10.00.53 of the SDK made from 2.30.00.34 to simple_peripheral.c/h and simple_gatt_profile.c/h, as our project is based off those as an example.  Except I can't find simple_gatt_profile.c/h anymore, and neither can CCS: trying to F3 to "Open Declaration" of

  SimpleProfile_AddService(GATT_ALL_SERVICES); // Simple GATT Profile

gives an error:

Could not find symbol 'SimpleProfile_AddService' in index

What happened to it?  I know the stack is in ROM now, but surely the source file for the example service with all the example characteristic declarations isn't part of that and is still around for modification, right?

  • simplelink_cc13x2_26x2_sdk_3_10_00_53 SDK only works on rev.E chip. If you use rev.C chip, you should keep using SDK 2.30.00.34.
  • Hi Chris,

    I will assign this to the SW experts in the BLE team. Right off the bat it looks like the issue stems from mixing up the 2 SDKs somehow. Did you run a clean install of the new SDK as well as opening the project in a new clean workspace?

    Regards,
    Fredrik
  • Clean install of the new SDK, yes.  It was not, however, a new clean workspace. I imported the simple_peripheral project into the same workspace that I also had our application project in.  Is that not okay? I wasn't aware of any workspace settings that would influence anything; I thought that was all handled at the project level.

    Also, are you saying I should be able to find simple_gatt_profile.c/h as well?

  • Hi Chris,
    You should be able to find simple_gatt_profile.c/h. Which OS installer did you use? (Mac/Linux/Win).

    Assigning one of the experts to look into the details. Meanwhile, please review this: e2e.ti.com/.../767769
  • Windows.

    As for the silicon, it is Rev E; but that would have been irrelevant anyway because finding source files and being able to compile them comes way before connecting any hardware.

  • Hi Chris,

    You should be able to import simple_peripheral project into a CCS workspace that contains other projects as long at it does not conatain other versions of simple_peripheral. (Is your application project based on simple peripheral?)

    From the error message it seems like something is wrong with the project predefines (fatal error: #error directive: "DeviceFamily_XYZ undefined. You must define a DeviceFamily_XYZ!") . The Device family is normally found in the compiler predefined symbols list, which is copied from the .projectspec file when you import your project to CCS.

    1) Please make sure you only have one version of simple_peripheral in your workspace
    2) Please make sure you don't have a blank space in the workspace name.
    3) Please make sure the projectspec file has not been changed (C:\ti\simplelink_cc13x2_26x2_sdk_3_10_01_03\examples\rtos\CC26X2R1_LAUNCHXL\ble5stack\simple_peripheral\tirtos\ccs\simple_peripheral_app_CC26X2R1_LAUNCHXL_tirtos_ccs.projectspec )
  • Well, I think CCS might just be schizophrenic. Even though they never showed up in the project's Profiles folder when I imported it, I had found the simple_gatt_profile.c/h files in the SDK through Windows File Explorer, and decided to give up on getting the project to compile, because that wasn't really my end goal anyway. I deleted the project.

    So then, I'm making changes to our custom profile/service based on changes to the SDK, and I was having issues (which I've detailed in a new ticket here: e2e.ti.com/.../804169) with the C/C++ Search function not finding function calls in files I know are part of the project, and I wondered if that was related to my issues getting the example project to work.

    So, I re-imported simple_peripheral right back into the same workspace I had just recently deleted it from, and this time everything worked fine. simple_gatt_profile.c/h were part of the project, I found everything I was looking for, and it compiled with no issues. So I have no idea what happened the first time. I didn't do anything differently the second time. So, I guess it works now? Would love to know what happened the first time.
  • Chris Hunt said:
    So I have no idea what happened the first time. I didn't do anything differently the second time. So, I guess it works now? Would love to know what happened the first time.

    I would also like to know what happened since I am curious myself. I also imported the same project and it built without error. It could be that there was some failure or corruption with the import that first time. Things like that do happen from time to time, usually due to workspace corruption and other related issues.

    If it happens again, please provide the eclipse logs.

    Thanks

    ki