This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to modify macro TLS_THREAD_STACK_SIZE in TLS_mbed.c file

Hi,

There is #define TLS_THREAD_STACK_SIZE defined as 4096 in TLS_mbed.c file. I want to update this macro to some higher value based on my project requirement. I am using CMSIS setting as RTOS (RTX5) and RTOS2 (RTX5). How can I update this variable?  Based on my understanding, RTX5 doesn't provide any config file like RTX_Conf_CM.c  which is added when using RTX4. 

Parents
  • In TLS_mbed.c, the stack size is defined as:

    #ifndef TLS_THREAD_STACK_SIZE
    #define TLS_THREAD_STACK_SIZE   4096
    #endif
    

    This allows you to override the default setting without changing the source file. In C/C++ options -> Preprocessor Symbols specify a new value for the stack size:

    TLS_THREAD_STACK_SIZE=8192
    

    This will define the macro before the above code, so the compiler ignores the default setting.

Reply
  • In TLS_mbed.c, the stack size is defined as:

    #ifndef TLS_THREAD_STACK_SIZE
    #define TLS_THREAD_STACK_SIZE   4096
    #endif
    

    This allows you to override the default setting without changing the source file. In C/C++ options -> Preprocessor Symbols specify a new value for the stack size:

    TLS_THREAD_STACK_SIZE=8192
    

    This will define the macro before the above code, so the compiler ignores the default setting.

Children