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


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 Henry Vermaak
2009/7/21 greim :
> 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 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 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:06, Henry Vermaak wrote:


2009/7/20 greim :

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 Henry Vermaak
2009/7/20 greim :
> -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