This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNAT on AVR microcontrollers


I have recently started to port the current GNAT version to target the AVR
microcontrollers. A web page about GNAT on AVR microcontrollers shows the
current status:

 http://tech.ebert-langer.de/avr-gnat.html

In short, only very basic functionality is available. The compiler really
crashes very often.  I hope to get some help from this list.

On the web page I reckon that it is the first attempt to target 8-bit
microcontrollers from GNAT. Is that really true? Who else did try that
before, what were your difficulties?

Another goal is to make interrupts work. This should in the end use the Ada
syntax of protected types and the pragma Attach_Handler. That is propably
still a long way to go. In the short term I tried to use the C equivalent of
__attribute__((interrupt)).  In GNAT this is pragma
Machine_Attribute(string_expression, local_entity_name).  But whereever I
place this pragma (at 1, 2, or 3), I get the error message (from memory)
"pragma must reference local name". The code looks like

procedure Time_Out;
-- 1
procedure Time_Out is
-- 2
begin null; end Time_Out;
pragma Machine_Attribute("interrupt", Time_Out); -- 3

Any hints?
 
     Rolf



-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]