Hi

The following code works well in i386, but not on
arm-linux-uclibcgnueabi- , on at91sam9263ek SBC.

{$mode objfpc}
{$LONGSTRINGS OFF}
Program ttt2;
uses serial;

{nterface}

Type
 DataBuffer_typ= array[0..9] of char;

{mplementation}

var
mySerial : Longint;
myStr    : DataBuffer_typ  ;
   i     : integer;
begin
{   SetLength(myStr,10);}

   mySerial:=seropen('/dev/ttyS1');
   SerSetParams(mySerial,115200,8,NoneParity,1,[]);
   SerRead(mySerial,myStr[0],1);
   write(myStr[0]);

end.

The SBC and PC communicate well  when using  minicom.

I compile the code for arm-linux using :-

#  /usr/fpc-uclibc/lib/fpc/2.5.1/ppcrossarm -MObjFPC -TLinux -Parmv5
-gl -Xd -Xs -l -darm -XParm-linux-uclibcgnueabi- -CfSOFT -CaEABI -darm
-gl -O- -CpARMV5  -uUSE_LOCALIZE
-Fu/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/*
-FL/usr/br-git-rf/lib/ld-uClibc.so.0 -XR/usr/br-git-rf/
-Fl/usr/br-git-rf/lib  -Fl/usr/br-git-rf/usr/lib
-k"--sysroot=/usr/br-git-rf" ttt2.pas

Where do i start checking ?

regs
Nataraj
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to