8051 C Compiler Recommendation - Page 3

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Re: 8051 C Compiler Recommendation

Quoted text here. Click to load it

Overlaid variables are static, so the code is not re-entrant.

What kind of code would you get from an 8051 C compiler if you
tried to compile a multi-threaded TCP/IP stack?

(My guess: huge, slow, and ugly code; full of errors caused by compiler bugs.)


Re: 8051 C Compiler Recommendation
Quoted text here. Click to load it
... snip ...
Quoted text here. Click to load it

Not necessarily:

void foo(void)
{
   ....
   while (cond1) {
      int fee;

      ....
   }
   while (cond2) {
      int fum;

      ....
   }
}

fee and fum may well be overlaid in the automatic frame for foo.
In fact I would expect the compiler to do so regardless of
optimization level.  Everything remains re-entrant.  Of course the
assembly programmer can do that too.

--
Chuck F ( snipped-for-privacy@yahoo.com) ( snipped-for-privacy@worldnet.att.net)
   Available for consulting/temporary embedded and systems.
We've slightly trimmed the long signature. Click to see the full one.
Re: 8051 C Compiler Recommendation
Quoted text here. Click to load it

<flail>Warning, Will Robinson, warning - CPU/task mismatch! Warning!
Bzeep!</flail>

Steve
http://www.fivetrees.com



Re: 8051 C Compiler Recommendation



Quoted text here. Click to load it

Like towing a boat with a moped. "8 bit"  "low end"    "No multi-threaded NO"
But you can squeeze in a small TCP/IP stack (someone felt the need).

It will not run linux.  It will not run a relational data base.
for that you would need a PIC  :)



Re: 8051 C Compiler Recommendation
Quoted text here. Click to load it
Your guess?
Look at the several TCP IP stacks that work very well on the 8051 family

I don't know about multi threading. If that is the case it sounds like
you would need something more powerful than a 51.

As this was a asm Vc for 51 discussion how would you do a multi-threaded
TCP/IP stack in assembler?


--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
We've slightly trimmed the long signature. Click to see the full one.
Re: 8051 C Compiler Recommendation

Quoted text here. Click to load it

That was my point: C for the 8051 is not like C for other CPUs;
although the differences may not be apparent until you try to
write more sophisticated programs. Switching from assembly
language to C may tempt you to do just that.

Quoted text here. Click to load it

On an 8051? I wouldn't :)


Re: 8051 C Compiler Recommendation
Quoted text here. Click to load it

what bollox.

C is used on most 8 bit processors. Also 16, 32, 64 and 128 bit systems.
Just because you write in c does not mean you are going to try and put
Linux on to a 51, HC05, PIC18, AVR etc etc  Unless you are VERY naive
and new to embedded.  

That is usually a trait exhibited by new computer science students not
experienced embedded engineers.

You can do extremely sophisticated programs in C on a 51. Sophisticated
does not mean large.

Quoted text here. Click to load it

so your point is?

The OP was asking about moving from asm to C on a 51 and all you have
done is go off at a tangent about irrelevant things.

C does work VERY well on a 51.

The OP was asking which compiler to use.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
We've slightly trimmed the long signature. Click to see the full one.
Re: 8051 C Compiler Recommendation

Quoted text here. Click to load it

Keil does offer an eval version but it is quite limited.  I use Keil at
work, and have been very happy with it.  It produces very compact code, and
was quite easy to get up to speed on.  It has some extensions to C to
support the 8051s specifically.  It is pricey, and if you are doing this as
a hobbyist, I would recommend finding something significantly cheaper.

--
Richard

Re: 8051 C Compiler Recommendation
Quoted text here. Click to load it

Any comments regarding how the Tasking Compiler performs against the
Keil compiler?

  - Richard.W




Site Timeline