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: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: Runtime startup code for the GNAT Runtime...and a bit of humble pie. Date: Tue, 26 Mar 2013 11:04:05 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <21ad4ef7-0e4a-40ba-ac3f-fe21018c7bd9@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 26 Mar 2013 11:04:05 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="da745e888d4a5182b5fda6212bbb0a63"; logging-data="9604"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18B0EyT4Xvr2/zR0ga3vlRv0T0+TzqXO04=" User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Cancel-Lock: sha1:B/xlGwBQ9xTg0yCANimCvGnSLiU= Xref: news.eternal-september.org comp.lang.ada:14721 Date: 2013-03-26T11:04:05+00:00 List-Id: On Wed, 20 Mar 2013 13:18:57 +0000, Simon Clubley wrote: > On 2013-03-20, Brian Drummond wrote: >> On Wed, 20 Mar 2013 00:54:38 +0000, Simon Clubley wrote: >>> Reading the comments, I think my problem here isn't really with Ada, >>> but with GNAT; hence it's really a toolchain problem and not a >>> language problem. [...] >>> You also have no confidence that the model you have built is >>> sufficiently complete to result in a robust port. >> >> What in your view would be required to give you that confidence? >> >> > Coherent and structured porting documentation. > > Something designed for documenting the porting process will cover the > overall architecture in a way which allows you to build a consistent > model and is also going to cover the major "gotcha" issues. Even if the > initial versions did not cover all the major issues, the later versions > would as a result of the inevitable peer review type process which would > occur. I admit I am surprised to hear documentation ahead of test. But that makes it all the more worth hearing. OK, here goes... http://sourceforge.net/projects/msp430ada/files/doc/MSP430-Ada.pdf/ download how am I doing so far? Frank criticism welcome. And I don't expect many people to actually follow the process at this stage : it's a record of how I got to the current stage (that the dedicated can follow). I am painfully aware that toolchains need to be available in easier forms. And having spent 9 hours yesterday building AVR-Ada 1.2.1 from its "one click" script I know that getting toolchains into that stage is not trivial. > I'm not yet building my own satellites :-), but even when you want to > start putting your code in things which fly through the air any > responsible person is looking for a higher standard of reliability than > for something which flashes pretty lights on a workbench. I think the only practical way to get to that standard is via the flashing light stage. But to pass through that stage looking ahead - aiming higher and dealing with the misses. >>> The bit you are missing is that the C environment already exists on >>> the target environment, but even a minimal Ada does not. > A example of a bare metal environment would be AVR libc or AVR-Ada been > used in code running directly on a AVR (ie: without a OS underneath). > A example of something which is _NOT_ a bare metal environment in my > eyes would be running something on top of RTEMS or on top of another > RTOS kernel. Okay, thanks. So bare metal is not quite bare but includes basic RTS support. Thus for some platforms (AVR), both C and Ada environments exist. For the MSP, what exists for Ada so far must be regarded as untested, but leverages the AVR. Some testing is in progress and so far one problem has appeared (still being characterised, so logged on the project but not in the pdf). I hope that this process will help me to build some experience to make future ports easier. - Brian