<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<br>
<blockquote type="cite"
cite="mid:CAFMUeB8k=1b-VgifTrtOneTFYyXCxOsLg-hvyi0Q5NrURVUUiA@mail.gmail.com">
<div dir="auto">
<div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"> <br>
<blockquote type="cite">
<div dir="auto">
<div class="gmail_quote" dir="auto">
<blockquote class="gmail_quote" style="margin:0 0
0 .8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"> <br>
<p><br>
</p>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">
<div class="gmail_quote">
<div>Note that you probably don't need
two different cross compilers if
your cpu-OS target is the same</div>
</div>
</div>
</div>
</blockquote>
<p>Target CPU family is same: "arm", but
Target processor is not the same: "ARMv4"
versus "ARMv7" ...</p>
<p>So I do not know if this requires two
pre-compiled cross-compilers or not?<br>
</p>
</div>
</blockquote>
</div>
<div dir="auto">You only need different compilers if
you have different ABIs (e.g. Soft Float vs. Hard
Float). For WinCE that isn't applicable however. </div>
<div dir="auto"><br>
</div>
</div>
</blockquote>
<p>So it does not matter how I build cross-compiler
using FpcUpDeluxe: wheter I use "-Cparmv5" or
"-Cparmv7A" ?<br>
</p>
</div>
</blockquote>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">Correct. </div>
<div dir="auto"><br>
</div>
<div dir="auto">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p> </p>
<p>Then there is still problem with precompiled
RTL/packages?</p>
<p>Because when I only change "Target processor" (in
Lazarus build using FpcUpDeluxe) I can compile
application, but I can not run it on target system (so
I guess, that resulting EXE is not compiled for target
processor).</p>
<p>When I add to Custom options: -CfVFPV2 then I get
error while compiling: Fatal: Can't find unit system
used by Test1</p>
<p>When I download and install default Lazarus and
cross-compiler then when I change "Target processor"
to "ARMv5" or "ARMv7A" I get: "project1.lpr(22,0)
Error: Error while assembling exitcode 1"</p>
</div>
</blockquote>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">As said by Christo you need to select the
correct set of compiled units. Also you need to select the
correct processor type when building your application. </div>
<div dir="auto"><br>
</div>
</div>
</blockquote>
I did this test:<br>
<p>1. I have precompiled units for "-Cparmv5" and "-Cparmv7A"and I
have saved these precompiled units<br>
2. Then I copy "v5" units to expected directory (of FpcUpDeluxe
structure) fpc\units\arm-wince<br>
3. Then I run Lazarus and try build for Target processor ARMv5 and
run on target system ... works</p>
<p>4. Then I have copied "v7" units over prior "v5" units <br>
5. I repeated step 3 ... works on target system with ARMv7
processor</p>
<p>Until now only question is :<br>
Can I set somewhere (in Project Options), in inteligent way, where
compiler will look for precompiled units ... to be able in one
project switch between Build modes, where each build mode will
look in other directory ?</p>
<p>But when I try set also "-CfFPV2" (in Project Options / Custom
Options ) then I get:<br>
</p>
<p>Fatal: Cannot find system used by fcllaz. Make sure all ppu files
of a package are in its output directory. ppu in wrong
directory=D:\TEMP\fpcupdeluxe\fpc\units\arm-wince\rtl\system.ppu..</p>
<p>I can resolve this error (beside using precompiled units with
same flag set) by adding "-CfFPV2" also in fpc.cfg after:<br>
#IFDEF FPC_CROSSCOMPILING<br>
#IFDEF WINCE<br>
#IFDEF CPUARM</p>
<p>So in this use case it is not sufficient only have two (or third)
distinct sets of precompiled units ...</p>
<p>So can these problems be solved somehow using only Project
Options without need to modify fpc.cfg ?</p>
<p>Btw. in fpc.cfg I have:<br>
# searchpath for units and other system dependent things<br>
-FuD:\TEMP\fpcupdeluxe\fpc/units/$fpctarget<br>
-FuD:\TEMP\fpcupdeluxe\fpc/units/$fpctarget/*<br>
-FuD:\TEMP\fpcupdeluxe\fpc/units/$fpctarget/rtl</p>
<p>Can this be avoided in fpc.cfg and transfered to Project Options
? (is /* supported in Lazarus, becuase Lazarus complains about
non-existent directory)</p>
<p>TIA</p>
<p>-Laco.</p>
</body>
</html>