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,WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8518fb63d2af28cf X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.211.136 with SMTP id nc8mr14335149pbc.6.1335825112780; Mon, 30 Apr 2012 15:31:52 -0700 (PDT) Path: r9ni117367pbh.0!nntp.google.com!news1.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: mjsilva@scriptoriumdesigns.com Newsgroups: comp.lang.ada Subject: Re: Tasking on GNATAVR Date: Mon, 30 Apr 2012 15:07:53 -0700 (PDT) Organization: http://groups.google.com Message-ID: <13692499.358.1335823673528.JavaMail.geo-discussion-forums@yncd9> References: <19355816.2739.1335755877395.JavaMail.geo-discussion-forums@ynlp3> NNTP-Posting-Host: 12.35.64.226 Mime-Version: 1.0 X-Trace: posting.google.com 1335825112 11493 127.0.0.1 (30 Apr 2012 22:31:52 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 30 Apr 2012 22:31:52 +0000 (UTC) In-Reply-To: <19355816.2739.1335755877395.JavaMail.geo-discussion-forums@ynlp3> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=12.35.64.226; posting-account=qZVz2QoAAAAN9WxYp-9jYb7jORc4Zqwt User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-04-30T15:07:53-07:00 List-Id: On Sunday, April 29, 2012 8:17:57 PM UTC-7, Rego, P. wrote: > Ok, now I got to build and burn the .hex in an Arduino Duemilanove atmega= 328p totally in Ada using GPL GNATAVR in GPS, following=20 > http://student.agh.edu.pl/~mkucia/wiki/doku.php?id=3Davrada > and much help from you guys.=20 >=20 > In short it consists of: > 1) Converting a .xml (from AVR Studio) to the atmega328p package spec, wh= ich maps all the memory addresses of the chip (so I don't have to do it) > 2) Using this spec package from a main file > 3) GPS builds the .elf linking with a WinAVR object library > 4) From command-line, convert the .elf in .hex and burn it into the chip = using avrdude. >=20 > Now a simple blink program runs quite well, so runs accordingly as I burn= it and start the chip. >=20 > At this point, we achieve the same coding paradigm than AVR Studio, but i= n Ada from GPS, not in C anymore. >=20 > But now I want to include tasking on the code, and I did not find so many= resources in documentation (actually I just found http://docs.adacore.com/= gnat-cross-docs/html/gnat_ugx_12.html). Anyway, I included=20 >=20 > task My_Useless_Task; > task body My_Useless_Task is > begin > null; > end My_Useless_Task; >=20 > and when I tried to build, builder returned me >=20 > main.adb:13:04: construct not allowed in configurable run-time mode > main.adb:13:04: file s-parame.ads not found > main.adb:13:04: entity "System.Parameters.Unspecified_Size" not available > main.adb:13:04: violation of restriction "No_Tasking" at system.ads:52 >=20 > I also tried to look inside system.ads (c:\gnat\2011\lib\avr\4.5.3\rts-zt= p\adainclude\system.ads, which is installed with GNATAVR package), and ther= e is plenty of pragma restrictions, including pragma Restrictions (No_Taski= ng). I commented this pragma Restrictions (No_Tasking), but just the 4th er= ror line vanished. >=20 > So, what should I do to make the tasks work? AFAIK, there is no AVR Ada runtime, so it would have to be written. I have= no idea how much work that would be.