[Lazarus] LazSerial from OLPM, is it working on Linux?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] LazSerial from OLPM, is it working on Linux?

Free Pascal - Lazarus mailing list
Seems like my post via GMANE did not make it to the list, so mailing instead…

I was under the assumption that LazSerial, which is available from Online Package Manager in the Lazarus IDE is cross-platform.
But it seems like this is not the case, at least not for Raspbian Buster as target.

I have worked on porting a project in Windows (Delphi 2007) to FPC/Lazarus on Windows in order to then move to Linux.

I am using FPC 3.0.4/Lazarus 2.0.8 on Windows and Raspbian Buster.
I have replaced the AsyncPro serial port with LazSerial.

What happens is that after I was done moving from Delphi 2007 to FPC/Lazarus in Windows 10 I went to my RPi4 installation and used OLPM to install the LazSerial package there, but it failed!

During the compile of the package the process stops with errors
in lazsynaser.pas:

lazsynaser.pas(252,15) Error: Identifier not found "B500000"
lazsynaser.pas(252,22) Error: Illegal expression
lazsynaser.pas(253,14) Error: Identifier not found "B576000"
lazsynaser.pas(253,21) Error: Illegal expression
... the list continues...

The section of code in the source file generating the errors looks like this:

  Rates: array[0..MaxRates, 0..1] of cardinal =
  (
    (0, B0),
    (50, B50),
    (75, B75),
.....
      {$IFDEF UNIX}
        ,(500000, B500000), <==ERRORS start here
        (576000, B576000),
        (921600, B921600),
        (1000000, B1000000),
        (1152000, B1152000),
        (1500000, B1500000),
        (2000000, B2000000),
        (2500000, B2500000),
        (3000000, B3000000),
        (3500000, B3500000),
        (4000000, B4000000)
      {$ENDIF}

The rates above the first error are defined in termios.inc in the compiler rtl sources.

So now I wonder if this is a problem with my installation or if it is not possible to run LazSerial on this platform?

Or is there a problem with LazSerial in connection with the release version 3.0.4 of FPC?

--
Bo Berglund
Developer in Sweden

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] LazSerial from OLPM, is it working on Linux?

Free Pascal - Lazarus mailing list
El 28/4/20 a les 23:23, Bo Berglund via lazarus ha escrit:

>
> The rates above the first error are defined in termios.inc in the compiler rtl sources.
>
> So now I wonder if this is a problem with my installation or if it is not possible to run LazSerial on this platform?
>
> Or is there a problem with LazSerial in connection with the release version 3.0.4 of FPC?

I'm using laz_synapse/synaser from the ararat synapse svn repository
instead of the version that comes from the package manager and it
compiles just fine. Mind me, I'm using fpc 3.2.0rc1 but I checked and
the same definition is also in fpc 3.0.4 (and 2.6.4).
I would have noticed if it didn't compile since I've been using ararat
synapse, like, forever (most of the times with windows but also linux).

Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] LazSerial from OLPM, is it working on Linux?

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Tue, 28 Apr 2020 23:23:27 +0200, Bo Berglund via lazarus
<[hidden email]> wrote:

>The rates above the first error are defined in termios.inc in the compiler rtl sources.
>
>So now I wonder if this is a problem with my installation or if it is not possible to run LazSerial on this platform?
>
>Or is there a problem with LazSerial in connection with the release version 3.0.4 of FPC?

UPDATE:
While this list (or GMANE) was down I have investigated the problem
using the Lazarus Forum instead.

Cause of problem:
lazsynaser.pas included in the LazSerial package was not set up to
handle the ARM cpu used in Raspberry Pi. So some conditionals needed
to be added for that cpu and then the package installed without
errors.

Solution:
With help from the forum I modified the unit and then I also supplied
the updated LazSerial package to the OPM maintainer, who updated the
package on line.
So now the install from OPM works fine also on a Raspberry PI!

Case closed.

--
Bo Berglund
Developer in Sweden

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] LazSerial from OLPM, is it working on Linux?

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
Hi Luca,

Package laz_synapse from OPM is exactly the same with the one from the ararat synapse svn repository(just checked).
Bo is talking about package LazSerial, which is maintained by forum user "Jurasic Pork", I don't know his real name.
The two packages are not the same, although Lazserial uses synaser from synapse. I don't know other details about LazSerial( I don't use it personally).
Bo made some improvement on LazSerial yesterday, which allow the package to work on Raspberry Pi.

regards,
Balázs

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] LazSerial from OLPM, is it working on Linux?

Free Pascal - Lazarus mailing list
Bo you were faster. :)

On Thu, Apr 30, 2020 at 11:39 AM Balázs Székely <[hidden email]> wrote:
Hi Luca,

Package laz_synapse from OPM is exactly the same with the one from the ararat synapse svn repository(just checked).
Bo is talking about package LazSerial, which is maintained by forum user "Jurasic Pork", I don't know his real name.
The two packages are not the same, although Lazserial uses synaser from synapse. I don't know other details about LazSerial( I don't use it personally).
Bo made some improvement on LazSerial yesterday, which allow the package to work on Raspberry Pi.

regards,
Balázs

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] LazSerial from OLPM, is it working on Linux?

Free Pascal - Lazarus mailing list
On Thu, 30 Apr 2020 11:41:30 +0300, Balázs Székely via lazarus
<[hidden email]> wrote:

>Bo you were faster. :)
>
Only by 2 minutes! :)


--
Bo Berglund
Developer in Sweden

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] LazSerial from OLPM, is it working on Linux?

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
El 30/4/20 a les 10:39, Balázs Székely via lazarus ha escrit:
> Hi Luca,
>
> Package laz_synapse from OPM is exactly the same with the one from the
> ararat synapse svn repository(just checked).
> Bo is talking about package LazSerial, which is maintained by forum user
> "Jurasic Pork", I don't know his real name.

Ah, OK, I saw lazsynaser.pas and I though it was the same thing packaged
a different way. I didn't notice that lazsynaser.pas is not the same as
synaser.pas.

Bye


--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus