comp.lang.ada
 help / color / mirror / Atom feed
From: "Rego, P." <pvrego@gmail.com>
Subject: Tasking on GNATAVR
Date: Sun, 29 Apr 2012 20:17:57 -0700 (PDT)
Date: 2012-04-29T20:17:57-07:00	[thread overview]
Message-ID: <19355816.2739.1335755877395.JavaMail.geo-discussion-forums@ynlp3> (raw)

Ok, now I got to build and burn the .hex in an Arduino Duemilanove atmega328p totally in Ada using GPL GNATAVR in GPS, following 
http://student.agh.edu.pl/~mkucia/wiki/doku.php?id=avrada
and much help from you guys. 

In short it consists of:
1) Converting a .xml (from AVR Studio) to the atmega328p package spec, which 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.

Now a simple blink program runs quite well, so runs accordingly as I burn it and start the chip.

At this point, we achieve the same coding paradigm than AVR Studio, but in Ada from GPS, not in C anymore.

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 

   task My_Useless_Task;
   task body My_Useless_Task is
   begin
      null;
   end My_Useless_Task;

and when I tried to build, builder returned me

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

I also tried to look inside system.ads (c:\gnat\2011\lib\avr\4.5.3\rts-ztp\adainclude\system.ads, which is installed with GNATAVR package), and there is plenty of pragma restrictions, including pragma Restrictions (No_Tasking). I commented this pragma Restrictions (No_Tasking), but just the 4th error line vanished.

So, what should I do to make the tasks work?



             reply	other threads:[~2012-04-30  3:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-30  3:17 Rego, P. [this message]
2012-04-30 22:07 ` Tasking on GNATAVR mjsilva
2012-05-01  8:27   ` Brian Drummond
2012-05-01 15:44     ` Rego, P.
2012-05-04  4:08       ` Building an RTS for my AVR Rego, P.
2012-05-01 15:08   ` Tasking on GNATAVR Rego, P.
2012-05-04  8:52     ` Brian Drummond
2012-05-04 17:08       ` Rego, P.
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox