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.

PROCESSOR-SDK-DRA8X: PTHREAD support for integration in main_2_1 core with Autosar

Part Number: PROCESSOR-SDK-DRA8X


Hello,

We recently received the Autosar package and we are in the process of integrating our modules. We have an specific complex driver that uses the pthread library but apparently there is no support for it. 

The compiler is TI_CGT_ARM_18.12.1.LTS, reading the documentation it provides a short version of pthread: _pthread.c and _pthread.h. Is there any other way of including this library in the system other than the files provided by the compiler? We have the same issue with the sys/time.h file.

Before moving to Autosar, we had the environment in Linux and using the Ti RTOS.

Best regards,

José Daniel

  • Hi Daniel,

    I think this should be supported by autosar than compiler. So could you please check with autosar vendor?  

    Regards,

    Brijesh

  • Hello Brijesh,

    Thanks for your reply. I already asked and apparently importing POSIX as a static lib (.aer5f) is an option. In my PDK installation there is this folder "bios_6_76_03_01" which contains the POSIX package. Can you give me instructions or an example where I can build it as static lib?

    Regards,

    José Daniel

  • Hi Daniel,

    But this is bios implementation/porting of the pthread library. It may not work straight in autosar.

    Regards,

    Brijesh

  • Got it. The thing is I have to use this POSIX api to protect/synchronize specific tasks. As POSIX is not 100% compatible with Autosar, there should be some other ways to have the same functionality, right?

    Currently I'm trying to implement the same functionality (mutex, semaphores) but using atomic operations, compiler spec says atomic operations are supported. However I'm not sure if even with this implementation I can fix the compatibility issue.

    update: I implemented mutex and semaphores using atomics operations. I did test it first in PC environment and works. Once I moved them to the TI RTOS environment, it crashes. I'm able to compile but once I run the program it stops working. Any thoughts?

  • Hi,

    I would suggest please check with your autosar vendor. They would most likely have support for semaphore, mutexes etc..

    Regards,

    Brijesh