嵌入式c语言 c语言_C和嵌入式C有什么区别?

嵌入式c语言 c语言

C programming language was designed by the Dennis Ritchie in 1972 in Bell Labs. It was developed to rewrite the code of Unix operating system, later it was launched for other/general purposes. C language is a general purpose, structural programming language which follows the concept of POP (procedural oriented programming);it is completely based on procedures/function/modules.

C编程语言是由Dennis Ritchie于1972年在Bell Labs设计的 。 它是为重写Unix操作系统的代码而开发的,后来为了其他/一般目的而启动。 C语言是一种通用的结构化编程语言,它遵循POP(面向过程的编程)的概念;它完全基于过程/功能/模块。

While, Embedded C is an extension C language, which are used to develop micro-controller based applications (low level and high level).

Embedded C是一种扩展C语言,用于开发基于微控制器的应用程序(低级和高级)。

If we look around the world, we will find various types of Embedded Systems, like mobiles, digital cameras washing machines, AC etc. These all devices are micro-controller/micro-processor based and mostly embedded devices use Embedded C language to develop their device drivers, applications.

如果环顾全球,我们会发现各种类型的嵌入式系统 ,例如手机,数码相机,洗衣机,AC等。所有这些设备都是基于微控制器/微处理器的,并且大多数嵌入式设备使用嵌入式C语言来开发其设备驱动程序,应用程序。

C和嵌入式C之间的区别 (Differences between C and Embedded C)

C programming Embedded C programming
C is a general purpose programming language, which can be used to design any type of desktop based applications. Embedded C is an extension of C language (some of the features are there, which can be used to specific purposes), it is used to develop micro-controller based applications (low-level or/and application level).
While, writing a C programming language code there is no need to know about computer hardware i.e. C language is not hardware dependent language. You must have good knowledge about the hardware for that you’re developing any code. Embedded C is fully hardware dependent language.
C language program is hardware independent. Embedded C program is hardware dependent.
For C language, the standard compilers can be used to compile and execute the program. For Embedded C, you need to some specific compilers that are able to generate particular hardware/micro-controller based output.
We need to write full program from scratch while developing a C language code. The compiler generates some initial code automatically (which may include some assembly language code/files) based on the selected micro-controller/microprocessor.
In the C programming language, we can use standard function like printf(), scanf() etc for output and input. These functions may not work, because in an embedded device there may not any standard output device (like monitor, Keyboard etc.). you have to write code to display output to connected display unit like 16X2 LCD, graphics display etc.
C language compilers generate operating system dependent executable files that can be run on the same operating system. Embedded C language compilers generate hardware dependent files that you have to upload in the micro-controller and then you have to switch on the device to check weather code is working or not
Readability modifications, bug fixing are very easy in a C language program. It’s not too easy to read, understand, modify and fix the bugs in an Embedded C language program.
GCC (GNU Complier collection), Borland turbo C, Intel C++ compiler are some of the popular compilers which are used to compile, execute a C language program. Keil compiler (An Arm company compilers), BiPOM ELECTRONIC – Embedded training and Development, Green Hill software etc are some of the popular compilers to compile, run an Embedded C language program.
C程序设计 嵌入式C程式设计
C是一种通用编程语言,可用于设计任何类型的基于桌面的应用程序。 嵌入式C是C语言的扩展(有一些功能,可以用于特定目的),它用于开发基于微控制器的应用程序(低级别或/和应用程序级别)。
在编写C编程语言代码时,无需了解计算机硬件,即C语言不是硬件相关的语言。 您在开发任何代码时必须对硬件有充分的了解。 嵌入式C是完全依赖于硬件的语言。
C语言程序与硬件无关。 嵌入式C程序取决于硬件。
对于C语言,可以使用标准编译器来编译和执行程序。 对于嵌入式C,您需要一些特定的编译器,这些编译器能够生成基于特定硬件/微控制器的输出。
在开发C语言代码时,我们需要从头开始编写完整的程序。 编译器会根据所选的微控制器/微处理器自动生成一些初始代码(可能包含一些汇编语言代码/文件)。
在C编程语言中,我们可以使用诸如printf(),scanf()等标准函数进行输出和输入。 这些功能可能不起作用,因为在嵌入式设备中可能没有任何标准输出设备(如显示器,键盘等)。 您必须编写代码才能将输出显示到连接的人机界面(如16X2 LCD,图形显示器等)。
C语言编译器生成与操作系统有关的可执行文件,这些文件可以在同一操作系统上运行。 嵌入式C语言编译器会生成与硬件相关的文件,您必须在微控制器中上传这些文件,然后必须打开设备以检查天气代码是否正常运行
在C语言程序中,可读性修改,错误修复非常容易。 阅读,理解,修改和修复嵌入式C语言程序中的错误不是很容易。
GCC(GNU Complier集合),Borland turbo C,Intel C ++编译器是一些流行的编译器,用于编译,执行C语言程序。 Keil编译器(An Arm公司的编译器),Bi​​POM ELECTRONIC –嵌入式培训和开发,Green Hill软件等是一些流行的编译器,可用于编译,运行嵌入式C语言程序。

Mainly C programming language (C and Embedded C) is used to develop the applications that are nearest to the hardware i.e. the applications which directly communicate to the hardware. Some of the examples where it is used:

主要使用C编程语言(C和嵌入式C)来开发与硬件最接近的应用程序,即直接与硬件通信的应用程序。 使用它的一些示例:

  • To design programming translators (like compilers, interpreters etc.).

    设计编程翻译器(例如编译器,解释器等)。

  • To design operating system (for the computers).

    设计操作系统(用于计算机)。

  • To design firmware’s (for the embedded system).

    设计固件(用于嵌入式系统)。

  • To design device drivers (application that manages he attached devices to the embedded systems).

    设计设备驱动程序(管理设备的应用程序,将设备连接到嵌入式系统)。

  • To design games, verification software (where we need direct access to the hardware).

    要设计游戏,需要使用验证软件(我们需要直接访问硬件)。

Initially C programming language was used to rewrite the UNIX operating system, due to its features (like flexibility, easiness, fast, powerful) it is using since 1972 to till date and it is most important and powerful language nowadays.

最初,由于1972年以来一直使用的C语言(如灵活性,易用性,快速,强大)的特性,C语言一直被用来重写UNIX操作系统,这是当今最重要且功能最强大的语言。

I hope this article Differences between C and Embedded C programming will be helpful for you to understand the concept of C programming language and Embedded C programing. If you any query, please write in the comment box. We will be happy to reply.

我希望C和嵌入式C编程与本文的差异将有助于你理解的C语言编程的概念和嵌入式C编程。 如果您有任何疑问,请在评论框中输入。 我们很乐意答复。

翻译自: https://www.includehelp.com/c/differences-between-c-and-embedded-c.aspx

嵌入式c语言 c语言

你可能感兴趣的:(嵌入式,编译器,编程语言,python,java)