comp.lang.ada
 help / color / mirror / Atom feed
* GNAT.Serial_Communications ?
@ 2008-06-20 10:34 Tomek Walkuski
  2008-06-20 12:41 ` Anh Vo
  0 siblings, 1 reply; 11+ messages in thread
From: Tomek Walkuski @ 2008-06-20 10:34 UTC (permalink / raw)


Hi group,

I want to communicate with serial port in Ada. What is the best choice
in your opinion? GNAT.Serial_Communications? Where can I find any
documentation about this (GCC GNAT Reference Manual says nothing about
this)?

--
Tomek



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

* Re: GNAT.Serial_Communications ?
  2008-06-20 10:34 GNAT.Serial_Communications ? Tomek Walkuski
@ 2008-06-20 12:41 ` Anh Vo
  2008-07-13  9:32   ` Tomek Walkuski
  0 siblings, 1 reply; 11+ messages in thread
From: Anh Vo @ 2008-06-20 12:41 UTC (permalink / raw)


On Jun 20, 3:34 am, Tomek Walkuski <tomek.walku...@gmail.com> wrote:
> Hi group,
>
> I want to communicate with serial port in Ada. What is the best choice
> in your opinion? GNAT.Serial_Communications? Where can I find any
> documentation about this (GCC GNAT Reference Manual says nothing about
> this)?

Did you try the GCC GNAT User's Guide or read the self-documented code
package GNAT.Serial_Communications?

AV




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

* Re: GNAT.Serial_Communications ?
  2008-06-20 12:41 ` Anh Vo
@ 2008-07-13  9:32   ` Tomek Walkuski
  2008-07-13 11:35     ` anon
  0 siblings, 1 reply; 11+ messages in thread
From: Tomek Walkuski @ 2008-07-13  9:32 UTC (permalink / raw)


On 20 Cze, 14:41, Anh Vo <anhvofrc...@gmail.com> wrote:
> Did you try the GCC GNAT User's Guide or read the self-documented code
> package GNAT.Serial_Communications?
>
> AV

I've gnat-gcc-4.3.0 (Fedora 9) and I don't have g-sercom.ads under /
usr/lib/gcc/i386-redhat-linux/4.3.0/adainclude .

Am I something missing?



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

* Re: GNAT.Serial_Communications ?
  2008-07-13  9:32   ` Tomek Walkuski
@ 2008-07-13 11:35     ` anon
  2008-08-09 12:46       ` Tomek Walkuski
  0 siblings, 1 reply; 11+ messages in thread
From: anon @ 2008-07-13 11:35 UTC (permalink / raw)


No Error!  The standard GNAT system does not come with a Serial or UART 
package.  The package tree is a new addition (April 2008) so the 
maintainers may not have this package yet or they may not include it 
because it not apart of the Ada RM.

It might be included in June version of the GNAT-2008 package, but for 
GNAT-2007 you will need to do a search and down load the set of files 
that makes this package.

Note: you can find a copy of the serial communication package tree at:
    http://gcc.gnu.org/viewcvs?view=rev&revision=134003

Then compile the set of files manually to create the serial communation 
package. Now, you can either just copy and use then when you need this 
package.  

Note: If you know what your doing you can add the source and "*.ali" to 
your GNAT system adainclude/adalib directories and the object files to 
the "gnatlib" file.


In <cf8971db-feda-4632-8062-6bf9f8becb99@z66g2000hsc.googlegroups.com>, Tomek Walkuski <tomek.walkuski@gmail.com> writes:
>On 20 Cze, 14:41, Anh Vo <anhvofrc...@gmail.com> wrote:
>> Did you try the GCC GNAT User's Guide or read the self-documented code
>> package GNAT.Serial_Communications?
>>
>> AV
>
>I've gnat-gcc-4.3.0 (Fedora 9) and I don't have g-sercom.ads under /
>usr/lib/gcc/i386-redhat-linux/4.3.0/adainclude .
>
>Am I something missing?




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

* Re: GNAT.Serial_Communications ?
  2008-07-13 11:35     ` anon
@ 2008-08-09 12:46       ` Tomek Walkuski
  2008-08-09 14:58         ` Samuel Tardieu
  0 siblings, 1 reply; 11+ messages in thread
From: Tomek Walkuski @ 2008-08-09 12:46 UTC (permalink / raw)


I have got GNAT.Serial_Communications sources from GCC CVS, renamed
packages and I am trying to compile:

gcc -c serial_com.adb
serial_com.adb:40:06: warning: "System.Crtl" is an internal GNAT unit
serial_com.adb:40:06: warning: use of this unit is non-portable and
version-dependent
serial_com.adb:126:32: expected type "Serial_Port" defined at
serial_com.ads:109
serial_com.adb:126:32: found private type "System.Address"
serial_com.adb:296:17: no candidate interpretations match the actuals:
serial_com.adb:296:17: missing argument for parameter "Status" in call
to "Close" declared at s-os_lib.ads:262
serial_com.adb:296:17: context requires function call, found procedure
name
gnatmake: "serial_com.adb" compilation error



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

* Re: GNAT.Serial_Communications ?
  2008-08-09 12:46       ` Tomek Walkuski
@ 2008-08-09 14:58         ` Samuel Tardieu
  2008-08-09 22:24           ` stephane.los
  0 siblings, 1 reply; 11+ messages in thread
From: Samuel Tardieu @ 2008-08-09 14:58 UTC (permalink / raw)


>>>>> "Tomek" == Tomek Walkuski <tomek.walkuski@gmail.com> writes:

Tomek> I have got GNAT.Serial_Communications sources from GCC CVS,
Tomek> renamed packages and I am trying to compile:

You can't just do that and expect to work, as this unit depends on
other runtime library changes. For example, the "close" function in
System.Crtl was added on March 26th and is needed by
GNAT.Serial_Communications.

If you need this unit, you should either wait for the next release or
build a new compiler and runtime libraries.

  Sam
-- 
Samuel Tardieu -- sam@rfc1149.net -- http://www.rfc1149.net/



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

* Re: GNAT.Serial_Communications ?
  2008-08-09 14:58         ` Samuel Tardieu
@ 2008-08-09 22:24           ` stephane.los
  2008-08-10  5:01             ` anon
                               ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: stephane.los @ 2008-08-09 22:24 UTC (permalink / raw)


On 9 août, 16:58, Samuel Tardieu <s...@rfc1149.net> wrote:
> >>>>> "Tomek" == Tomek Walkuski <tomek.walku...@gmail.com> writes:
>
> Tomek> I have got GNAT.Serial_Communications sources from GCC CVS,
> Tomek> renamed packages and I am trying to compile:
>
> You can't just do that and expect to work, as this unit depends on
> other runtime library changes. For example, the "close" function in
> System.Crtl was added on March 26th and is needed by
> GNAT.Serial_Communications.
>
> If you need this unit, you should either wait for the next release or
> build a new compiler and runtime libraries.
>
>   Sam
> --
> Samuel Tardieu -- s...@rfc1149.net --http://www.rfc1149.net/

Hello,

I am learning Ada and I find it quite funny that this serial stuff
happens as COM ports are no more available on the machines...

Am I right spending my time trying to learn this language or is it
like latin (good to know some sentences to shine at tea time) ?

I don't appreciate tea too much...

Steve



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

* Re: GNAT.Serial_Communications ?
  2008-08-09 22:24           ` stephane.los
@ 2008-08-10  5:01             ` anon
  2008-08-10  8:15             ` Ludovic Brenta
  2008-08-10 20:33             ` Samuel Tardieu
  2 siblings, 0 replies; 11+ messages in thread
From: anon @ 2008-08-10  5:01 UTC (permalink / raw)


It depends.  On the low-end motherboards and stocked computer system the 
uarts have been removed, or you could say replaced by the usb ports.  But 
most other motherboards and some server still have them.  Plus you can 
always add a uart card to any computer.

In <c308f2d0-a0d9-4649-94eb-1d88e60452dc@x41g2000hsb.googlegroups.com>, stephane.los@neuf.fr writes:
>On 9 ao=FBt, 16:58, Samuel Tardieu <s...@rfc1149.net> wrote:
>> >>>>> "Tomek" =3D=3D Tomek Walkuski <tomek.walku...@gmail.com> writes:
>>
>> Tomek> I have got GNAT.Serial_Communications sources from GCC CVS,
>> Tomek> renamed packages and I am trying to compile:
>>
>> You can't just do that and expect to work, as this unit depends on
>> other runtime library changes. For example, the "close" function in
>> System.Crtl was added on March 26th and is needed by
>> GNAT.Serial_Communications.
>>
>> If you need this unit, you should either wait for the next release or
>> build a new compiler and runtime libraries.
>>
>>   Sam
>> --
>> Samuel Tardieu -- s...@rfc1149.net --http://www.rfc1149.net/
>
>Hello,
>
>I am learning Ada and I find it quite funny that this serial stuff
>happens as COM ports are no more available on the machines...
>
>Am I right spending my time trying to learn this language or is it
>like latin (good to know some sentences to shine at tea time) ?
>
>I don't appreciate tea too much...
>
>Steve




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

* Re: GNAT.Serial_Communications ?
  2008-08-09 22:24           ` stephane.los
  2008-08-10  5:01             ` anon
@ 2008-08-10  8:15             ` Ludovic Brenta
  2008-08-10 20:33             ` Samuel Tardieu
  2 siblings, 0 replies; 11+ messages in thread
From: Ludovic Brenta @ 2008-08-10  8:15 UTC (permalink / raw)


Steve wrote:
> I am learning Ada and I find it quite funny that this serial stuff
> happens as COM ports are no more available on the machines...
>
> Am I right spending my time trying to learn this language or is it
> like latin (good to know some sentences to shine at tea time) ?
>
> I don't appreciate tea too much...

Ada is not a special-purpose language that can only do serial port
communications. You will benefit from learning Ada for any kind of
programming. Multi-tasking, database interfaces, networking, graphical
interfaces, embedded progamming, etc; Ada supports them all.

--
Ludovic Brenta.



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

* Re: GNAT.Serial_Communications ?
  2008-08-09 22:24           ` stephane.los
  2008-08-10  5:01             ` anon
  2008-08-10  8:15             ` Ludovic Brenta
@ 2008-08-10 20:33             ` Samuel Tardieu
  2008-08-13 20:28               ` stephane.los
  2 siblings, 1 reply; 11+ messages in thread
From: Samuel Tardieu @ 2008-08-10 20:33 UTC (permalink / raw)


>>>>> "Stephane" == stephane los <stephane.los@neuf.fr> writes:

Stephane> I am learning Ada and I find it quite funny that this serial
Stephane> stuff happens as COM ports are no more available on the
Stephane> machines...

I use serial ports on a daily basis through USB to serial interfaces
on my desktop machine and my laptop. Many embedded systems still use
RS232 for communication. And the way to configure those serial USB
ports is similar to the way to configure vanilla serial ports.

However, if you're trying to learn Ada, using the serial port is
probably not the best way to dig into the language :)

  Sam
-- 
Samuel Tardieu -- sam@rfc1149.net -- http://www.rfc1149.net/



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

* Re: GNAT.Serial_Communications ?
  2008-08-10 20:33             ` Samuel Tardieu
@ 2008-08-13 20:28               ` stephane.los
  0 siblings, 0 replies; 11+ messages in thread
From: stephane.los @ 2008-08-13 20:28 UTC (permalink / raw)


On 10 août, 22:33, Samuel Tardieu <s...@rfc1149.net> wrote:
> >>>>> "Stephane" == stephane los <stephane....@neuf.fr> writes:
>
> Stephane> I am learning Ada and I find it quite funny that this serial
> Stephane> stuff happens as COM ports are no more available on the
> Stephane> machines...
>
> I use serial ports on a daily basis through USB to serial interfaces
> on my desktop machine and my laptop. Many embedded systems still use
> RS232 for communication. And the way to configure those serial USB
> ports is similar to the way to configure vanilla serial ports.
>
> However, if you're trying to learn Ada, using the serial port is
> probably not the best way to dig into the language :)
>
>   Sam
> --
> Samuel Tardieu -- s...@rfc1149.net --http://www.rfc1149.net/

OK, OK... ;-)

I was just kidding... It's alive !
ThanX for the answers.
Best Regards,
Cordialement,
Stéphane



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

end of thread, other threads:[~2008-08-13 20:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-20 10:34 GNAT.Serial_Communications ? Tomek Walkuski
2008-06-20 12:41 ` Anh Vo
2008-07-13  9:32   ` Tomek Walkuski
2008-07-13 11:35     ` anon
2008-08-09 12:46       ` Tomek Walkuski
2008-08-09 14:58         ` Samuel Tardieu
2008-08-09 22:24           ` stephane.los
2008-08-10  5:01             ` anon
2008-08-10  8:15             ` Ludovic Brenta
2008-08-10 20:33             ` Samuel Tardieu
2008-08-13 20:28               ` stephane.los

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