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: 103376,5f6125e9594f9968 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.236.170 with SMTP id uv10mr7962521pbc.4.1333418922631; Mon, 02 Apr 2012 19:08:42 -0700 (PDT) Path: r9ni12072pbh.0!nntp.google.com!news1.google.com!goblin2!goblin.stu.neva.ru!newsfeed1.swip.net!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: BrianG Newsgroups: comp.lang.ada Subject: Re: Ada to C translator for small microcontrollers Date: Mon, 02 Apr 2012 22:08:40 -0400 Organization: A noiseless patient Spider Message-ID: References: <2424259e-cf1c-408e-a57e-f2c948087186@i2g2000vbv.googlegroups.com> Mime-Version: 1.0 Injection-Date: Tue, 3 Apr 2012 02:08:42 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="yUWvtVAdKbJE6Qj4FbjOQw"; logging-data="3312"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18jp0iWNIfUNAJ5ztcpPIUG" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.24) Gecko/20111108 Thunderbird/3.1.16 In-Reply-To: <2424259e-cf1c-408e-a57e-f2c948087186@i2g2000vbv.googlegroups.com> Cancel-Lock: sha1:SZKmoAQ63l313+EQXV2MNzRqhq8= Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-04-02T22:08:40-04:00 List-Id: On 03/26/2012 08:48 AM, Tomi Saarnio wrote: > Hi all, > > As there exists at least one free decent C cross-compiler for smaller > 8-bit and 16-bit architectures (Pic, Avr, 8051 etc.), but none Ada > compiler that I know of, I was wondering whether there is a demand for > an Ada to C translator, that would implement some sort of Ada subset > and output corresponding ANSI C source code. I am not a compiler or > Ada expert, so I cannot really estimate the effort how hard this would > be. > > As far as I can see the problem, the first thing is to identify a > suitable subset(s) to be implemented, and then to come up with the > corresponding C source idioms. > > Any comments on this subject? > > Br, > Kalvin. If the target has a GCC port, it is not that difficult to create a cross-compiler from GNAT, using No_Run_Time (i.e. no tasking, etc; you have to build your own binding to the target libraries or registers). I did this once for a uC board I have (there was an in-work Ada project at the time, but I only used their instructions for building the cross-compiler). I have no compiler or GCC experience, and was able to get it working - not sure if I could, or want to, do it again. I wonder if it's possible to create a C-target back end? :-) -- --- BrianG 000 @[Gee, Mail!] .com