Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 242
Shihab Avatar asked Oct 08 '12 06:10

Shihab


2 Answers

You might want to check out FreeRTOS. It's a pretty simple and light-weight OS that will give you multithreading.

There are lots of other light-weight OSes too.

like image 146
Martin Avatar answered Nov 03 '22 06:11

Martin


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.

like image 31
Clifford Avatar answered Nov 03 '22 06:11

Clifford