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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!goblin2!goblin.stu.neva.ru!reality.xs3.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Ada platforms and pricing, was: Re: a new language, designed for safety ! Date: Wed, 18 Jun 2014 22:46:02 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <1402308235.2520.153.camel@pascal.home.net> <85ioo9yukk.fsf@stephe-leake.org> <255b51cd-b23f-4413-805a-9fea3c70d8b2@googlegroups.com> <5ebe316d-cd84-40fb-a983-9f953f205fef@googlegroups.com> <2100734262424129975.133931laguest-archeia.com@nntp.aioe.org> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1403149563 25651 69.95.181.76 (19 Jun 2014 03:46:03 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 19 Jun 2014 03:46:03 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Original-Bytes: 5551 Xref: number.nntp.dca.giganews.com comp.lang.ada:187063 Date: 2014-06-18T22:46:02-05:00 List-Id: "Simon Clubley" wrote in message news:lnsqus$d4j$1@dont-email.me... > On 2014-06-17, Randy Brukardt wrote: >> "Simon Clubley" wrote in >> message news:lnn8ff$k42$1@dont-email.me... >>> Many of those people wanting to explore the language will be wanting >>> to explore Ada by using it on embedded platforms so you need a range >>> of Ada cross compilers available in the same way you have a range of >>> C cross compilers available for those same people to use. >> >> It's impractical to have any such cross-compilers. Every such compiler >> (run-time, really) has to be tailored to the specific board in question. >> We >> treated each embedded compiler as something that would require extensive >> support, and I still think we lost money on each. >> > > You are thinking of this as a monolithic commercial product. Things are > much more modular in the open source world. Not at all. Janus/Ada is structured almost as you describe below: > Taking the ARM bare metal (C language) world as an example: > > 1) At the bottom layer you have the compiler itself. This just generates > code for a set of ARM architecture variants such as Cortex-M3 and > Cortex-A8 as well as older ARM architecture variants such as the ARMv5 > variants. It has absolutely no knowledge of any specific MCU or any > board which that MCU might be placed on. Things like memory layouts > are handled in linker scripts. Yup. But no one can do anything useful with such a thing. It's trivial to take a version of Janus/Ada and use it as a cross-compiler for some board. But without a runtime, hardware support, and the like, only the most dedicated people could use it for anything. > 2) At the next layer up you have code to support a specific MCU. As > well as MCU specific startup code, this includes things like interrupt > handling which is MCU specific in the ARM world. This code generally > comes from the manufacturer of the MCU and is usually free. But it's probably not in a form that could be used for Ada. Certainly not unless you're planning to require having an C compiler around as well (not really good marketing for Ada). > 3) At the next layer up you have a code library to support the > peripherals on a specific board. If this is a standard board, this > code might be written for you by the manufacturer, or you might have > to write this code yourself. Right, and this is where the problem is. These have to developed for every board for Ada, and there's little likelyhood of anything from the manufacturer. You could of course use some zero-footprint subset of Ada to minimize the need for that; to me, such things are so emasculated (no exceptions, no tasks, no I/O, etc.) that they're of little value for teaching Ada. (You get C-in-Ada-syntax at best, little to be gained there.) ... > I don't know about Luke, but when I talk about Ada cross compilers, > I'm only really thinking about the first part (the compiler itself) > although you will probably need to add in Ada specific initialisation > code into the MCU startup code. Provided the calls into the Ada RTL > are cleanly documented then that's not a problem for me. You'd be very much in the minority. Remember, for the sorts of people you are talking about, the compiler is going to have to work pretty much out of the box, as the normal person isn't going to have the Ada knowledge needed to write a runtime for a particular board. Besides, pretty much any compiler will work fine as a bare targeted compiler; the problems are all in the libraries. (The only reason you couldn't use Janus/Ada for that would be the fact that we never built an ARM code generator. But that's easy to do, especially if you're not insisting on perfect code -- less than a months work. The RTS would take 3 times that.) Randy.