<p>Am 28.01.2015 16:45 schrieb "Björn Schreiber" <<a href="mailto:news.bs@drigus.de">news.bs@drigus.de</a>>:<br>
><br>
> Am 28.01.2015 um 11:21 schrieb Sven Barth:<br>
><br>
>> As said by Marco: please try to reproduce it by copying parts of<br>
>> SysUtils (e.g. GetLocaleStr) into an empty program (and using that code<br>
>> of course ^^) to find an example code that shows the problem.<br>
><br>
><br>
> I narrowed it down to the following minimal program:<br>
><br>
> --- Schnipp On ---<br>
> program test;<br>
><br>
> var<br>
> AString: String;<br>
><br>
> function AFunction: String;<br>
> var<br>
> S: WideString;<br>
><br>
> begin<br>
> S := 'Test';<br>
> AFunction := S;<br>
> end;<br>
><br>
> begin<br>
> AString := AFunction;<br>
> end.<br>
> --- Schnipp Off ---<br>
><br>
> Compiled with a fresh install of FPC 2.6.4 with the command line<br>
><br>
> fpc -Twince -Parm test.pas<br>
><br>
> runs without any problem on the old hardware (Cortex-A8) but produces a runtime error 216 on the new hardware (Cortex-A5).<br>
> This code follows SysUtils.GetLocalStr, called by SysUtils.GetFormatSettings. The error doesn't occur if S is defined as String instead WideString or if I do it without the function call.</p>
<p>Could be a bug in the conversion routines from WideString to AnsiString. Since we are currently preparing release 3.0.0 it might be best to test with that as well (cause string handling was changed in 2.7.1). It shouldn't be hard to compile for WinCE either, just download the source (e.g. by using SVN) and do the following:</p>
<p>First build a native 3.0.0 and install it:</p>
<p>make clean all install INSTALL_PREFIX=c:\wherever\you\want</p>
<p>For example I myself usually install to D:\fpc\3.0.0</p>
<p>make clean all CPU_TARGET=arm OS_TARGET=wince BINUTILSPREFIX=arm-wince- CROSSBINDIR=c:\whereever\arm-wince-as\is </p>
<p>You can also pass additional option like CPU type and FPU type using OPT="xyz" with the same parameters as for the compiler.</p>
<p>Afterwards you can install the newly compiled compiler and RTL:</p>
<p>make crossinstall CPU_TARGET=arm OS_TARGET=wince INSTALL_PREFIX=c:\wherever\you\want</p>
<p>Now you merely need a fpc.cfg. For this you can copy your 2.6.4's fpc.cfg, copy it to c:\wherever\you\want\bin\i386-win32 (or x86_64-win64 if you built a 64-bit native compiler) and adjust its paths. Note: the path c:\wherever\you\want is the one you specified for INSTALL_PREFIX.</p>
<p>If you have any problems, feel free to ask.</p>
<p>Regards,<br>
Sven </p>