Recent

Author Topic: Synapse 40.1 - Raspberry Pi  (Read 2840 times)

ertank

  • Sr. Member
  • ****
  • Posts: 266
Synapse 40.1 - Raspberry Pi
« on: February 18, 2019, 10:58:31 am »
Hello,

I failed to compile Synapse 40.1 (trunk rev: 209) on Raspberry Pi. Error is:
Code: [Select]
jedi.inc(611,4) Error: Illegal assembler style specified "INTEL"

I tried to install Synapse first time. I am not sure if it works under Raspberry Pi even web site indicates as Windows and Linux compatible (no mention about Raspberry Pi).

rvk

  • Hero Member
  • *****
  • Posts: 4280
Re: Synapse 40.1 - Raspberry Pi
« Reply #1 on: February 18, 2019, 11:40:05 am »
I'm not sure why Synapse (synautil.pas) includes jedi.inc.
It has lots of defines which aren't even used in Synapse itself.
And Synpase is not part of the jedi-library.
So I figure they just took the easy way out to use that .inc file instead of making one themselves.

The only asm-command in the Synapse library is in synaser.pas and it is surrounded by IFDEF WIN32. So for Linux versions, no asm is ever used. So you can safely delete that {$ASMMODE Intel} line in jedi.inc.

(Not sure if you are going to encounter any other problems though)

Thaddy

  • Hero Member
  • *****
  • Posts: 10444
Re: Synapse 40.1 - Raspberry Pi
« Reply #2 on: February 18, 2019, 12:51:42 pm »
jedi.inc contains simply the compiler version defines. Anyway, I filed a bug report some time ago and synapse trunk should be OK by now.
[edit] no, it isn't, only on intel families
You are right Rik.
« Last Edit: February 18, 2019, 12:55:26 pm by Thaddy »
When you ask a question that is actually answered in the documentation, you are either lazy or a moron.

ertank

  • Sr. Member
  • ****
  • Posts: 266
Re: Synapse 40.1 - Raspberry Pi
« Reply #3 on: February 19, 2019, 10:34:18 am »
I have remarked that line about asmmode. Then hit another error while compiling:
Code: [Select]
synaser.pas(232,15) Error: Identifier not found "B500000"
synaser.pas(232,22) Error: Illegal expression
I have followed earlier declarations and added following lines in temios.inc under "ifdef cpuarm" section starting at line 1435. That did not help either. Compiler gives same error.

Can anybody actually compile revision 209 under Raspberry Pi?
I appreciate a share explaining changes necessary to make it happen.

Thanks.

rvk

  • Hero Member
  • *****
  • Posts: 4280
Re: Synapse 40.1 - Raspberry Pi
« Reply #4 on: February 19, 2019, 10:52:01 am »
It seems the B500000 constants and higher are missing.
You can add them

Code: Pascal  [Select][+][-]
  1. {$ifdef cpuarm}
  2. ..
  3.    B500000 = $0001005;
  4.    B576000 = $0001006;
  5.    B921600 = $0001007;
  6.    B1000000= $0001008;
  7.    B1152000= $0001009;
  8.    B1500000= $000100A;
  9.    B2000000= $000100B;
  10.    B2500000= $000100C;
  11.    B3000000= $000100D;
  12.    B3500000= $000100E;
  13.    B4000000= $000100F;
  14. ..
  15. {$endif cpuarm}

I think TLazSerial uses Synaser internally so some of these problems already came to light in another topic:
http://forum.lazarus.freepascal.org/index.php/topic,20481.msg141726.html#msg141726

Apparently Synapse is not standard ready for RPI.

Thaddy

  • Hero Member
  • *****
  • Posts: 10444
Re: Synapse 40.1 - Raspberry Pi
« Reply #5 on: February 19, 2019, 11:59:32 am »
As I wrote, I submitted a patch for that? If it is not applied I will add it here later, so you can apply the patch yorself (or add rvk's code, which is quite similar)
When you ask a question that is actually answered in the documentation, you are either lazy or a moron.

ertank

  • Sr. Member
  • ****
  • Posts: 266
Re: Synapse 40.1 - Raspberry Pi
« Reply #6 on: February 20, 2019, 11:48:09 am »
Only way I could compile package was to do following modifications in synaser.pas around line 230:
Code: [Select]
{$IFNDEF BSD}
    ,(460800, B460800)
  {$IFDEF UNIX}
    ,(500000, $0001005),
    (576000, $0001006),
    (921600, $0001007),
    (1000000, $0001008),
    (1152000, $0001009),
    (1500000, $000100A),
    (2000000, $000100B),
    (2500000, $000100C),
    (3000000, $000100D),
    (3500000, $000100E),
    (4000000, $000100F)
  {$ENDIF}
{$ENDIF}

Adding constants in termios.inc in cpuarm section is a no go.

rvk

  • Hero Member
  • *****
  • Posts: 4280
Re: Synapse 40.1 - Raspberry Pi
« Reply #7 on: February 20, 2019, 11:55:29 am »
Adding constants in termios.inc in cpuarm section is a no go.
That's because termios.inc is in FPC itself. If you add it there you would need to recompile FPC itself. Just rebuilding Lazarus IDE doesn't do that.

According to the bugreport here you could just remove everything above 500000, because it isn't used on ARM (so CPUARM would just have 19 entries). (There is a diff-patch there too)
https://sourceforge.net/p/synalist/bugs/43/

af0815

  • Hero Member
  • *****
  • Posts: 582
Re: Synapse 40.1 - Raspberry Pi
« Reply #8 on: February 20, 2019, 07:20:39 pm »
The problem is, synapse/synaser isnt maintained actual.
regards
Andreas

 

TinyPortal © 2005-2018