comp.lang.ada
 help / color / mirror / Atom feed
* GNAT serial comm  under FreeBSD - PROGRAM_ERROR raised
@ 2015-03-10  9:17 darek
  2015-03-10  9:40 ` Jacob Sparre Andersen
  0 siblings, 1 reply; 4+ messages in thread
From: darek @ 2015-03-10  9:17 UTC (permalink / raw)


Hi All,
  I have installed the AUX compiler from http://www.freshports.org/lang/gcc-aux/ (gcc version 4.9.2, 20141030)  on my FreeBSD (ver. 9.2, amd 64)  machine. The PC needs to talk to an external device via the serial port. The program compiles without any problems but at  the run-time, I got the following exception:

 raised PROGRAM_ERROR : Serial Communications not implemented

If this is a feature (due to any imaginable issues), is there any other package that  handles the serial communication under FreeBSD?

BTW, the status of the port on http://www.dragonlace.net/ is described as a "perfect". 


Cheers,
  Darek 


Test program:

with Ada.Text_IO; use Ada.Text_IO;
with GNAT.Serial_Communications; 

procedure TestSerial is

   package Serial_IO renames GNAT.Serial_Communications;
   
   Port_ID : Serial_IO.Serial_Port;
   Port_Name : Serial_IO.Port_Name(1..10) := "/dev/ttyu0";

begin
   
   Put_Line("Test  serial port");
   Serial_IO.Open(Port_ID,  Port_Name);   

   Serial_IO.Close(Port_ID);
   
end TestSerial;


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: GNAT serial comm  under FreeBSD - PROGRAM_ERROR raised
  2015-03-10  9:17 GNAT serial comm under FreeBSD - PROGRAM_ERROR raised darek
@ 2015-03-10  9:40 ` Jacob Sparre Andersen
  2015-03-10 15:09   ` Simon Wright
  0 siblings, 1 reply; 4+ messages in thread
From: Jacob Sparre Andersen @ 2015-03-10  9:40 UTC (permalink / raw)


Darek <darek.maksimiuk@gmail.com> wrote:

>  raised PROGRAM_ERROR : Serial Communications not implemented
>
> If this is a feature (due to any imaginable issues), is there any
> other package that handles the serial communication under FreeBSD?

I think this may just be the current state of the
"GNAT.Serial_Communications" package for FreeBSD.

You could look into how the package is implemented for other Unix
platforms (e.g. Linux), and see if that can easily be ported to FreeBSD.
I wouldn't expect it to be too hard.

Greetings,

Jacob
-- 
Warning: Dates in calendars are closer than they appear.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: GNAT serial comm  under FreeBSD - PROGRAM_ERROR raised
  2015-03-10  9:40 ` Jacob Sparre Andersen
@ 2015-03-10 15:09   ` Simon Wright
  2015-03-10 18:00     ` darek
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Wright @ 2015-03-10 15:09 UTC (permalink / raw)


Jacob Sparre Andersen <jacob@jacob-sparre.dk> writes:

> You could look into how the package is implemented for other Unix
> platforms (e.g. Linux), and see if that can easily be ported to FreeBSD.
> I wouldn't expect it to be too hard.

GCC 4.9.1 and 5.0 have implementations for Linux and mingw.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: GNAT serial comm  under FreeBSD - PROGRAM_ERROR raised
  2015-03-10 15:09   ` Simon Wright
@ 2015-03-10 18:00     ` darek
  0 siblings, 0 replies; 4+ messages in thread
From: darek @ 2015-03-10 18:00 UTC (permalink / raw)


On Tuesday, 10 March 2015 16:09:09 UTC+1, Simon Wright  wrote:
> Jacob Sparre Andersen <jacob@jacob-sparre.dk> writes:
> 
> > You could look into how the package is implemented for other Unix
> > platforms (e.g. Linux), and see if that can easily be ported to FreeBSD.
> > I wouldn't expect it to be too hard.
> 
> GCC 4.9.1 and 5.0 have implementations for Linux and mingw.

Hi All, 
As a work around I use the 32bit gcc/GNAT compiler on Linux and copy  the executable to the FreeBSD machine. It works well due to the FreeBSD-Linux compatibility layer. 

Cheers,
  Darek 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-10 18:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-10  9:17 GNAT serial comm under FreeBSD - PROGRAM_ERROR raised darek
2015-03-10  9:40 ` Jacob Sparre Andersen
2015-03-10 15:09   ` Simon Wright
2015-03-10 18:00     ` darek

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