Search code examples
cmultithreadingembeddedkeil

Is multithreading supported in embedded Keil C?


I am developing an embedded application in LM3S6965 evaluation board using Keil C compiler. Is there any option for creating multithreaded embedded application?


Solution

  • Multi-threading is not an intrinsic part of C, so is not provided by the compiler at all, but rather by libraries. In that respect, multi-threading can be implemented using any C compiler; it is more a case of choosing (or writing) a suitable library.

    Many RTOS kernels exist for ARM Cortex-M, but the the Keil MDK-ARM includes the RTX real-time OS library which supports multi-threading.

    The uVision IDE explicitly has an option to include the RTX library, and the debugger has a rudimentary level of kernel awareness. RTX itself is fairly primitive, but suited to small projects, and all of Keil's other middle-ware such as TCP/IP, USB, CAN and filesystem work with it directly.