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=0.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,3025dd6d917b499c X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.216.211.101 with SMTP id v79mr802044weo.9.1350352455040; Mon, 15 Oct 2012 18:54:15 -0700 (PDT) Path: q11ni134324876wiw.1!nntp.google.com!feeder1.cambriumusenet.nl!feeder2.cambriumusenet.nl!94.232.116.12.MISMATCH!feed.xsnews.nl!border-2.ams.xsnews.nl!feeder3.cambriumusenet.nl!feed.tweaknews.nl!216.196.110.142.MISMATCH!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news.panservice.it!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Ada, the best language with the not-so-best tool chain Date: Sun, 07 Oct 2012 23:33:11 +0300 Organization: Tidorum Ltd Message-ID: References: <38af7fb8-b0a4-4a31-87aa-b7b698cc89c3@googlegroups.com> Mime-Version: 1.0 X-Trace: individual.net YjvXMba4QdXz9YAIowQHqQHiND0ZY0kxPsP6ihKWR0Cewl6Q8M Cancel-Lock: sha1:GpprtLQ+4d3YbPly1fsd0cHegyA= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 In-Reply-To: <38af7fb8-b0a4-4a31-87aa-b7b698cc89c3@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Date: 2012-10-07T23:33:11+03:00 List-Id: On 12-10-07 20:34 , Patrick wrote: > I think Ada is the best language ever. I have a subset I like > now(just 95 really ) and I find it so easy to read other peoples Ada > code. Nice to hear. For me, being able to easily read my own code, written a few years ago, is also important :-) > However.. I am I think all this goodness has come with a price. A > difficult to implement language. > > I wanted to use it for embedded design(as in baremetal) but no free > of cost version lets me do that. AVR-Ada? Or GNAT for AVR? Granted, there is no tasking... Or MaRTE OS, that has tasking, but it is only for x86 targets. Well, you can get pretty small x86 systems for embedded applications. http://marte.unican.es/index.htm. > There is a new driver tutorial out for Minix3 and I was thinking > about writing a driver but I can't do that either. There is no gnat > on Minix and you can't cross compile for minix from Windows/Linux > etc.. so I don't know how to get ada on it... You could use the Ada-to-C version of the AdaMagic compiler. But it is not free. However, I'm sure that there are lots of languages that are not available on Minix3, so Ada is not alone... Minix3 claims to supports POSIX, gcc, a cross-compiling gcc (http://wiki.minix3.org/en/DevelopersGuide/Crosscompiling), and the binary format is ELF. This suggests to me that a port of GNAT may be no more difficult than for some Unix-like system. > So basically I have Linux/BSD/Windows/OpenIndiana but these are all > pretty heavy and quite complex relative to RTOS or Minix3. > > Actually it does not really matter what /*I want */ the community as > a whole doesn't have enough options when compared to C. Many of us want or wish for free or low-cost Ada systems on bare-metal microcontrollers; we have GNAT on AVR and MaRTE OS on x86. My favourite for a target would be ARM Cortex M0-M4. > No solution will be easy but I was hoping to start a hypothetical > discussion on solutions. > > For instance: > > 1)If we had a Ada runtime written in C, then we could cross compile > with GCC as-is no? No. Standard (portable) C does not have all the features needed for an Ada run-time, in particular for tasking. POSIX could help on the tasking part. But since the system needs an Ada compiler anyway, we might as well or better write the run-time in Ada. There already are free run-times: the Open Ravenscar Kernel ORK, and the run-time system in MaRTE OS. > 2)ASM is not really portable but surely some flavours must be, If we > had a converter, we could cross compile at the ASM stage no? In theory, yes. In practice, it seems quite difficult for an assembly-level or binary-level translator from machine A to machine B to translate dependencies and uses of the run-time environment, which is very machine-specific in its details. It would probable be simpler to write an emulator for machine A, using some programming language available on machine B, thus creating a virtual A-machine running in the B-machine. That would of course slow down programs by some factor. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .