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.

RTOS/LAUNCHXL-CC1310: Why are pthread functions missing from the link?

Part Number: LAUNCHXL-CC1310
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

I have an existing project that I am trying to reconfigure in CCS.   Previously, I started with the uartecho example and was able to use the following functions:

pthread_attr_init()
pthread_attr_setdetachstate()
pthread_attr_setschedparam()
pthread_attr_setstacksize()
pthread_attr_create()

The uartecho example does not come with a RTSC config file because there are no tasks, so I decided to rebuild the project and use the mailbox example instead.   When I add all my code, I find the functions above are no longer available to the linker.

When I look at my old linker map, I find these functions come from the rom_sysbios.aem3 library.   When I look at the new linker map, I see this same library is also included but now does not have pthread support.   I used nm to dump the symbols from both the old and new libraries, as expected I see pthread functions defined in the old library but not in the new.

What do I need to do to configure my new project to include pthread support?

  • Do you have var

    Settings = xdc.useModule('ti.sysbios.posix.Settings');

    in your .cfg file? This basically tells the kernel to include the necessary posix object files in.

    I'm assuming you are using the SimpleLink SDK. For the driver examples we have a separate kernel project that the driver examples depend upon (more details in the User Guide). This was done to
    1. Allow easy movement between TI-RTOS and FreeRTOS.
    2. Allow easy movement between different kernel configuations.

    For the TI-RTOS (SYS/BIOS) examples we keep the .cfg file in the example project. We did not have posix included in the kernel examples since they we using the native TI-RTOS calls.

    Todd
  • I'm marking this as answered.