AzureRTOS(ThreadX) TX_ENABLE_IAR_LIBRARY_SUPPORT compile option

GR_yoji 46 Reputation points
2021-07-27T07:49:37.697+00:00

It seems that ThreadX of Azure RTOS has a compile option called "TX_ENABLE_IAR_LIBRARY_SUPPORT".
Let me ask you a few questions about that.

  1. What is the effect of enabling this?
  2. Also, are there any conditions or restrictions when using it?
    For example, the CPU that can be used and the target environment are limited.
  3. Do I need to enable it when developing in an IAR environment?
    Also, is there any inconvenience when not enabled?
Azure RTOS
Azure RTOS
An Azure embedded development suite including a small but powerful operating system for resource-constrained devices.
341 questions
{count} votes

Accepted answer
  1. AndresMlinar 256 Reputation points
    2021-08-03T11:36:23.58+00:00

    The IAR C run-time library offers thread local storage and reentrancy support. In order to use those capabilities with ThreadX this symbol needs to be defined during compilation. For more information about the IAR C run-time library please refer to their documentation.

    This capability is port specific and hence documented on the port readme file (for Cortex M7, that file is here https://github.com/azure-rtos/threadx/blob/master/ports/cortex_m7/iar/readme_threadx.txt)

    Here is the relevant chapter from that readme file:

    1. IAR Thread-safe Library Support

    Thread-safe support for the IAR tools is easily enabled by building the ThreadX library
    and the application with TX_ENABLE_IAR_LIBRARY_SUPPORT. Also, the linker control file
    should have the following line added (if not already in place):

    initialize by copy with packing = none {​​​​​ section __DLIB_PERTHREAD }​​​​​; // Required in a multi-threaded application

    The project options "General Options -> Library Configuration" should also have the
    "Enable thread support in library" box selected.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.