Newbie assistance for Atmel at89c2051 project

First let me say thanks to Chris, I appreciate the comments. I like 'to the point' answers with facts to back up opinions. I can then decide for myself which is best. I appreciate everyone else's comments too. I'm sorry for my wording of the question which seems to have started off a little flame war, I'm not trolling.

I have found that SDCC still meets my needs for my project. I also now have an idea where the Keil compiler could fit into future projects. I use both commercial and open source software. I sometimes find the open source tools to be very difficult for 'newbies' to use as if they have any background it usually Microsoft and it's spoon fed background. But I can create howto's to get them started. This sometimes leads to article in magazines which is not a bad thing :-)

My needs:

My impression of SDCC is that it's a slow moving project (I have a few that I manage so I know the frustrations, see HCS below for an idea). My needs are more cost and 'it works' rather than the highest quality code. I want to attract DIY users who are interested in my project with low cost (I've got lots of howtos to help with their lack of experience). SDCC fits that bill nicely. My bigger worry was that it produced bad code, like one of the older C2C pic compilers for Linux. I know it was free and I figured out ways around the problem but I have very little extra time to fix major compiler bugs when I need to design hardware, write software, maintain web pages and try to manage projects (BTW, I do have help but could use more :-).

Thanks for everyone's help and Happy New Year.

--
Linux Home Automation         Neil Cherry        ncherry@comcast.net
http://home.comcast.net/~ncherry/               (Text only)
http://linuxha.sourceforge.net/                 (SourceForge)
http://hcs.sourceforge.net/                     (HCS II)
Reply to
Neil Cherry
Loading thread data ...

You can't program the AT89C2051 in system, however you can use a burner/dev circuit for in system programming. I have a GPL one I designed a few years ago on my web page.

formatting link

Then use SDCC, it will be perfect for your usage. I see that some have suggested Keil, however Keil seems to be MICROS~1 Windows centric ? If that's the case Keil won't run on your FreeBsd box, whereas SDCC will.

SDCC is definitely your answer then. It has a wide following, a great simulator and is nice and stable.

Fairly easy to do with SDCC, I'd say.

A friend recently wrote a 2 line by 16 character LCD test routine using SDCC, and it worked fine, he had no difficulty doing it.

--
              Kind Regards from Terry 
    My Desktop is powered by GNU/LinuX, Gentoo-1.4_rc2   
         New Homepage: http://milkstone.d2.net.au/          
 ** Linux Registration Number: 103931,  http://counter.li.org **
Reply to
Terry

There isn't anything *wrong* with SDCC, it has it's advantages and disadvantages like anything else :)

A blanket "DO NOT use the SDCC compiler" is definitely advice worth ignoring because in many situations SDCC is superior to commercial applications, and cost is one of them.

The fact that Keil does not run under Linux/*Bsd is another.

You have the source code with SDCC, and in some cases this is a huge benefit.

SDCC will always be available, and for Free, how many people have been burned when closed source products are no longer available as a result of a takeover etc ?

It's a complex issue, and I'm sure that products like Keil are fine, however it's different horses for courses and one product doesn't fit all.

As I said in another post, a friend wrote some test code to power a

2x16 line LCD recently. He used SDCC and the At89C2051 and it worked fine, he had no problems.

I have some screen pics of SDCC in action at :-

formatting link

--
              Kind Regards from Terry 
    My Desktop is powered by GNU/LinuX, Gentoo-1.4_rc2   
         New Homepage: http://milkstone.d2.net.au/          
 ** Linux Registration Number: 103931,  http://counter.li.org **
Reply to
Terry

In article , Terry writes

Any technical reasons?

Only if you are a compiler writer. Not the same thing as a programmer.

This is not guaranteed, neither are bug fixes.

Likewise with free products. BTW any news on SCO "owning" Linux and C++?

Well professionals use them on safety critical things.

Are there any *technical* reasons why SDCC is a better compiler?

Free, open source and the ability to run on a particular OS have no bearing on how good a compiler is.

Accuracy, optimisation, compactness of code, support for variants (there are over 500 different 8051's using about 30 different cores including those with 24 bit addressing, contiguous memory greater than 64K and maths co-processors. etc

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/\ /\/\/ snipped-for-privacy@phaedsys.org

formatting link
\/\/ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Reply to
Chris Hills

Hi, if thats all you want to do just go look in the microchip site. All the code is there for keypad scanner and serial drivers. All the development software is free and you can build your own programmer for about $10.

Reply to
CBarn24050

Can you please be more specific ?

How about if you use OSX and want to use SDCC ?

The source is *not* just for compiler writers.

Nothing is guaranteed, except death and taxes.

What kind of "free products" are you talking about ?

I'm specifically referring to "Free" ie software licensed under the GPL.

Yeah, the court in Utah has ordered SCO to produce the discovery information required by IBM in the current lawsuit. They had 30 days to produce *evidence* of their claims in detail, something they have failed to to so far.

In about 2 weeks we will see if SCO can actually *prove* their claims that IBM put some IBM developed code in GNU/Linux as disallowed by the contract they have with SCO regarding their legacy UNIX source code.

For those that don't know, the SCO lawsuit is with IBM, it has nothing to do with GNU/Linux.

... SCO extortion mode on ... Oh by the way Chris, I own all the Keil source code, I don't intend to prove it to anyone (because my code is secret), and if you don't want to be sued as a Keil end user, you had better pay me $800 right away. Or else. .... SCO extortion mode off ....

I'm sure they do. I'm sure that hobbyists use them to generate code for puppy dog door openers and led blinkers too.

Perhaps while you're on this "safety critical" rant, you'd care to paste here where Keil state that their products are guaranteed for use in safety critical applications ?

Nuclear reactor controllers perhaps? How about aircraft flight systems ?

Now I have absolutely *nothing* against Keil, it's another proprietary product and I'm sure that Keil provide value commensurate to the cost, for it's users.

However making Keil out to be something it's not, and then comparing SDCC to that thing that Keil is not, is just a little erroneous to my way of thinking.

Remember the original poster of this thread said, "FreeBsd" and "no money". SDCC satisfies his criteria perfectly.

The term "life critical was brought here by you.

SDCC and Keil are quite different for some reasons that you may not be aware off, I have never claimed that SDCC is "better" than Keil, but we can look at one instance where SDCC has an interesting feature, and compare it to Keil if you like.

Simulation. SDCC can run two or more instances of it's simulator on the same Linux box, with each instance communicating with the other via pipes and psuedo serial comms.

Each instance can be monitored, and values altered etc, the serial comms can also be monitored to see that both simulated micros are doing what's required.

Perhaps you could illustrate how Keil performs the same task on the same PC under Windows ?

I beg to differ, as I believe that all these aspects are important.

Pleas elaborate ?

Opts used differ because requirements differ. Do you want smaller code, or faster code ? Do you want to simulate the code and have some idea what you're looking at ?

Relates to the opts used.

The OP said "AT89C2051" and SDCC works fine with this variant, I know I have code produced by SDDC running on one.

We all know this Chris, the 8051 family has the most variation and the most diverse range of manufacturers of any microprocessor around, and that's why it's so popular.

However the OP is only using one fairly standard micro the Atmel AT89C2051, and SDCC will produce C code for that no problems.

SDCC fits the OPS stated requirements, namely zero cost and to run on his FreeBsd system.

In the light of these requirements I believe that SDCC is the better choice.

Had the OP said "Lots of money, Windows only" I would not be contributing to this thread.

--
              Kind Regards from Terry 
    My Desktop is powered by GNU/LinuX, Gentoo-1.4_rc2   
         New Homepage: http://milkstone.d2.net.au/          
 ** Linux Registration Number: 103931,  http://counter.li.org **
Reply to
Terry

It's a new year let's put this one to rest and get some work done.

Dear Terry and Chris.

Thank you both for your time and diligence in this discussion. I have used the content of my first post to help point out a few things and maybe bring to focus what's really important.

Chris you are an Engineer type. You have all your credentials and your whatever and that's great.

Terry you have the heart of pit bull (meant in a good way) and the brains of dedicated developer for OSS. Both are greatly appreciated. You did some fine foot work asking back questions and giving answers but really. In the end it's not going to matter if Chris paid attention to my first post or not, here's why.

I want to make this work in the worst/best way. I haven't got the board yet. But I'm dreaming code and taking stomach tablets waiting to get into the project and get it done.

Chris your major failing was you said. 'Don't use SDCC' which is kind of like saying, "nevermind using the sidewalk. Get from point A - B using the bus." Your reasoning being really that the bus had more bells, whistles and a better map of the city. Even though I mentioned I have a nice pair of tennis shoes. (FreeBSD box) and wanted to use them.

Terry, clearly you know more about the SDCC than I do, and you have made some excellent points as to why I could/would want to use it. I still haven't much of a clue how to make use of the simulator but I need to read more I'm sure.

Facts that are now current in this project. 1. I bought for about $65.00 US a prebuilt LPC932 proto board from the

formatting link
site. It seems to cover pretty much everything I need.

  1. this means I'm going to have the crippled Keil software, which I can use and will use if it's easier/quicker.
  2. I'm going to need to learn to write code so I can take the pieces that's been pointed out to me and try and put them together. Hopefully in a dependable and functional way.
  3. Optimization was really never a factor in this design. Because I Just want it to WORK.
  4. I only picked the at89c2051 because I had found a schematic and pcb design I could use to put it together. I didn't see how I could program it though. So that was how I got this whole thing started to begin with.
  5. I have no dedication to any platform save the ones I can cheaply aquire. I'd have used a basic stamp if it looked like a good cheap idea.
  6. A Simulator is a must I feel if I'm going to have a chance to make this work. And a simulator that works in a way I can figure out is even better. The S51 simulator seems good but alot like gdb when it comes to using it. It took me about 2 weeks to really get a decent grasp on gdb.
  7. I need to program this in C, simply because I know C the best and bit fiddling with ASM would melt my brain and increase the development time.
  8. If/when this job is finished. I may well become interested in designing more with these chips. they seem incredibly well priced for hobbiests. I have day dreamed a dozen more uses for these chips to help friends and have fun with.
  9. I very much appreciate the views and opinions of eveyone here and I hope in the future I may have a chance to contribute.

Best wishes for a good new year for one and all.

Davon

--
---
  I came.. I saw.. And I wondered. what am I doing here!

(To reply via email please remove the _x from my email address.)
Reply to
Davon Shire

Do you have a link to where on 8052.com you found this board ???

Thanks

Reply to
hamilton

My Appologies, it was from

formatting link
this is the board I purchased.

I'd just stumbled there from the 8052.com site.

Davon

Reply to
Davon Shire

In article , Terry writes

They are actually claiming that the "own" parts of the Linux kernel (and all of C++ as well) They intend to charge royalties on all Linux (and C++ ) users... They must be pretty desperate to do this because as soon as they do identify the code I can see it taking about a month before the next release comes out without that code in. So it won't make any difference.

The difference is that AFAIK SCO have identified certain areas that they believe are theirs. As it is open source this they will have to show that they developed the source first and that is it is the same stuff. It's not quite the same as the scenario above. The code is open.

I think the "case" is that they did some stuff for IBM that IBM later released into the Gnu/Linux chain. However as you say it is all very flimsy. I think it is a last ditch attempt by SCO to stay afloat. AFAIK SCO is what used to be Caldera.

Also how the hell they think they can justify owning C++ beats me. No wonder Californian lawyers are rich.

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/\ /\/\/ snipped-for-privacy@phaedsys.org

formatting link
\/\/ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Reply to
Chris Hills

In article , hamilton writes

In US

formatting link
In Europe
formatting link

The board is the Keil MCB900

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/\ /\/\/ snipped-for-privacy@phaedsys.org

formatting link
\/\/ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Reply to
Chris Hills

... snip ...

You have the obvious cure available - download and store the source yourself. You can now take over maintenance whenever you please.

--
Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net)
   Available for consulting/temporary embedded and systems.
     USE worldnet address!
Reply to
CBFalconer

I must be falling behind, I haven't heard the C++ ownership clams by SCO.

Agreed, but first I'd like to see them *prove* that they own anything. My current SCO believability meter is hard against the 0 stop.

This is not correct. SCO have not shown any code that is theirs and is in GNU/Linux. They had two "showings" of alleged code (where much of the code was blacked out or discuised) and on both occasions the code was tracked down within hours and shown to be code that SCO doesn't own.

formatting link

Actually the dispute is with IBM, there is *no OSS dispute before any court by SCO*

Sure Darl McBribe has made a lot of noise in the press and in fact has has made many OSS related claims, but there is no legal action regarding OSS by SCO pending.

On the other hand SCO has been sued by RedHat for the claims that SCO have made, and the damage they have caused RedHat as a result.

This all incredibly murky:-

This is the actual guts of the *legal dispute*:- It's my understanding that the code that SCO *claim* belongs to them, was actually developed by IBM and the license that IBM bought from Novel (before Novel sold the rights to SCO) is purported to give SCO ownership of any IBM developed code on UNIX System 5 technology.

Here is an analysts summary of SCOs claims, in the pending legal action SCO vs IBM:-

"IBM supported GNU/Linux with code and/or knowledge derived from the original AT&T Unix (now owned by SCO). Largely in the form of printer drivers (presumably the IBM Omni printer drivers) and unspecified linux kernel code enhancements, largely supported on the basis of IBM marketing or press statements.."

Darl McBride and Chris Sontag have made many wild and unsubstantiated claims that are not the subject of legal actions anywhere, and until they are and the cases are resolved, I think it's safe to completely ignore them.

........SCO mode on........ In the same vein Chris, I note I haven't received your $800 license payment for using Keil products that I claim are based on my code. What's up with that? .......SCO mode off.......

You're exactly right, Caldera was sold by Ray Noorda and became SCO.

SCO has made many outrageous claims and *none* of them have been proven in a court of law, or even demonstrated by SCO to be factual.

The theory as you say is just a "pump n dump" scheme by Darl McBride to keep the share prices high, as SCO aren't making any money selling their version of UNIX.

Ironically the latest SCO UNIX offerings are full of OSS products, such as Samba.

--
              Kind Regards from Terry 
    My Desktop is powered by GNU/LinuX, Gentoo-1.4_rc2   
         New Homepage: http://milkstone.d2.net.au/          
 ** Linux Registration Number: 103931,  http://counter.li.org **
Reply to
Terry

Exactly. SDCC source is readily available, (I've got about the last 5 versions myself) and anyone anywhere can compile and use it on anything they want to.

If it was *really* important to have it modified to suit yourself, there is no problem paying a programmer to do just that.

--
              Kind Regards from Terry 
    My Desktop is powered by GNU/LinuX, Gentoo-1.4_rc2   
         New Homepage: http://milkstone.d2.net.au/          
 ** Linux Registration Number: 103931,  http://counter.li.org **
Reply to
Terry

Bwahahahah, but I'm not nearly as vicious as one :)

I took it that way, after all to advocate Free Software in a Windows world, one must develop thick skin in the first few years. :) I've been running only GNU/Linux, on the desktop since August 1997, by way of background.

Well said, and it's a fair learning curve as with any new tool.

Absolutely, use whatever tool suits you best, that's my motto.

In that case why not use an Avr Mega ? :) That's what I use these days with Avr-Gcc and I love it, it's much more mature than SDCC. I've got one clocking at 24Mhz on my bench at the moment, (damn that's fast) but don't tell the people here or Atmel will just raise the prices for the 8 Mhz Mega8l ;-)

Hey that's a bit sensible, where is your brand and product zealotry ?

Gdb is complex, but most debuggers are I think ? You can see DDD (the GUI debugger running as a front end to Gdb) on my site debugging some

8051 code.

It's a little rough around the edges in many areas, and I'd like to point out that I'm not comparing it to Keil or claiming that it's "better", in fact in many areas I bet Keil is *vastly* easier and more straightforward to use.

Chris wouldn't be so outspoken about Keil unless it was a great product!

However SDCC is GPL'd, Free and under slow development at the moment. It will do code for the 8051 family, some PIC variants and a few other micros in C. It has a simulator that can be used with GUI front ends such as DDD.

I think C is perfect for your project, as your project is small and there aren't any timing constraints, correct me if I'm wrong ?

A really concise post Davron, I think you have it all under control :)

Thanks for your debate as well Chris, you dealt with my points like a true gentleman:)

--
              Kind Regards from Terry 
    My Desktop is powered by GNU/LinuX, Gentoo-1.4_rc2   
         New Homepage: http://milkstone.d2.net.au/          
 ** Linux Registration Number: 103931,  http://counter.li.org **
Reply to
Terry

In article , Terry writes

This is what I saw re SCO and C++ (see below) .... How they hell they expect to enforce this in the VERY unlikely outside chance that the win is any bodies guess.

In the C and C++ standards panels they haven't stopped laughing. Even Dennis Richte commented (see below)

In article , Dennis Ritchie writes

So it makes the comments blow look as though some one is taking mind altering substances :-)

Next SCO claim they invented the internet :-)

/////////////////////////////

SCO already believe they own C++ and have been claiming license revenue for years...

From Alexander Terekhov on the Boost lists:

formatting link
tml

We get several dozen requests a month just to come in and see AIX or HP-UX code base. And C++ programming languages, we own those, have licensed them out multiple times, obviously. We have a lot of royalties coming to us from C++. It was interesting to see the depth of Caldera's intellectual capital.

formatting link

C++ Issues

MozillaQuest Magazine: C++ appears to be one of the properties that SCO acquired through Novell's acquisition of AT&T's UNIX Systems Laboratories and subsequent purchase of Novell's UNIX interests by SCO. At this time most Linux and/or GNU/Linux distributions include C++ compilers and editors. Is this something for which SCO currently charges? If so, just what are the current arrangements? If not, will C++ licensing and enforcement be added to SCO's licensing and enforcement program?

Blake Stowell: C++ is one of the properties that SCO owns today and we frequently are approached by customers who wish to license C++ from us and we do charge for that. Those arrangements are done on a case-by-case basis with each customer and are not disclosed publicly. C++ licensing is currently part of SCO's SCOsource licensing program.

MozillaQuest Magazine: How about GNU C++? Does GNU C++ use SCO IP? If so, could SCO license and/or charge for use of its IP in GNU C++?

Blake Stowell: I honestly don't know.

MozillaQuest Magazine: Does the C++ that currently is included in most if not all Linux distributions contain SCO IP?

(a) If so, is that being done with or without SCO permissions/licensing?

(b) If so, what impact/affect does this have on the ability of people to freely distribute and use copies of those Linux distributions? (Under GNU licensing, anyone may make as many copies of a GNU/Linux distribution as they please, freely distribute them for no charge and/or for a charge, and use a GNU/Linux on as many computes as they please -- at no charge. Etc.)

Blake Stowell: Again, I don't know. That's something we would have to research.

regards, alexander.

P.S.

formatting link

6 SCO will sue and send $1M bills to every government branch found using Linux. IBM's CEO will offer NASA $1B cash and indemnify the agency from any damages if they make SCO's Darl McBride a "space tourist" in orbit, but with no return ticket.

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/\ /\/\/ snipped-for-privacy@phaedsys.org

formatting link
\/\/ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Reply to
Chris Hills

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.