Embedded systems and C

Discussion in 'C Programming' started by Morris Dovey, Mar 16, 2008.

  1. Morris Dovey

    Morris Dovey Guest

    Sanjay Kulkarni wrote:
    >
    > Why C is the preferred language for embedded systems? Just curious.
    >
    > Resources? Your own experiences / opinions?


    Short answer: C is the closest thing to a "portable assembly
    language".

    --
    Morris Dovey
    DeSoto Solar
    DeSoto, Iowa USA
    http://www.iedu.com/DeSoto/
    Morris Dovey, Mar 16, 2008
    #1
    1. Advertising

  2. Why C is the preferred language for embedded systems? Just curious.

    Resources? Your own experiences / opinions?

    - Sanjay Kulkarni
    Sanjay Kulkarni, Mar 16, 2008
    #2
    1. Advertising

  3. Morris Dovey

    santosh Guest

    Sanjay Kulkarni wrote:

    > Why C is the preferred language for embedded systems? Just curious.
    >
    > Resources? Your own experiences / opinions?


    Because of a combination of desirable qualities. It is small, simple,
    fairly easy to write a compiler for, has very little runtime overhead,
    maps very efficiently to most hardware architectures, and is extremely
    portable if carefully used.
    santosh, Mar 16, 2008
    #3
  4. "Sanjay Kulkarni" <> wrote in message
    news:...
    > Why C is the preferred language for embedded systems? Just curious.
    >
    > Resources? Your own experiences / opinions?
    >

    When writing C a person who knows assembler can more or less match the C to
    the assembly it will generate. Since embedded applications are often short
    of resources, and since they often have special instructions which require
    bits of assembly that inter-operate with the C, this is extremely useful.

    Having said that, my language MiniBasic has found a niche on small embedded
    chips, and it's a high-level, interpreted language. However it is also very
    small and easy to learn.

    --
    Free games and programming goodies.
    http://www.personal.leeds.ac.uk/~bgy1mm
    Malcolm McLean, Mar 16, 2008
    #4
  5. Morris Dovey

    Piotr Guest

    Sanjay Kulkarni pisze:
    > Why C is the preferred language for embedded systems? Just curious.


    C language has compliers for almost every platfroms, so it is very
    portable. It also makes possible to low-level programming throught
    assembly insertions.

    Regards!
    --
    Peter Piwko
    Piotr, Mar 16, 2008
    #5
  6. Morris Dovey

    Flash Gordon Guest

    Piotr wrote, On 16/03/08 10:49:
    > Sanjay Kulkarni pisze:
    >> Why C is the preferred language for embedded systems? Just curious.

    >
    > C language has compliers for almost every platfroms, so it is very
    > portable.


    Which leads to demand which leads to processor manufacturers ensuring
    that a C compiler is produced for each new processor which leads to
    portability which...

    C got lucky and achieved a virtuous cycle of reinforcement.

    > It also makes possible to low-level programming throught
    > assembly insertions.


    No, that is extensions to C which are not always implemented in the same
    way. C itself provides no mechanisms for inserting or interfacing to
    assembly.
    --
    Flash Gordon
    Flash Gordon, Mar 16, 2008
    #6
  7. Morris Dovey

    Piotr Guest

    Flash Gordon pisze:
    > No, that is extensions to C which are not always implemented in the same
    > way.


    Yes, you're right, but I have never worked with any compiler which
    doesn't make possible to asm insertions. Of course, it doesn't implement
    in the same way, but similarly.

    --
    Peter Piwko
    Piotr, Mar 16, 2008
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike
    Replies:
    2
    Views:
    630
  2. Replies:
    0
    Views:
    435
  3. Shalini

    Embedded systems and C programming

    Shalini, Sep 17, 2004, in forum: C Programming
    Replies:
    6
    Views:
    358
    Chris Hills
    Oct 8, 2004
  4. Alex Vinokur
    Replies:
    10
    Views:
    542
    Alex Vinokur
    Apr 1, 2006
  5. Martin Wells
    Replies:
    3
    Views:
    262
    Puppet_Sock
    Sep 20, 2007
Loading...

Share This Page