6 years, 9 months ago.  This question has been closed. Reason: Duplicate question

Max number of threads in mbed-os?

With mbed-os I am getting run-time error when I exceed number of threads creation beyond 6 (1 main + 5 threads). Hence tried to dig more in the source from ( https://github.com/ARMmbed/mbed-os). There are a few documents that mention OS_TASKCNT (sets maximum number of threads) which used to be present in the earlier versions of mbed-os. But looks like OS_TASKCNT doesn't exist in the current source. I also found OS_THREAD_NUM in the current mbed-os. I also saw a few links referring to mbed_app.json that sets OS_TASKCNT.

So I have following questions:

1. Is OS_TASKCNT still used in the current mbed-os? If yes, which file? If no, what variable controls maximum number of threads?

2. What is the default value of such a variable? I built a simple thread program and built it via online compiler. No matter what target (M0. M4, ...etc) I choose, the max number of threads is 6.

3. Of course configuring just the variable won't be adequate. There would be some other parameters should be set to some reasonable value. Where can I find such details?

Thanks, Hemant