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.

CCSTUDIO: Clarification on C++ Atomic Operations Support in tiarmclang v4.0

Part Number: CCSTUDIO

Tool/software:

Hello TI Experts,

According to the TI Arm Clang compiler documentation (2.5. Characteristics and Implementation of Arm C++ — TI Arm Clang Compiler Tools User's Guide), it is stated that C++ atomic operations are "not implemented or fully supported."

Could you please clarify what this means in practical terms?

In my experience, I’ve been able to declare std::atomic<int> variables and perform basic operations such as store, load, and fetch_add using std::memory_order_seq_cst. However, I would like to understand the limitations more clearly:

  • Are there specific atomic operations or types that are not supported or may behave unexpectedly?
  • Are all standard memory orderings (e.g., std::memory_order_seq_cst, relaxed, acq_rel) implemented and correctly honored?
  • Are there known issues or caveats when using atomic operations in multi-threaded scenarios with this compiler?

Any additional technical insights or documentation references would be greatly appreciated.

Best regards
Luca

  • Hello, 

    I brought this thread to the attention of the compiler experts. They will be able to assist further.

    Thanks

    ki

  • The compiler supports std::atomic in that it generates the related assembly instructions for it, i.e. LDREXD, STREXD, etc.  But that is only part of the solution.  The runtime-executive also plays a role.  That part of the solution is provided by the software development kit (SDK) for the device. Therefore, the full answer to your questions must come from the team that supports the SDK for your device.

    What device do you use?

    Thanks and regards,

    -George

  • Hello George,

    Thank you for your response. I'm currently working with the AM64x-EVM and AM64x-SK boards, using the MCU PLUS SDK version 11.01.00.17.

    Best regards,
    Luca

  • Hi Luca,

    I hope you are aware that all our drivers and examples are written and tested in C only. We only have hello_world_cpp project written in C++ along with basic libs build with C++.

    Please refer HELLO_WORLD_CPP 

    C++ functionality are not tested with the SDK and is not supported on E2E Forum.

    Regards,

    Tushar