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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a02:9688:: with SMTP id w8-v6mr4581964jai.16.1531580244457; Sat, 14 Jul 2018 07:57:24 -0700 (PDT) X-Received: by 2002:aca:f495:: with SMTP id s143-v6mr2043488oih.7.1531580244181; Sat, 14 Jul 2018 07:57:24 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.uzoreto.com!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!d7-v6no3540410itj.0!news-out.google.com!n194-v6ni2732itg.0!nntp.google.com!g2-v6no3532323itf.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 14 Jul 2018 07:57:23 -0700 (PDT) In-Reply-To: <821c650e-72ae-4bd1-97a4-3a9bd7433d48@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=71.171.111.51; posting-account=QF6XPQoAAABce2NyPxxDAaKdAkN6RgAf NNTP-Posting-Host: 71.171.111.51 References: <1d3743b1-1a36-429d-92c7-9ae0e7c16e63@googlegroups.com> <8cf99886-bbf2-4fb9-9a92-aaa5403a2624@googlegroups.com> <821c650e-72ae-4bd1-97a4-3a9bd7433d48@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Ada: A beginners experience From: Jere Injection-Date: Sat, 14 Jul 2018 14:57:24 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:53808 Date: 2018-07-14T07:57:23-07:00 List-Id: On Friday, July 13, 2018 at 11:53:15 PM UTC-4, blakemi...@gmail.com wrote: > On Saturday, July 14, 2018 at 10:53:02 AM UTC+8, Dan'l Miller wrote: > > On Friday, July 13, 2018 at 9:36:32 PM UTC-5, blakemi...@gmail.com wrot= e: > > > At the moment I spend too much time trying understand how to make my = tools work, and not enough time > > > using my tools.=20 > >=20 > > Specifically what do you mean by =E2=80=9Cmake the tools work=E2=80=9D?= Do you spend > > 1) more time tweaking the command-line and build scripts and surroundin= g ecosystem, as getting exasperated trying to get the toolchain to work tog= ether (almost independent of Ada-the-language-per-se)=20 > > or > > 2) more time having lengthy errors/warnings-from-compiler conversations= with the GNAT compiler about Ada source code, as cycles of learning of lea= rning Ada itself? >=20 > The first of the two options, well at least most of the time. An example = of the entry barrier level is the Inspirel tutorials for Ada on the Cortex-= M. I have tried many times to make this work, but so far I have had no luck= . (The author posts here so I will add that I have still learnt a lot from = the tutorial). This is the only beginner style tutorial that I have found, = but I have run into trouble with it. > I have been able to get lights blinking on a STM32F4discovery board usin= g the GPL-2018-community release and I am working my way through the code t= o truely understand it. I've been able to get some external leds flashing s= o I am having some success along the way.=20 > I don't mind the compiler telling me off, and correcting my mistakes but= fighting the toolchain, and even trying to understand the toolchain comple= tely is hard going. > I am determined to understand how it all works, and learning to deal wit= h problems of building software and board support packages may simply come = with the territory. But some clear documentation that doesn't make assumpti= ons about prior knowledge would also help. >=20 > Mike Blake Back a few years ago, I started similarly to where you did. I did find the Inspirel book to be very good, but you had to understand the context it was coming from. It seemed to assume you were natively (not cross) compiling your code. I ran into trouble because I wanted to work on a controller bare-metal (it was too small for a full Ada runtime). There were various small issues with the examples in the book vs what I found trying to cross compiler, so I stopped for a bit and decided to change up. I looked into taking baby steps of making a Zero-Foot-Print (ZFP) runtime. I grabbed a copy of one of Simon Wright's old ZFP projects and took the time to figure out what needed to be changed for that board, this included not only the ada files, but the linker script as well. Once I got that working and I continued on with the Inspirel book and got some basic IO stuff working. I found some other inconsistencies which appeared to be due to differences in the linkerscript I was using and the one used in the book. After that I worked on adding small extra features (leaving ZFP behind at this point and becoming nearly-ZFP). I guess the point of all this, is bare-metal is not easy in Ada, it takes a lot of small steps. I do wish there were more beginner friendly resources, but what I have found is that there is just not enough community with both time and money to get there (perhaps in the future though). I think the suggestions to go with a higher level embedded project targetting something like the beagle bone or raspberry pi are very good suggestions until you are more comfortable with the tools. I agree, definitely not very beginner friendly, which is a shame.