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/AM3359: Thread in EtherCAT application

Part Number: AM3359
Other Parts Discussed in Thread: SYSBIOS

Tool/software: Code Composer Studio

Hi, there.

I want to create a thread in an ethercat application (tiescappl.c). Do you have sample code that you can use in my application?

1. I added the following to ti\PRU-ICSS-EtherCAT_Slave_01.00.07.02\protocols\ethercat_slave\ecat_appl\am335x_app.cfg

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

Task.enableIdleTask = true;
========================================


2. I added the following to ti\PRU-ICSS-EtherCAT_Slave_01.00.07.02\protocols\ethercat_slave\ecat_appl\EcatStack\tiescappl.c
========================================
#include <ti/sysbios/posix/pthread.h>
========================================


3. When I try to build, I get the following error.


4. I referenced the following url:

http://processors.wiki.ti.com/index.php/SYS/BIOS_POSIX_Thread_(pthread)_Support

Thank you in advance.

  • Simon,

    Any reason you have to use the Pthread? You can add another task (thread in TI-RTOS) similar as LEDtask below in tiescutils.c

    TaskP_Params_init(&taskParams);
    taskParams.priority = 4;
    taskParams.stacksize = 1512*TIESC_TASK_STACK_SIZE_MUL;
    ledTaskHndl = TaskP_create(LEDtask, &taskParams);

    see details about types of threads in TI-RTOS in the Bios_User_guide.pdf at \ti\bios_6_75_02_00\docs

    Regards,
    Garrett