From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f849b,b8d52151b7b306d2 X-Google-Attributes: gidf849b,public X-Google-Thread: 103376,a00006d3c4735d70 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-24 14:15:10 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!mail.nartron.COM!not-for-mail From: iddw@hotmail.com (Dave Hansen) Newsgroups: comp.arch.embedded,comp.lang.ada Subject: Re: Certified C compilers for safety-critical embedded systems Date: Wed, 24 Dec 2003 22:19:23 GMT Message-ID: <3fea086c.110513550@News.CIS.DFN.DE> References: <3fe00b82.90228601@News.CIS.DFN.DE> <3FE026A8.3CD6A3A@yahoo.com> <3bf1uvg2ntadvahfud2rg6ujk24sora6gr@4ax.com> <2u3auvogde8ktotlaq0ldiaska3g416gus@4ax.com> <20619edc.0312221020.3fd1b4ee@posting.google.com> <20619edc.0312222106.3b369547@posting.google.com> <45cs9hAbLc6$EAAx@phaedsys.demon.co.uk> <3fe9f0d7.104475725@News.CIS.DFN.DE> NNTP-Posting-Host: mail.nartron.com (216.65.187.224) X-Trace: news.uni-berlin.de 1072304109 12173734 216.65.187.224 ([97677]) X-Newsreader: Forte Free Agent 1.21/32.243 Xref: archiver1.google.com comp.arch.embedded:6083 comp.lang.ada:3792 Date: 2003-12-24T22:19:23+00:00 List-Id: On Wed, 24 Dec 2003 20:41:41 +0000, Chris Hills wrote: >In article <3fe9f0d7.104475725@News.CIS.DFN.DE>, Dave Hansen > writes [...] >>The AVR is supported by GCC, >GCC is not usually suitable for 8 and 16 bit embedded systems. IT is a >generic compiler system that is not usually a patch onthe commercial >ones.. Avr-gcc actually generates _very_ nice code for the AVR, better than one commercial compiler I use, and comparable with another. Of course, unlike the 8051, the AVR was developed with HLL (esp. C) in mind. For example, it has 32 general-purpose registers. [...re: 8051...] >>though there is a Modula-2 >>compiler. > >But is it any good? You'd have to ask Mr. Granville. Though I think I know what he'd say. ;-) But as a datapoint, it was able to come within one instruction of my handwritten assembly on a pathological checksum routine I posted back in January of 1999 (seven instructions vs. six). The Keil C compiler I was usingat the time (v5.5 IIRC) was unable to do better than 13, even when using the intrinsics for byte rotation and testing the carry bit. So from what little I've seen, I'd say it looks quite good. > >I once had to work on an embedded system using Mod2 a none of the >compilers supported the basic language in the same way. Let alone >extensions. It turned out that the most stable compiler was the least >standard :-( > >A theoretically good language is no use at all if the compiler >implementations are no good. Fewer implementations implies fewer good implementations, true. At least the odds are reduced. Fewer targetted platforms means your code is less portable as well. > >At least with C there will usually be several commercial compilers and a >multitude of testing and checking tools. I think I said it earlier in this thread: The only processors I'm aware of that don't have a C or NQC (Not Quite C) compiler are four-bitters. It's ubiquitous. But C can be, umm, subtle, and static checking tools (particularly Lint) are IMHO _required_. Sadly, they're not often used. > >It's one thing having a compiler but what about the rest. How many ICE >support ADA? Nit: ICE is hardware. And the various debuggers I've seen shipped with most ICE systems don't support C particularly well either. And I haven't used an ICE in years. Regards, -=Dave -- Change is inevitable, progress is not.