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,3025dd6d917b499c X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.81.98 with SMTP id z2mr5032087pax.19.1349857050173; Wed, 10 Oct 2012 01:17:30 -0700 (PDT) Path: t10ni23660122pbh.0!nntp.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx02.iad01.newshosting.com!newshosting.com!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: Wed, 10 Oct 2012 11:17:27 +0300 Organization: Tidorum Ltd Message-ID: References: <38af7fb8-b0a4-4a31-87aa-b7b698cc89c3@googlegroups.com> <3ca0ffd0-1764-484b-8fab-17c0d2dd9463@googlegroups.com> <1f645050-cf4c-40bf-a797-9687b69e4a54@googlegroups.com> <18ats2960nsvm$.kfufsnul13aq$.dlg@40tude.net> <5072c9ae$0$6562$9b4e6d93@newsspool4.arcor-online.net> <4keoa6epdxt7.1nnwxy7v7ar90.dlg@40tude.net> <5072dc68$0$6554$9b4e6d93@newsspool4.arcor-online.net> <1f7cmfp1l65w1.1deog8cfxbs0u$.dlg@40tude.net> <5072e37a$0$6556$9b4e6d93@newsspool4.arcor-online.net> <877gr0hcvz.fsf@ludovic-brenta.org> <891f0a08-da88-4cec-bcbc-3a987d3c05fd@googlegroups.com> <85391mg990.fsf@stephe-leake.org> <87k3uyg60j.fsf@ludovic-brenta.org> Mime-Version: 1.0 X-Trace: individual.net 1hIAw3ksruwuV98vDmXg/AIeZOt/BYV2i3amJ14Zm9tDINfPSu++na1FtyKH6txs36 Cancel-Lock: sha1:j/kzRw1CusqyE01ZLDcBbCeJBgA= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 In-Reply-To: <87k3uyg60j.fsf@ludovic-brenta.org> X-Received-Bytes: 5197 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Date: 2012-10-10T11:17:27+03:00 List-Id: On 12-10-10 10:06 , Ludovic Brenta wrote: > Niklas Holsti writes: >> On 12-10-10 08:56 , Stephen Leake wrote: >>> kalvin.news@gmail.com writes: >>> >>>> I agree with Niklas. Some bare metal system require that the (C >>>> language) startup code does some initialisation for the runtime >>>> system. >>> >>> I'm confused. If you are using someone else's "runtime system", then >>> in what sense is this "baremetal"? >> >> It was Ludovic who said that baremetal programming is hard in any >> language, especially the bootstrap stage. >> >> The bootstrap can indeed be complex. Some of the bigger, more complex >> microcontrollers start up after reset in a kind of "safe mode" with >> perhaps no usable SW stack, perhaps a very slow clock, and perhaps >> unable to access off-chip memory. To enable normal operation, the >> clock generator has to be configured, the off-chip memory controller >> has to be configured, perhaps some parts of the app SW have to be >> copied from the flash to RAM, etc. > > Yes. When I mentioned bootstrap I meant it in two senses: the one you > just described i.e. bootstrap of the processor and other devices, and > also the bootstrap of the toolchain. Ah, I didn't understand that you meant also toolchain bootstrap, sorry. I agree that is difficult, both for C and for Ada. > If your target doesn't have a > compiler available, you must create one before you can do anything. Yep. And here is the main difference between C and Ada. C cross-compilers for most targets exist; for Ada not. > Practically speaking that means binutils and GNAT configured as > cross-tools for that particular board. Also the connection between the > host and target computers (USB? JTAG? RS-232? etc.) This doubles > complexity of the *initial* investment one has to do before even > starting to program their application. Yes. And this leads to the interesting and (I think) crucial question: assuming that GNU cross-tools exist for C for some target, how difficult is it to add GNAT to those tools? With and/or without tasking? And how difficult is it to maintain it when GNU and GNAT evolve? Apparently quite difficult, since so few have been done. > I agree that it would be very nice if there were some preconfigured > cross-toolchain for Ada for some kind of "standard" bare-board target. > AVR-Ada and GNAT for Lego Mindstorms are currently the closest things to > such a "standard" but beyond that, programmers are on their own to > create a cross-toolchain. Agreed. > It is feasible (after all the ones who > created AVR-Ada and GNAT for Lego Mindstorms were "on ther own" too) but > not for the faint of heart and certainly not for beginners. I think the OP's concerns was that there seems to be little activity to drive the creation of such Ada tool-chains, and what can we do about that? Can we interest the chip-makers (e.g. Atmel) or cross-tool providers (e.g. Crossworks) to do or support such activities? Can we cooperatively provide how-to guides for adding cross-GNATs to cross-GNU-C tools? > That's why I stand by my recommendation that hobbyists who have a > specific application in mind (rather than a specific target board they > want to play with) should avoid these two bootstrap stages altogether > and start programming their application on a Raspberry Pi or Lego > Mindstorms NXT. I strongly agree. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .