Re: [fpc-pascal] ARM crosscompiler again

2009-07-21 Thread Henry Vermaak
2009/7/20 greim gr...@schleibinger.com:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hi,

 i just tried to compile a cross compiler
 linux 386 to linux arm
 (Suse 11.1 to a SSV DIL Net PC / 9200 Atmel AT91RM9200)

 I downloades the latest :
 .
 Download Daily Source Snapshot of the Fixes Tree
 Entire fpc sources archive of the fixes branch: fpc.zip (24 MB)
 from the website
 ..

 Also... and there i am not sure:
 Package Binary
 GNU Binutils    arm-binutils-2.16-1.i386.rpm
 and install it.

 Then i started the compiler (as root ???) with :
 make clean all CPU_TARGET=arm OS_TARGET=linux
 BINUTILSPREFIX=/usr/arm/bin/arm-unknown-linux-gnu

 The compiler (2.2.4) was running some minutes.
 But no ppcarm there afterwards.
 Any hint???

If you haven't done a make install, then the compiler should be in
./compiler/.

Henry
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] ARM crosscompiler again

2009-07-21 Thread Jonas Maebe


On 21 Jul 2009, at 11:06, Henry Vermaak wrote:


2009/7/20 greim gr...@schleibinger.com:

Then i started the compiler (as root ???) with :
make clean all CPU_TARGET=arm OS_TARGET=linux
BINUTILSPREFIX=/usr/arm/bin/arm-unknown-linux-gnu

The compiler (2.2.4) was running some minutes.
But no ppcarm there afterwards.
Any hint???


If you haven't done a make install, then the compiler should be in
./compiler/.


And it will be called ppcrossarm (because it's a cross-compiler,  
rather than a native compiler).


To make it clear: the above command will create a non-EABI ARM little  
endian compiler, using the FPA floating point unit. If you want to use  
softfloat, add OPT=-Cfsoft. Moreover, if you (the original poster)  
intend to target an ARM-EABI platform, I would strongly recommend to  
use FPC 2.3.1 instead, because 2.2.4 contains quite a few bugs for  
those platforms. When using 2.2.x, at the very least you also have to  
add -O- to the OPT parameters.



Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] ARM crosscompiler again

2009-07-21 Thread greim
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hallo Henry,


 i just tried to compile a cross compiler
 linux 386 to linux arm
 (Suse 11.1 to a SSV DIL Net PC / 9200 Atmel AT91RM9200)

 I downloades the latest :
 .
 Download Daily Source Snapshot of the Fixes Tree
 Entire fpc sources archive of the fixes branch: fpc.zip (24 MB)
 from the website
 ..

 Also... and there i am not sure:
 Package Binary
 GNU Binutilsarm-binutils-2.16-1.i386.rpm
 and install it.

 Then i started the compiler (as root ???) with :
 make clean all CPU_TARGET=arm OS_TARGET=linux
 BINUTILSPREFIX=/usr/arm/bin/arm-unknown-linux-gnu

 The compiler (2.2.4) was running some minutes.
 But no ppcarm there afterwards.
 Any hint???

so thanks i am some steps further

i now installed the arm binutils from the Suse distribution
ist version 2.19 instead of 2.16 and installed in

/opt/cross/arm-linux/bin/

by Yast

So i now mad a call:

make all CPU_TARGET=arm OS_TARGET=linux
BINUTILSPREFIX=/opt/cross/arm-linux/bin/

an voila it compiles... and ppcrossarm was in ./compiler
fantastic.

Then i did a

make install CPU_TARGET=arm OS_TARGET=linux
BINUTILSPREFIX=/opt/cross/arm-linux/bin/

and now there are some files in
/usr/bin

looks fine!

But now i did a
ppcrossarm -B hallo.pas

The compiler seems to run, and making the s-file, but assembling the
s-file failed, with more then 20 error messages. like

makuslinux3:/home/markus/arm # ppcrossarm -B -Aas hallo.pas
Free Pascal Compiler version 2.3.1 [2009/07/21] for arm
Copyright (c) 1993-2009 by Florian Klaempfl
Target OS: Linux for ARM
Compiling hallo.pas
Assembling hallo
hallo.s: Assembler messages:
hallo.s:11: Warning: .type pseudo-op used outside of .def/.endef ignored.
hallo.s:11: Error: junk at end of line, first unrecognized character is `P'
hallo.s:14: Warning: .type pseudo-op used outside of .def/.endef ignored.
hallo.s:14: Error: junk at end of line, first unrecognized character is `m'
hallo.s:16: Error: too many memory references for `mov'
hallo.s:17: Error: no such instruction: `stmfd r13!,{r4,r11,r12,r14,r15}'
hallo.s:18: Error: too many memory references for `sub'
hallo.s:19: Error: too many memory references for `sub'
hallo.s:20: Error: no such instruction: `bl FPC_INITIALIZEUNITS'
hallo.s:21: Error: no such instruction: `bl fpc_get_output'
hallo.s:22: Error: too many memory references for `mov'
hallo.s:23: Error: too many memory references for `mov'
hallo.s:24: Error: no such instruction: `ldr r2,.Lj9'
hallo.s:25: Error: expecting operand after ','; got nothing
hallo.s:26: Error: no such instruction: `bl fpc_write_text_shortstr'
hallo.s:27: Error: no such instruction: `bl FPC_IOCHECK'
hallo.s:28: Error: too many memory references for `mov'
hallo.s:29: Error: no such instruction: `bl fpc_writeln_end'
hallo.s:30: Error: no such instruction: `bl FPC_IOCHECK'
hallo.s:31: Error: no such ins
etc.

any further idea..???

Thanks!

Markus Greim



 
 If you haven't done a make install, then the compiler should be in
 ./compiler/.
 
 Henry

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iEYEARECAAYFAkpljGYACgkQWVkhSqgWKAJJkgCgrSrZF2UPXAfWzxvUhq/isJaL
3vUAoLn57wjZRAE5EUh8fPsDfCmDZbnc
=bJeb
-END PGP SIGNATURE-
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] ARM crosscompiler again

2009-07-21 Thread Jonas Maebe


On 21 Jul 2009, at 11:37, greim wrote:


The compiler seems to run, and making the s-file, but assembling the
s-file failed, with more then 20 error messages. like

makuslinux3:/home/markus/arm # ppcrossarm -B -Aas hallo.pas
Free Pascal Compiler version 2.3.1 [2009/07/21] for arm
Copyright (c) 1993-2009 by Florian Klaempfl
Target OS: Linux for ARM
Compiling hallo.pas
Assembling hallo
hallo.s: Assembler messages:
hallo.s:11: Warning: .type pseudo-op used outside of .def/.endef  
ignored.
hallo.s:11: Error: junk at end of line, first unrecognized character  
is `P'
hallo.s:14: Warning: .type pseudo-op used outside of .def/.endef  
ignored.
hallo.s:14: Error: junk at end of line, first unrecognized character  
is `m'

hallo.s:16: Error: too many memory references for `mov'
hallo.s:17: Error: no such instruction: `stmfd r13!, 
{r4,r11,r12,r14,r15}'

[snip]

etc.

any further idea..???


The compiler is calling your i386/x86_64 assembler instead of the ARM  
one. I guess /opt/cross/arm-linux/bin/ is not in your path.



Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] ARM crosscompiler again

2009-07-21 Thread Henry Vermaak
2009/7/21 greim gr...@schleibinger.com:
 so thanks i am some steps further

 i now installed the arm binutils from the Suse distribution
 ist version 2.19 instead of 2.16 and installed in

 /opt/cross/arm-linux/bin/

 by Yast

 So i now mad a call:

 make all CPU_TARGET=arm OS_TARGET=linux
 BINUTILSPREFIX=/opt/cross/arm-linux/bin/

 an voila it compiles... and ppcrossarm was in ./compiler
 fantastic.

 Then i did a

 make install CPU_TARGET=arm OS_TARGET=linux
 BINUTILSPREFIX=/opt/cross/arm-linux/bin/

 and now there are some files in
 /usr/bin

 looks fine!

 But now i did a
 ppcrossarm -B hallo.pas

 The compiler seems to run, and making the s-file, but assembling the
 s-file failed, with more then 20 error messages. like

 makuslinux3:/home/markus/arm # ppcrossarm -B -Aas hallo.pas
 Free Pascal Compiler version 2.3.1 [2009/07/21] for arm
 Copyright (c) 1993-2009 by Florian Klaempfl
 Target OS: Linux for ARM
 Compiling hallo.pas
 Assembling hallo
 hallo.s: Assembler messages:
 hallo.s:11: Warning: .type pseudo-op used outside of .def/.endef ignored.
 hallo.s:11: Error: junk at end of line, first unrecognized character is `P'
 hallo.s:14: Warning: .type pseudo-op used outside of .def/.endef ignored.
 hallo.s:14: Error: junk at end of line, first unrecognized character is `m'
 hallo.s:16: Error: too many memory references for `mov'
 hallo.s:17: Error: no such instruction: `stmfd r13!,{r4,r11,r12,r14,r15}'
 hallo.s:18: Error: too many memory references for `sub'
 hallo.s:19: Error: too many memory references for `sub'
 hallo.s:20: Error: no such instruction: `bl FPC_INITIALIZEUNITS'
 hallo.s:21: Error: no such instruction: `bl fpc_get_output'
 hallo.s:22: Error: too many memory references for `mov'
 hallo.s:23: Error: too many memory references for `mov'
 hallo.s:24: Error: no such instruction: `ldr r2,.Lj9'
 hallo.s:25: Error: expecting operand after ','; got nothing
 hallo.s:26: Error: no such instruction: `bl fpc_write_text_shortstr'
 hallo.s:27: Error: no such instruction: `bl FPC_IOCHECK'
 hallo.s:28: Error: too many memory references for `mov'
 hallo.s:29: Error: no such instruction: `bl fpc_writeln_end'
 hallo.s:30: Error: no such instruction: `bl FPC_IOCHECK'
 hallo.s:31: Error: no such ins
 etc.

 any further idea..???

Using the wrong assembler?  Make sure your arm assembler and linker is
on the path.

Henry
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] ARM crosscompiler again

2009-07-21 Thread Carsten Bager
When I build the compiler i use this


- Linux 
#!/bin/sh
export PATH=$PATH:/pp/bin
export PATH=$PATH:/Fpc/ArmBin/218
make clean all OS_TARGET=linux CPU_TARGET=arm PP=/pp/bin/fpc
BINUTILSPREFIX=arm-linux-

Windows 
PATH = c:\fpc\2.2.2\bin\i386-win32;c:\pp\bin\Arm
make clean all OS_TARGET=linux CPU_TARGET=arm BINUTILSPREFIX=arm-linux-



This works fine with the 222 and 223 version

Regards

Carsten

Med venlig hilsen
Carsten Bager

BEAS A/S
Brørupvænget 10
DK-7650 Bøvlingbjerg
Tlf. : +45 9788 5222 Fax : +45 9788 5434
www.beas.dk


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] ARM crosscompiler again

2009-07-21 Thread greim
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello Carsten et. al.

thanks for your help. I think i am to stupid to set the right paths and
links. Maybe Suse is a little bit strange here.

Finally i copied the file Carsten has provided
at
http://www.freepascal.dk/
 and it compiles...
My first Hello World on the ARM is also ok.

Thanks a lot

Markus Greim


Carsten Bager schrieb:
 When I build the compiler i use this
 
 
 - Linux 
 #!/bin/sh
 export PATH=$PATH:/pp/bin
 export PATH=$PATH:/Fpc/ArmBin/218
 make clean all OS_TARGET=linux CPU_TARGET=arm PP=/pp/bin/fpc 
 BINUTILSPREFIX=arm-linux-
 
 Windows 
 PATH = c:\fpc\2.2.2\bin\i386-win32;c:\pp\bin\Arm
 make clean all OS_TARGET=linux CPU_TARGET=arm BINUTILSPREFIX=arm-linux- 
 
 
 
 This works fine with the 222 and 223 version
 
 Regards
 
 Carsten
 
 Med venlig hilsen
 Carsten Bager
 
 BEAS A/S
 Brørupvænget 10
 DK-7650 Bøvlingbjerg
 Tlf. : +45 9788 5222 Fax : +45 9788 5434
 www.beas.dk
 
 
 ___
 fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
 http://lists.freepascal.org/mailman/listinfo/fpc-pascal
 


- --



Mit freundlichen Grüßen

Markus Greim

Schleibinger Geräte
Teubert u. Greim GmbH
Gewerbestrasse 4
84428 Buchbach
Germany

Tel. +49 8086 94010
Fax. +49 8086 94014
Mobil +49 172 8 999 196
http://www.schleibinger.com


Amtsgericht Traunstein HRB 9646
Geschäftsführer:
Dipl.-Ing. (FH) Oliver Teubert
Dipl.-Ing. (Univ.) Markus Greim
UST-ID. DE 174 175 046
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iEYEARECAAYFAkpl0fwACgkQWVkhSqgWKAImWACgi/8MAmTRr7bMipMvN9rhWIKL
OPgAn1sKOF05hGygMog8FJx2DwCps1l+
=3tZm
-END PGP SIGNATURE-
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Case insensitive comparison of strings with non-ascii characters

2009-07-21 Thread Luiz Americo Pereira Camara

Hi,

I'm trying to fix bug http://bugs.freepascal.org/view.php?id=14135 but 
could not get a way to do case insensitive comparison of UTF8 strings 
with non ascii characters (in the test even ansi strings failed).


See the attached test program. I tried StrIComp, AnsiCompareText, 
CompareText and even widestringmanager.CompareTextWideStringProc.


On Linux, only AnsiCompareText worked. On Windows none worked.

Any hints on how to do such comparison or this is a limitation of  
current fpc? Or i'm doing something wrong?


BTW:

Key := 'ç';

Key will be encoded in the current system encoding Ok?

Key := Utf8Encode('ç');

'ç' will be converted to widestring and then back to Utf8 Ok?

Luiz
program bugCompInsensitiveUTF8;

{$mode objfpc}{$H+}

uses
 {$ifdef unix}
 cwstring,
 {$endif}
 Classes, SysUtils;
var
  Key, Str: String;
begin
  Key := 'c';
  Str := 'C';
  WriteLn('Testing C/c');
  if stricomp(PChar(Key), PChar(Str)) = 0 then
WriteLn('StrIComp OK');
  if AnsiCompareText(Key, Str) = 0 then
WriteLn('AnsiCompareText OK');
  if CompareText(Key, Str) = 0 then
WriteLn('CompareText OK');

  Key := 'ç';
  Str := 'Ç';
  WriteLn('Testing Ç/ç');
  if stricomp(PChar(Key), PChar(Str)) = 0 then
WriteLn('StrIComp OK');
  if AnsiCompareText(Key, Str) = 0 then
WriteLn('AnsiCompareText OK');
  if CompareText(Key, Str) = 0 then
WriteLn('CompareText OK');

  Key := UpperCase('ç');
  Str := 'Ç';
  WriteLn('Testing Ç/Uppercase(ç)');
  if strcomp(PChar(Key), PChar(Str)) = 0 then
WriteLn('StrComp OK');
  if AnsiCompareStr(Key, Str) = 0 then
WriteLn('AnsiCompareStr OK');
  if CompareStr(Key, Str) = 0 then
WriteLn('CompareStr OK');

  //test UTF8
  Key := UTF8Encode('ç');
  Str := UTF8Encode('Ç');
  WriteLn('Testing UTF8 Ç/ç');
  if stricomp(PChar(Utf8ToAnsi(Key)), PChar(Utf8ToAnsi(Str))) = 0 then
WriteLn('StrIComp OK');
  if AnsiCompareText(Utf8ToAnsi(Key), Utf8ToAnsi(Str)) = 0 then
WriteLn('AnsiCompareText OK');
  if CompareText(Utf8ToAnsi(Key), Utf8ToAnsi(Str)) = 0 then
WriteLn('CompareText OK');
  if widestringmanager.CompareTextWideStringProc(UTF8Decode(Key), UTF8Decode(Str)) = 0 then
WriteLn('WideStringManager OK');
end.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Case insensitive comparison of strings with non-ascii characters

2009-07-21 Thread JoshyFun
Hello FPC-Pascal,

Tuesday, July 21, 2009, 6:45:03 AM, you wrote:

LAPC I'm trying to fix bug
LAPC http://bugs.freepascal.org/view.php?id=14135 but 
LAPC could not get a way to do case insensitive comparison of UTF8 strings
LAPC with non ascii characters (in the test even ansi strings failed).

Unicode case insensitive comparations are not trivial and in fact are
quite complex. None ansi version will work properly, so the conversion
should be provided by the OS or in the worst case a general case
unfolding could be added to FPC as a fallback mechanism. This function
requires quite large tables and a non trivial amount of CPU (based in
the amount of folded code points).

Try to do the same with WideStrings instead UTF8.

-- 
Best regards,
 JoshyFun

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Case insensitive comparison of strings with non-ascii characters

2009-07-21 Thread Luiz Americo Pereira Camara

JoshyFun escreveu:

Hello FPC-Pascal,

Tuesday, July 21, 2009, 6:45:03 AM, you wrote:

LAPC I'm trying to fix bug
LAPC http://bugs.freepascal.org/view.php?id=14135 but 
LAPC could not get a way to do case insensitive comparison of UTF8 strings

LAPC with non ascii characters (in the test even ansi strings failed).

Unicode case insensitive comparations are not trivial and in fact are
quite complex. None ansi version will work properly, so the conversion
should be provided by the OS


AnsiCompare* functions already use the functions provided by OS through 
WideStringManager but it seems it's not working (or i'm doing something 
wrong)



[..]

Try to do the same with WideStrings instead UTF8.
  


I tried widestringmanager.CompareTextWideStringProc('Ç', 'ç')
It also fails.

Using fpc 224, under windowsXP SP3

Luiz
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Persistent blocks in Lazarus

2009-07-21 Thread Martin Friebe

[cross-posted to lazarus list = please join there to continue the topic]

I am trying to figure out how they work

- Block is kept, if cursor moves away. (obvious)
- Shift Cursur keys:
 - Block is extended if cursor was next to block
 - New block is started , if cursor was away from block.
(could also be used to extend the block, like shift-left-mouse)
- Block is kept, position/size adjusted if text is typed before, or into 
the block  (exception, column mode block is not adapted)

- ctrl-c copies the block, at any time

annoyances I found in turbo explorer (the free delphi), not sure if they 
are supposed to be.

- Move the caret via mouse (left click) = block is undone
- paste/ctrl-v : the newly inserted text is selected as new block?
  (this means the current block is lost)

That's all the knowledge I have about them sofar.

Anyone wants to update me?

Martin

Andreas Berger wrote:



On Thu, Jul 16, 2009 at 01:36:15PM +0200, Andreas Berger wrote:
 
Out of curiosity (because I never used this feature in any editor), 
what would you use it for?
  
Persistent blocks and the full Wordstar keyboard shortcuts is why I 
use the Delphi IDE until today.



If you miss wordstar stuff, please list it.


Well, maybe I should use the Lazarus IDE again for a bit a jot down 
what I would like. I may even soon have time to help add some options.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal