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:a24:9195:: with SMTP id i143-v6mr4143879ite.52.1531570263881; Sat, 14 Jul 2018 05:11:03 -0700 (PDT) X-Received: by 2002:aca:4787:: with SMTP id u129-v6mr1980745oia.4.1531570263590; Sat, 14 Jul 2018 05:11:03 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.swapon.de!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!g2-v6no3421423itf.0!news-out.google.com!n194-v6ni2585itg.0!nntp.google.com!g2-v6no3421421itf.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 14 Jul 2018 05:11:03 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=60.240.22.198; posting-account=9p4LagoAAACu4hgIpT2I_W6cajcJVP4I NNTP-Posting-Host: 60.240.22.198 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: <5aae945e-c0cb-4ba8-9d9b-8e21b4aef174@googlegroups.com> Subject: Re: Ada: A beginners experience From: blakemichael073@gmail.com Injection-Date: Sat, 14 Jul 2018 12:11:03 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:53800 Date: 2018-07-14T05:11:03-07:00 List-Id: On Saturday, July 14, 2018 at 7:26:21 PM UTC+8, Brian Drummond wrote: > On Fri, 13 Jul 2018 20:53:13 -0700, blakemichael073 wrote: >=20 > > 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 > >> wrote: > >> > At the moment I spend too much time trying understand how to make my > >> > tools work, and not enough time using my tools. > >>=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 > >> surrounding ecosystem, as getting exasperated trying to get the > >> toolchain to work together (almost independent of > >> Ada-the-language-per-se) > >> or 2) more time having lengthy errors/warnings-from-compiler > >> conversations with the GNAT compiler about Ada source code, as cycles > >> of learning of learning Ada itself? > >=20 > > The first of the two options, well at least most of the time. An exampl= e > > 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. >=20 > First, thank you for persisting. >=20 > Second, what you are seeing is primarily the result of being one of=20 > relatively few people going down this path; it's a vicious circle,=20 > because there are relatively few peoplo on the path, there aren't many=20 > good maps (tutorial examles, easy to install tools) and lots of weeds.=20 > Which makes it harder to get started and puts off some people. >=20 > Third - I'd agree it's easier to learn the language itself on a desktop= =20 > environment, but I don't agree you have to put the STM32 aside for very= =20 > long. You can combine both approaches with some advantage, and it will=20 > stand you in good stead in the longer term. >=20 > For example, you can write a loop >=20 > loop > Wait(1.0); > Led_On; > Wait(1.0); > Led_Off; > end loop; >=20 > and test it with procedures like >=20 > procedure Led_On is > begin > Ada.Text_IO.Put_line("LED is ON"); > end Led_On; >=20 > (and use the Delay subprogram for Wait) >=20 > and compile and test it on the desktop. >=20 > Put the subprograms in a package and write two package bodies; one which= =20 > works on the desktop as above, and one which works on the STM32 (or=20 > Arduino, or MSP430 [1]). Packages are basic and very useful, worth=20 > learning early. >=20 > Then learn enough about the build system (either Gnatmake or Gprbuild) to= =20 > compile either package body and link for either target, and you are well= =20 > on the way to keeping your code easily portable to other targets. >=20 > For serious large scale control applications, you'll need to learn=20 > tasking, as Dmitry says (more likely a subset of full tasking like the=20 > Ravenscar profile), but you can go quite a long way before that stage. > And again that's easier if you prototype on the desktop and move to the= =20 > micro once it's working. >=20 > Just some suggestions for getting started. >=20 > -- Brian >=20 > [1] https://sourceforge.net/projects/msp430ada/ > Not easy to install, and seriously needs updating... My learning approach at the moment is to work on learning Ada programming o= n application type programming from some of the books available. The adacra= ft book by John English has been very good, I started with Andrew Schvets = Introduction to Ada Programming and there are other good resources out ther= e.=20 My interest is particularly in real time systems, and I thought that start= ing with micro-controllers would be a good place to start. It would give me= a good understanding of interacting with the hardware as well as building = my programming skills. So for the moment I will most likely try to learn th= ese skills in C for a while which is well supported, and try to cross refer= ence to Ada when I can. I did look at rtems as a possible learning platform= for real time systems (they have google summer of code students after all)= and could not get access to their email forum, so I am already light years= ahead here. =20 Mike Blake