Learning embedded systems

I think, at £10 it would not break the bank to check it out in the pdf format first. If it is of relevence then paying for the paper copy would not seem so bad. However, please remember that the MISRA-C document only provides guidelines to coders. It says nothing about the other system design aspects at all. If Safety is a concern then you should check out ISO/IEC 61508 ore the industry specific versions of that standards. The FDA documents and CE directive on medical devices would also be required reading if medical devices are what you are developing. The MISRA-C guidelines are only an adjunct to those.

--
********************************************************************
Paul E. Bennett ....................
 Click to see the full signature
Reply to
Paul E. Bennett
Loading thread data ...

[%X]

Curiosity is OK at times. If you need to know what the MISRA-C guidelines suggest for making C a safer programming language then you should get hold of the pdf version at the very least (it is cheap enough, though not free).

I consider that making the investment in a copy would enable you to argue your point of view with much more authority.

All programming languages are unsafe without a decent development process behind them to support the design decisions being made. However, with such a decent development process in place that applies tests and reviews at frequent intervals, then a safe system can be produced with any language. It is true that you may only use a subset of some of the languages but selecting the subset is part of the development process.

--
********************************************************************
Paul E. Bennett ....................
 Click to see the full signature
Reply to
Paul E. Bennett

Sort of, but not really. Compilers don't do so well here as I've noticed. Ie, the Metrowerks PowerPC compiler allowed you to tell it that you were on an MPC860, but it still insisted on unrolling loops so that they'd no longer fit into the instruction cache. I'm assuming it essentially just had one code generator that didn't change much, and telling it what cpu you head merely enabled different pseudo-variables.

But I thought you were arguing that assembly wouldn't be necessary in the future, and wouldn't that include inline-assembly also?

Of course. But aren't we just talking about small fragments of code here? Inline-assembler, context switches, bootstrapping, etc?

--
Darin Johnson
    "You used to be big."
 Click to see the full signature
Reply to
Darin Johnson

In article , Chris Hills writes

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

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

Reply to
Chris Hills

do you have the links for these?

A coding standard is only a small part of the process.

The point is that this one is becoming the standard one for C. It is not perfect and MISRA-C 3 will be better.

There will be a test suite for MISRA-C2 and that will be free.

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

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

Reply to
Chris Hills

now 61508 IS expensive.... over 1000 USD AFAIK.

This is correct a coding guide line is only part of the process.

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

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

Reply to
Chris Hills

Indeed.

As I figured, saying, "I think it's only a small part of a larger picture."

Jon

Reply to
Jonathan Kirwan

... snip ...

Well, I spend many years developing medical instrumentation at a time when nothing was available. I developed the hardware, run-time, compilers, and application, so I had a good view of the weak spots. I considered and discarded C very early, and settled on Pascal, with a complete collection of run-time and compile time tests, and very close typing. The compilers were built to the ISO standard, and validated against the industry test suite. You can see some of the details on my site in the PascalP manual. As far as I know no software or hardware errors made it into the field. So I consider myself entitled to my strong opinions here.

--
"If you want to post a followup via groups.google.com, don't use
 the broken "Reply" link at the bottom of the article.  Click on 
 Click to see the full signature
Reply to
CBFalconer

I don't have the time to retrack all these down right now, but some years ago several documents were provided by others at work who did track them down. I did remember that the Center for Devices and Radiological Health provided some of them, so here are a few easily searched ones I found there:

formatting link
formatting link
formatting link
formatting link
formatting link

These agencies in the US have interests in safe software standards:

U.S. Department of Health and Human Services Food and Drug Administration Center for Drug Evaluation and Research (CDER) Center for Biologics Evaluation and Research (CBER) Center for Devices and Radiological Health (CDRH) Center for Food Safety and Applied Nutrition (CFSAN) Center for Veterinary Medicine (CVM) Office of Regulatory Affairs (ORA)

So they may have additional documents on this.

then

ahead.

Agreed.

I hope so. ;)

How does that work? Are you talking about a test suite to validate C compilers?

Jon

Reply to
Jonathan Kirwan

Do you advocate or use any tool or technique which is less than a decade old? If not, why not? If so, what is it?

Ed

Reply to
Ed Beroset

I use gcc regularly :-) I even use kmeleon, which is a GUI browser released this year. I also use Netscape 4.75, because AFAICS no later version, including Xnews, Mozilla and Thunderbird, has the equivalent facilities for news and mail. I also use Buerg's list, which has been around for some time, regularly. My machine always has at least one command line window open.

I even write and release things under the GPL and/or public domain, most of which are in C these days. One of the reasons is that I lost my complete Pascal system in a disk crash some years ago, and I am in no mood nor condition to recreate 10 to 20 odd years of work. You can see some of these releases on my site, URL in the Organization header of this article (but not the sig for now, since that is temporarily devoted to getting google groups fixed).

I have absolutely no need for an IDE, when a couple of keystrokes can switch me from window to window to do editing, compilation, and execution. A make file customizes things very nicely. Once in a while an IDE would be handy for debugging, but a few judicious printfs usually suffice.

I also regularly use furniture that appears in pictures of my grandfathers home around 1900, and are presently in a house built in the 18th century. Works fine, even when lighted with compact fluorescent bulbs developed in the past few years.

New is not necessarily better. It is often poorer.

--
"If you want to post a followup via groups.google.com, don't use
 the broken "Reply" link at the bottom of the article.  Click on 
 Click to see the full signature
Reply to
CBFalconer

Many thanks

No. That is Plum Hall or Perennial.

This is an example set of cases that should prove a rule. EG positive and negative. Therefore if a tool claims that it does MISRA-C checking you will be able to run the test suite to confirm this.

That's the theory.... All we have to do is write it :-)

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

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

Reply to
Chris Hills

[...]

Nobody said that new was necessarily better. It's not necessarly worse either (and "often poorer" is a mischaracterization also, in my experience). My point in asking was just to suggest that if you haven't adapted to anything new in the last decade or more, maybe you're not as productive as you could be if you'd stretch a little more and try learning something new. Maybe you're happy just the way you are, but I know that if I was still doing things the way I was ten years ago, there's a lot I just plain wouldn't be able to do.

Examples of "new stuff" in the last decade (new to me, anyway): Ant, Eclipse, XML, UML, C++ STL, Spin, SVG, XSLT, ASN.1. And these are just the software-related items! Not all of these are directly put into embedded devices, but many of them are important and useful to me in constructing the whole system of which the embedded device is one piece. Maybe your embedded devices don't have to talk to anything, but I think that would not be the norm.

My theory is that if I'm not still learning, I'm stagnating. How 'bout you? What have you learned lately, or do you not place much importance on that?

Ed

Reply to
Ed Beroset

... snip ...

Many of those are, IMO, regurgitated versions of old things. One markup language is much like another, underneath. I never heard of Ant or Eclipse, except as insects or as Data General computers. Spin is another attempt to prove software correctness, and I haven't really investigated it. C++ STL is fundamentally another library, but extended to paramatized types, as I see it. The problem with that is the auto generated bloat, and the advantage is the tight specialization. It grows out of Knuths rational programming methods. Nor have I any idea what SVG, XSLT, or ASN are, except that I doubt they are truly new, in the sense of string theory.

As years go by I have gradually come to the realization that I cannot investigate everything, and that things that were put off until a more suitable time just won't get probed without having a specific requirement for it. At the same time I see more and more obvious (to me) failings being repeated and good solutions being ignored.

--
"If you want to post a followup via groups.google.com, don't use
 the broken "Reply" link at the bottom of the article.  Click on 
 Click to see the full signature
Reply to
CBFalconer

[...]

So you have no idea what they are, but you're sure they're not truly new and that they're of no interest or use? Interesting how that works.

That's an old theory too: "Ignorance is bliss."

Well if SVG, XSLT or ASN.1 were "good solutions being ignored" you'd never know, would you?

Ed

Reply to
Ed Beroset

Far from it. However the exigencies of time and energy require choices to be made. Todays society does not appear to recognize this, as evidenced by the continued waste of SUVs and avoidance of sane behaviour, accompanied by moans about oil and wars to secure it, the greed exemplified by Enron, Worldcom and Haliburton, and the urge to destroy found in the US administration.

True. When I was younger I would never have put up with it. As it is it takes more than a vague abbreviation to awaken my interest. As one of my contemporaries has said: "You have to realize your limitations". Even with all your snide remarks, how many of your acquaintances would have even recognized what 'snip' is? Look up what Dijkstra had to say on the subject 35 years ago.

--
"If you want to post a followup via groups.google.com, don't use
 the broken "Reply" link at the bottom of the article.  Click on 
 Click to see the full signature
Reply to
CBFalconer

For me, who is probably not quite as close to retirement age as CB Falconer is (judging by his CV), I find that I have not had to add very much new stuff for my embedded work in the last decade. This does not mean that I have stopped looking at all the new techniques, widgets and toys that come out with great regularity, but I find few of them are relevent enough or robust enough for the sort of High Integrity Distributed Embedded Control Systems that I develop. It also does not mean that I have added nothing new. Hoevever, what I have added has been quite carefully considered for its fit with my methods and exisiting techniques and chosen for what they will definitely add of value to me. Of course, I am still quite inventive in both the hardware and software in order to solve the problems that come my way. Lately, though, I have learned more of Ultra High Vacuum Techniques, Cryogenics and Sensor Technologies than any Uni is likely to cover. It certainly has been fun.

Incidently, I have always favoured the approach of learning what the clients domain was all about in order to put forward the most appropriate control systems for his needs. I mostly concentrate on the plant side stuff and leave the user interface (whizzy graphics etc) to others who are more comfortable doing that sort of stuff. The times I get involved in any heavily user oriented developments is when the control scheme requires the use of a supervisory key based interlock system (Fortress Keys etc).

Over the years I have built quite a library of techniques and component designs that I can put together almost Lego-like to accomplish any of the common control tasks. So, it is worthwhile keeping notes and factoring the problems properly so that you can easily identify potentially re-usable stuff.

Above all, have some fun doing the work. It gets dull otherwise.

--
********************************************************************
Paul E. Bennett ....................
 Click to see the full signature
Reply to
Paul E. Bennett

On that much, we'll agree. I was being glib.

Well, I suppose I retain the naive optimism of youth, (if not the youngness of youth!) but I can see how a reasonable person might read things differently.

The article you refer to doesn't include the word "snip" but I certainly endorse Dijkstra's notion that a program should work correctly *always* and not just some of the time. To me, it's what characterizes the major portion of the difference between a demonstration prototype and a real product.

If I seem snide, (and I'll allow that it's not an unwarranted characterization), then it's because you seem to be falling into the stereotype of rocking in your rocking chair and lamenting about "kids today" rather than actually contributing something usable on the topic.

Somebody mentions C for automotive applications and you claim, without any evidence, that it represents "gross disregard for safety."

Somebody mentions MISRA, and you dismiss it even though you've never read it.

It's not that I don't think that you have anything worthwhile to convey; it's just that you haven't been doing it very effectively lately.

Ed

Reply to
Ed Beroset

I haven't *had* to add very much new stuff either, (I've chosen to add things) but I don't think it's prudent to dismissively wave off everything new.

If you develop in a particular niche, it's reasonable that a widely cast net would not yield much of interest. Mostly, I was objecting to discarding even the notion that anything new *could* be of use, which seemed to be Falconer's stance.

Sure -- a healthy skepticism is necessary for avoiding silly fads.

Fun, IMHO, is a key point.

That's a valid approach. It's probably more effective in some ways than learning every new technology thing that comes out. It probably depends on personal preference and inclination.

I'd argue that that's learning, too. Whether you learn something from reading a study which shows techniques are effective, or you learn from looking over your own career and learning which techniques are effective, it accomplishes something similar.

Absolutely true, and as any machinist can tell you, the use of dull tools can be dangerous. ;-)

Ed

Reply to
Ed Beroset

... snip ...

You may well be right. There is very little to bring me up short these days, and I have never been known to lack opinions.

--
Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net)
   Available for consulting/temporary embedded and systems.
 Click to see the full signature
Reply to
CBFalconer

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.