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.
Our documentation at:
www.keil.com/.../use_secure_components.html
confirms:
"...Configure the RTX threads
..."
Thanks for response but is it true even if we use RTX V5 under compatibility layer as I am not using RTX5 natively. I do encounter problems with my system like stack overflow if I keep this as default 4096
if you think the stack size of your TLS thread is the root cause of your issue, you can just change the value of the macro TLS_THREAD_STACK_SIZE to a bigger value in your TLS_mbed.c
Yes that is what we have done but as this is part of library files, we should not be making any changes in this file. If we change value in TLS_mbed.c file itself, every other person who tries to use the project need to go and modify the library files, which is not the ideal way of doing it.
That is why I am looking for some other alternative for modifying this value.
Does anyone know any way to modify this value apart from modifying in TLS_mbed.c file
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.
This really helped me and solved my problem. Thanks a lot.