Other Parts Discussed in Thread: SYSCONFIG
I am using simplelink_cc13x2_26x2_sdk_4_20_00_35 on CCS 10.1.0.00010 with the simple_peripheral code example. When I try to use a POSIX semaphore from semaphore.h the code compiles correctly, however fails with the linker error:
"C:/ti/ccs1010/ccs/tools/compiler/ti-cgt-arm_20.2.1.LTS/bin/armcl" --cmd_file="C:/Users/a0273777/workspace_v10/spi_expander_ble_peripheral/Debug/syscfg/ti_ble_app_config.opt" --cmd_file="C:/Users/a0273777/workspace_v10/spi_expander_ble_peripheral/Debug/syscfg/ti_build_config.opt" --cmd_file="C:/ti/simplelink_cc13x2_26x2_sdk_4_20_00_35/source/ti/ble5stack/config/build_components.opt" --cmd_file="C:/ti/simplelink_cc13x2_26x2_sdk_4_20_00_35/source/ti/ble5stack/config/factory_config.opt" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me -O4 --opt_for_speed=0 --define=DeviceFamily_CC26X2 --define=FLASH_ROM_BUILD --define=NVOCMP_NWSAMEITEM=1 -g --c99 --gcc --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi -z -m"spi_expander_ble_peripheral.map" -i"C:/ti/simplelink_cc13x2_26x2_sdk_4_20_00_35/source" -i"C:/ti/ccs1010/ccs/tools/compiler/ti-cgt-arm_20.2.1.LTS/lib" --reread_libs --define=FLASH_ROM_BUILD=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="spi_expander_ble_peripheral_linkInfo.xml" --rom_model -o "spi_expander_ble_peripheral.out" "./syscfg/ti_ble_config.obj" "./syscfg/ti_devices_config.obj" "./syscfg/ti_radio_config.obj" "./syscfg/ti_drivers_config.obj" "./Application/spi_expander.obj" "./Application/util.obj" "./Drivers/NV/crc.obj" "./Drivers/NV/nvocmp.obj" "./NPI/npi_frame_hci.obj" "./NPI/npi_rxbuf.obj" "./NPI/npi_task.obj" "./NPI/npi_tl.obj" "./NPI/npi_tl_uart.obj" "./Profiles/devinfoservice.obj" "./Profiles/gatt_uuid.obj" "./Profiles/gattservapp_util.obj" "./Profiles/spi_expander_profile.obj" "./Startup/CC26X2R1_LAUNCHXL_fxns.obj" "./Startup/ble_user_config_stack.obj" "./Startup/main.obj" "./Startup/osal_icall_ble.obj" "./Startup/rom_init.obj" "./iCall/icall.obj" "./iCall/icall_cc2650.obj" "./iCall/icall_user_config.obj" "./iCallBLE/ble_user_config.obj" "./iCallBLE/icall_api_lite.obj" "./iCallBLE/icall_hci_tl.obj" "../cc13x2_cc26x2_app.cmd" -l"configPkg/linker.cmd" -l"C:/ti/simplelink_cc13x2_26x2_sdk_4_20_00_35/source/ti/ble5stack/libraries/cc26x2r1/OneLib.a" -l"C:/ti/simplelink_cc13x2_26x2_sdk_4_20_00_35/source/ti/ble5stack/libraries/cc26x2r1/StackWrapper.a" -l"C:/ti/simplelink_cc13x2_26x2_sdk_4_20_00_35/source/ti/ble5stack/libraries/cc26x2r1/ble_r2.symbols" -l"C:/ti/simplelink_cc13x2_26x2_sdk_4_20_00_35/source/ti/display/lib/display.aem4f" -l"C:/ti/simplelink_cc13x2_26x2_sdk_4_20_00_35/source/ti/grlib/lib/ccs/m4f/grlib.a" -l"C:/ti/simplelink_cc13x2_26x2_sdk_4_20_00_35/source/ti/drivers/rf/lib/rf_multiMode_cc26x2.aem4f" -l"C:/ti/simplelink_cc13x2_26x2_sdk_4_20_00_35/source/ti/devices/cc13x2_cc26x2/driverlib/bin/ccs/driverlib.lib" -l"C:/ti/simplelink_cc13x2_26x2_sdk_4_20_00_35/source/ti/drivers/lib/drivers_cc26x2.aem4f" -l"C:/ti/simplelink_cc13x2_26x2_sdk_4_20_00_35/kernel/tirtos/packages/ti/dpl/lib/dpl_cc26x2.aem4f" -l"ti/devices/cc13x2_cc26x2/driverlib/bin/ccs/driverlib.lib" -llibc.a <Linking> undefined first referenced symbol in file --------- ---------------- sem_init <whole-program> sem_post <whole-program> sem_wait <whole-program> error #10234-D: unresolved symbols remain error #10010: errors encountered during linking; "spi_expander_ble_peripheral.out" not built
(I renamed my project to spi_expander_ble_peripheral)
It seems like the POSIX library isn't linked correctly in the project settings with simple_peripheral. I try searching for the library in the SDK directory to link it to- but it seems like it is hidden in some cryptic XDCTools configuration script. Is there an easy way to add POSIX support to an existing project without manually chopping up an XDCTools script? Maybe in SysConfig or in the CCS project settings?