comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Drummond <brian@shapes.demon.co.uk>
Subject: Re: Tasking on GNATAVR
Date: Tue, 1 May 2012 08:27:16 +0000 (UTC)
Date: 2012-05-01T08:27:16+00:00	[thread overview]
Message-ID: <jno6p4$3dg$1@dont-email.me> (raw)
In-Reply-To: 13692499.358.1335823673528.JavaMail.geo-discussion-forums@yncd9

On Mon, 30 Apr 2012 15:07:53 -0700, mjsilva wrote:

> 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
>> 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
>> 
>> violation of restriction "No_Tasking" at system.ads:52
>
>> 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.

Warren Gay reported success with experimental tasking on AVR some time 
ago, (about a year?) using the open source AVR-Ada toolchain (from 
Sourceforge). It was intended to be included in AVR-Ada 1.2 which is 
scheduled for release very soon, but I don't know if it's still included.

Search for Warren's AVR-Ada posts for some more information, and keep 
eyes open for AVR-Ada 1.2. 

I haven't tried the Adacore version so I don't know how/if they inter-
operate.

- Brian




  reply	other threads:[~2012-05-01  8:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-30  3:17 Tasking on GNATAVR Rego, P.
2012-04-30 22:07 ` mjsilva
2012-05-01  8:27   ` Brian Drummond [this message]
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