简体   繁体   English

嵌入式Keil C支持多线程吗?

[英]Is multithreading supported in embedded Keil C?

I am developing an embedded application in LM3S6965 evaluation board using Keil C compiler. 我正在使用Keil C编译器在LM3S6965评估板上开发嵌入式应用程序。 Is there any option for creating multithreaded embedded application? 有没有创建多线程嵌入式应用程序的选项?

You might want to check out FreeRTOS . 您可能想要查看FreeRTOS It's a pretty simple and light-weight OS that will give you multithreading. 这是一个非常简单和轻量级的操作系统,可以为您提供多线程。

There are lots of other light-weight OSes too. 还有很多其他轻量级操作系统。

Multi-threading is not an intrinsic part of C, so is not provided by the compiler at all, but rather by libraries. 多线程不是C的固有部分,因此根本不是由编译器提供的,而是由库提供的。 In that respect, multi-threading can be implemented using any C compiler; 在这方面,可以使用任何C编译器实现多线程; 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. ARM Cortex-M存在许多RTOS内核,但Keil MDK-ARM包含支持多线程的RTX实时OS库。

The uVision IDE explicitly has an option to include the RTX library, and the debugger has a rudimentary level of kernel awareness. uVision IDE显然可以选择包含RTX库,调试器具有基本的内核感知级别。 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. RTX本身相当原始,但适用于小型项目,而Keil的所有其他中间件(如TCP / IP,USB,CAN和文件系统)都可以直接使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM