Embedded systems and C

M

Morris Dovey

Sanjay said:
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".
 
S

Sanjay Kulkarni

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

Resources? Your own experiences / opinions?

- Sanjay Kulkarni
 
S

santosh

Sanjay said:
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.
 
M

Malcolm McLean

Sanjay Kulkarni said:
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.
 
P

Piotr

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!
 
F

Flash Gordon

Piotr wrote, On 16/03/08 10:49:
Sanjay Kulkarni pisze:

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.
 
P

Piotr

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top