Embedded C and ANSI C

Are these two similar in any nature?

I heard they are not But they are having almost similar coding blocks

I know that Embedded C is used predeterministically for Configuring your FPGAs and PLAsand ANSI for a hell lot of stuff that I am not aware at all

So pls differentiate the two and also If possible do point out the similarities between them

Replies

  • Sindhu Chowdary
    Sindhu Chowdary
    C and embedded C have more similarities than differences.Embedded C is nothing but simply we are using C in embedded systems.

    First difference is that the C can use all the memory while running on a desktop , but in case of embedded C it has to use the limited memory available in RAM , ROM on a processor.It means while writing a code or program in embedded C we have to keep in mind about the memory.Otherwise the program will crash.

    Secondly,C is most likely a platform dependent since its executable code cannot be run in other OS.But the program written in embedded C is directly stored into the processor and hence it is platform independent.

    All the other programming etc., is done using the same variables ,syntaxes we normally use in C.

    SO simply,I think, we can say embedded C as a part of C.

    P.S. Another difference is embedded C does not a console which is available in case of desktop.(I cant understand it myself , but may be useful to you)
  • Vishal Sharma
    Vishal Sharma
    Umm.. I don't think we use C in embedded systems.. As far as I know, Embedded C was developed using C mainly for hardware communication and control. It uses same compiler as C.. I've used MicroC pro for embedded programming. in that, if you make a project it creates a large number of supporting files so these files on compilation are linked to the code you write and a .hex file is created..

    So, it uses the header files developed in C to implement in embedded C
  • Abhishek Rawal
    Abhishek Rawal
    Vishal0203
    Umm.. I don't think we use C in embedded systems..
    We use C in Embedded systems. Infact, C language is the most preferred language for Embedded systems.
    In simple words : Embedded C is subset of C language.
    Only thing in C is that we have to take care about size of program, because the microcontroller has limited memory.
  • Harshad Italiya
    Harshad Italiya
    Vishal0203
    Umm.. I don't think we use C in embedded systems.. As far as I know, Embedded C was developed using C mainly for hardware communication and control. It uses same compiler as C.. I've used MicroC pro for embedded programming. in that, if you make a project it creates a large number of supporting files so these files on compilation are linked to the code you write and a .hex file is created..

    So, it uses the header files developed in C to implement in embedded C
    I second you Vishal. I can see embedded C is using most of C part but it has some additional features.

    Vishal, Generating hex file is part of assembler. Isn't it.
  • Vishal Sharma
    Vishal Sharma
    Harshad Italiya
    I second you Vishal. I can see embedded C is using most of C part but it has some additional features.

    Vishal, Generating hex file is part of assembler. Isn't it.
    Yeah I agree with the additional features because it provides hardware communication and In built libraries make it much easier..
    I think it depends on the environment in which you are programming in! In my college labs they use assemblers where as mikroC uses a compiler..
  • Vishal Sharma
    Vishal Sharma
    Abhishek Rawal
    We use C in Embedded systems. Infact, C language is the most preferred language for Embedded systems.
    In simple words : Embedded C is subset of C language.
    Only thing in C is that we have to take care about size of program, because the microcontroller has limited memory.

    Okay you can call my first line a "brain fart" 😛 because I myself disagreed to it in the further lines!
    More important than size, I feel that remembering and coding according to the clock pulses is more important.
    Most of the tasks on a M-controller are threaded so its important.
  • Anand Tamariya
    Anand Tamariya
    Embedded C (XC8) compiler allows constructs like
    a = b = c;

    While the same is not allowed in ANSI C.

You are reading an archived discussion.

Related Posts

While interviewing some candidates, I found them talking more about their certifications than interests. There was this guy whom I interviewed who started saying "I am Sun certified Java professional,...
I am creating a pictorial tutorial for dual-boot of Windows & linux, I however found a way to save the screenshots from live images to cloud storage, but I also...
Here, I will be using Windows 7 & Xubuntu 13.04 for pictorial explanation. Considering, Windows 7 is pre-installed; we'll further move for the manual installation process. Download any Linux ISO...
Back in 2004 Apple launched Airplay which allowed wireless streaming of data (Audio,Video,Pics,etc) between devices. However, it's proprietary stack thus you will need Airplay compatible devices like iPad, iPhone &...
Few hours ago in the MailPipe, announcement of the release of Fedora 19 has been made. We have already discussed about the features that's been included in the Fedora 19....