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: BMI160 Driver project problem with SysConfig

Part Number: CC2640R2F
Other Parts Discussed in Thread: SYSCONFIG, SIMPLELINK-CC2640R2-SDK, SIMPLELINK-SDK-SENSOR-ACTUATOR-PLUGIN, CCSTUDIO, CC2650

Tool/software: Code Composer Studio

Hi,

Im trying to get data from the accelerometer and therefore I want to execute the BMI160 driver project example found here: https://dev.ti.com/tirex/explore/node?node=AMPZwhcXEncNjJVb5vLaCQ__swcUKHN__LATEST 

However I get the following error:

>> Compilation failure

subdir_rules.mk:7: recipe for target 'main_tirtos.obj' failed

"../main_tirtos.c", line 46: fatal error #1965: cannot open source file "ti_drivers_config.h"

1 catastrophic error detected in the compilation of "../main_tirtos.c".

Compilation terminated.

gmake: *** [main_tirtos.obj] Error 1

gmake: Target 'all' not remade because of errors.

**** Build Finished ****

When I check the SysConfig(.syscfg) file that cames with the project it throws the following error:

TypeError: Cannot read property 'subComponents' of undefined

at eval (/Users/user/workspace_v10/i2cbmi160_CC2640R2_LAUNCHXL_tirtos_ccs/i2cbmi160.syscfg:57:50)

at s.runAsUserScript (file:///Applications/ti/ccs1010/ccs/utils/sysconfig_1.5.0/dist/ui.js:44:343417)
at Object.t.withDeprecatedAccess (file:///Applications/ti/ccs1010/ccs/utils/sysconfig_1.5.0/dist/ui.js:34:244623)
at Object.t.runAsUserScript (file:///Applications/ti/ccs1010/ccs/utils/sysconfig_1.5.0/dist/ui.js:27:53994)
at r.each.e (file:///Applications/ti/ccs1010/ccs/utils/sysconfig_1.5.0/dist/ui.js:44:343397)
at Kt (file:///Applications/ti/ccs1010/ccs/utils/sysconfig_1.5.0/dist/ui.js:9:5239)
at Function.Ho (file:///Applications/ti/ccs1010/ccs/utils/sysconfig_1.5.0/dist/ui.js:9:40286)
at Object.t.runScript (file:///Applications/ti/ccs1010/ccs/utils/sysconfig_1.5.0/dist/ui.js:44:343309) at <anonymous> 

Im currently working in a MAC.

What is the SysConfig error related to?

  • Hi Thomas,

    You are probably using a newer version of SysConfig (v1.5) than the example code is expecting (v1.4).  Please use SIMPLELINK-CC2640R2-SDK v3.30, CCSTUDIO v9.20, and XDCTools v3.60.00.24 as recommended in the SIMPLELINK-SDK-SENSOR-ACTUATOR-PLUGIN Release Notes: https://dev.ti.com/tirex/explore/node?node=ADJoUdua.cgVWmEDAYiK0w__swcUKHN__LATEST 

    Regards,
    Ryan

  • Hi,

    Thanks for your reply. Isn't there any actualised Example of how to integrate the BMI160 into the CC2640R2?

    I have numerous projects in my CCS and I don't want to reinstall all, only to run this downgraded example.

    Extra: Im trying to set the pins correctly with the Board file(the equivalent from "ti_drivers_config.h" f) but im getting Linking problems of the type...

     undefined              first referenced                                                                                                                      

      symbol                    in file                                                                                                                           

     ---------              ----------------  

    ...Is there a recommended strategy to approach this king of problems?

  • Hi Thomas,

    You can copy/paste the parts of the application code from the example required to interface with the BMI160 through I2C.  I wouldn't expect you would have to reinstall all other projects when downloading/installing separate CCS/SDK/XDCTools versions.  You won't be able to modify ti_drivers_config.h if using a SysConfig project.  Here is a SimpleLink Academy Lab you can reference or perhaps the Custom Hardware section of the BLE User's Guide would help. 

    Regards,
    Ryan

  • Hi Ryan,

    Thanks again for your attention.

    I was integrating the BMI160 application code into the simple_peripheral by copy/paste. I modified the PINs(SCL, SDA (and the interrupt CONFIG_GPIO_BMI160_INT1 --> DIO22 ??)) in the Board.h file and then got stuck in a display Linking error:

    <Linking> 

     undefined first referenced

      symbol       in file     

     --------- ----------------

     display   <whole-program> 

     

    error #10234-D: unresolved symbols remain

    error #10010: errors encountered during linking; "simple_peripheral_cc2640r2lp_app.out" not built

    gmake[1]: *** [simple_peripheral_cc2640r2lp_app.out] Error 1

    I will give it a try to the installation of the older versions that you suggested. However it would be really helpful if you could explain the origin of this error :)

    Thanks in advance.

    Thomas

  • What specific symbol and in which file?  This typically occurs if there is a missing library/command file not included in the Project Properties -> Build -> ARM Linker -> File Search Path.  You can do a diff compare of the BMI160 and Simple Peripheral examples to see if there are any differences.

    Regards,
    Ryan

  • Hi Ryan,

    I followed your instructions from your first post. I installed the recommended versions with exception of the XDCTools v3.60.00.24 because I didn't found it , but the XDCTools 3.61.00.16 yes, which I installed.

    Unfortunately it didn't work. It keep asking me for the "ti_drivers_config.h" file :

    >> Compilation failure

    subdir_rules.mk:7: recipe for target 'main_tirtos.obj' failed

    "../main_tirtos.c", line 46: fatal error #1965: cannot open source file "ti_drivers_config.h"

    1 catastrophic error detected in the compilation of "../main_tirtos.c".

    Compilation terminated.

    gmake: *** [main_tirtos.obj] Error 1

    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****

    So I checked the .syscfg file and it generates the files Board.h and Board.c . So I changed the imports to Board.h instead of ti_drivers_config.h(which by the way seems that it is only generated for other board versions, but not CC2640R2) and the following error came:

    <Linking>

    error #10008-D: cannot find file "/Applications/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/drivers/pdm/lib/pdm_cc26x0r2.aem3"

    error #10010: errors encountered during linking; "i2cbmi160_CC2640R2_LAUNCHXL_tirtos_ccs.out" not built

     

    >> Compilation failure

    makefile:153: recipe for target 'i2cbmi160_CC2640R2_LAUNCHXL_tirtos_ccs.out' failed

    gmake[1]: *** [i2cbmi160_CC2640R2_LAUNCHXL_tirtos_ccs.out] Error 1

    gmake: *** [all] Error 2

    makefile:146: recipe for target 'all' failed

    **** Build Finished ****

    I navigated to the give path and I found out that the /lib/pdm_cc26x0r2.aem3 part is missing, i.e. no lib folder and consequently neither pdm_cc26x0r2.aem3 file. I don't know why it is missing and how to solve it.

    Then I went back to the step where I was on the previous reply, that is integrating the BMI160 example to simple peripheral and did a diff compare of the File Search Paths and as it happens all of the paths from the BMI example were missing. I added them except for one of them... the one that gave me the previous error: ...lib/pdm_cc26x0r2.aem3

    This was not present either in the SDK 4.20 used in the CCS 10.0

    After all the "display" error remained:

    Building target: "simple_peripheral_cc2640r2lp_app.out"

    Invoking: ARM Linker

    "/Applications/ti/ti-cgt-arm_18.12.6.LTS/bin/armcl" --cmd_file="/Users/user/ti/simplelink_cc2640r2_sdk_4_20_00_04/source/ti/blestack/config/build_components.opt" --cmd_file="/Users/user/ti/simplelink_cc2640r2_sdk_4_20_00_04/source/ti/blestack/config/factory_config.opt" --cmd_file="/Users/user/workspace_v10/simple_peripheral_cc2640r2lp_stack_library/TOOLS/build_config.opt"  -mv7M3 --code_state=16 -me -O4 --opt_for_speed=1 --define=BOOSTXL_BASSENSORS --define=DeviceFamily_CC26X0R2 --define=BOARD_DISPLAY_USE_LCD=0 --define=BOARD_DISPLAY_USE_UART=1 --define=BOARD_DISPLAY_USE_UART_ANSI=1 --define=CC2640R2_LAUNCHXL --define=CC26XX --define=CC26XX_R2 --define=ICALL_EVENTS --define=ICALL_JT --define=ICALL_LITE --define=ICALL_MAX_NUM_ENTITIES=6 --define=ICALL_MAX_NUM_TASKS=3 --define=ICALL_STACK0_ADDR --define=MAX_NUM_BLE_CONNS=1 --define=POWER_SAVING --define=STACK_LIBRARY --define=USE_ICALL --define=xdc_runtime_Assert_DISABLE_ALL --define=xdc_runtime_Log_DISABLE_ALL -g --c99 --gcc --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi -z -m"simple_peripheral_cc2640r2lp_app.map" --heap_size=0 --stack_size=256 -i"/Applications/ti/ti-cgt-arm_18.12.6.LTS/lib" -i"/Applications/ti/ti-cgt-arm_18.12.6.LTS/include" --reread_libs --define=CC26X0ROM=2 --diag_suppress=16002-D --diag_suppress=10247-D --diag_suppress=10325-D --diag_suppress=10229-D --diag_suppress=16032-D --diag_wrap=off --display_error_number --warn_sections --xml_link_info="simple_peripheral_cc2640r2lp_app_linkInfo.xml" --rom_model -o "simple_peripheral_cc2640r2lp_app.out" "./Application/another_task.obj" "./Application/att_rsp.obj" "./Application/bmi160_support.obj" "./Application/i2c_protocol.obj" "./Application/simple_peripheral.obj" "./Application/spi_protocol.obj" "./Application/util.obj" "./Drivers/ECC/ECCROMCC26XX.obj" "./Drivers/RF/RFCC26XX_singleMode.obj" "./Drivers/TRNG/TRNGCC26XX.obj" "./ICall/icall.obj" "./ICall/icall_cc2650.obj" "./ICall/icall_user_config.obj" "./ICallBLE/ble_user_config.obj" "./ICallBLE/icall_api_lite.obj" "./PROFILES/devinfoservice.obj" "./PROFILES/gatt_uuid.obj" "./PROFILES/gattservapp_util.obj" "./PROFILES/peripheral.obj" "./PROFILES/simple_gatt_profile.obj" "./Startup/CC2640R2_LAUNCHXL.obj" "./Startup/CC2640R2_LAUNCHXL_fxns.obj" "./Startup/ccfg_app_ble.obj" "./Startup/main.obj" -l"/Users/user/ti/simplelink_cc2640r2_sdk_4_20_00_04/source/ti/devices/cc26x0r2/driverlib/bin/ccs/driverlib.lib" -l"configPkg/linker.cmd"  -l"/Users/user/ti/simplelink_cc2640r2_sdk_4_20_00_04/kernel/tirtos/packages/ti/dpl/lib/dpl_cc26x0r2.aem3" -l"/Users/user/ti/simplelink_cc2640r2_sdk_4_20_00_04/source/ti/drivers/lib/drivers_cc26x0r2.aem3" -l"/Users/user/ti/simplelink_cc2640r2_sdk_4_20_00_04/source/ti/grlib/lib/ccs/m3/grlib.a" -l"/Users/user/ti/simplelink_cc2640r2_sdk_4_20_00_04/source/ti/display/lib/display.aem3" -l"/Users/user/ti/sail_1_50_00_00/source/ti/sail/lib/ccs/cc26x0/sail.lib" -l"/Users/user/ti/simplelink_cc2640r2_sdk_4_20_00_04/source/ti/devices/cc26x0r2/driverlib/bin/ccs/driverlib.lib" -l"/Users/user/ti/simplelink_cc2640r2_sdk_4_20_00_04/kernel/tirtos/packages/ti/dpl/lib/dpl_cc26x0r2.aem3" -l"/Users/user/ti/simplelink_cc2640r2_sdk_4_20_00_04/source/ti/drivers/lib/drivers_cc26x0r2.aem3" -l"/Users/user/ti/simplelink_cc2640r2_sdk_4_20_00_04/source/ti/display/lib/display.aem3" -l"/Users/user/ti/simplelink_cc2640r2_sdk_4_20_00_04/source/ti/grlib/lib/ccs/m3/grlib.a" -l"/Users/user/workspace_v10/simple_peripheral_cc2640r2lp_stack_library/FlashROM_Library/ble_r2.symbols" -l"/Users/user/workspace_v10/simple_peripheral_cc2640r2lp_stack_library/FlashROM_Library/lib_linker.cmd" -l"/Users/user/workspace_v10/simple_peripheral_cc2640r2lp_stack_library/FlashROM_Library/simple_peripheral_cc2640r2lp_stack_library.lib" -l"/Users/user/ti/simplelink_cc2640r2_sdk_4_20_00_04/source/ti/blestack/common/cc26xx/ccs/cc26xx_app.cmd" -llibc.a 

    <Linking>

     undefined first referenced

      symbol       in file     

     --------- ----------------

     display   <whole-program> 

     

    error #10234-D: unresolved symbols remain

    error #10010: errors encountered during linking; "simple_peripheral_cc2640r2lp_app.out" not built

    gmake[1]: *** [simple_peripheral_cc2640r2lp_app.out] Error 1

     

    >> Compilation failure

    makefile:195: recipe for target 'simple_peripheral_cc2640r2lp_app.out' failed

    gmake: *** [all] Error 2

    makefile:188: recipe for target 'all' failed

    **** Build Finished ****

  • UPDATE:

    I solved the problem by replacing the "ti_drivers_config.h" with the Board.h(+CC2640R2_LAUNCHXL.h & .c) file. Then deleting the ARM Linker -> File Search Path:  /source/ti/drivers/pdm/lib/pdm_cc26x0r2.aem3, because I did not have this file.

    Then I add the line

    GPIO_setConfig(CONFIG_GPIO_BMI160_INT1, GPIO_CFG_IN_PU | GPIO_CFG_IN_INT_FALLING);

    around the line 350 from bmi160_support.c, before

    GPIO_setCallback(CONFIG_GPIO_BMI160_INT1, &bmi160Callback);

    to define the trigger PIN, setting CONFIG_GPIO_BMI160_INT1 to Button 1 for example(can be a clock), in order to trigger the semaphore and so display data into the terminal.

    This example has to be corrected and updated for the current versions of ALL.

    Thanks Ryan anyways for your time.

    PS: It seems that the data displayed from the BMI160 is raw and has to be calibrated.