[fpc-pascal] ARM Linux crosscompiler: compiles but... executable gives segmentation fault
Michael Ring
mail at michael-ring.org
Mon Jan 13 12:34:14 CET 2014
I had a look at armv6m yesterday evening, parts of my code run fine in
gdb, the code crashes in the init of a procedure when trying to prepare
the access to contents of a set.
The address of the set seems to get calculated totally wrong ending up
in a memory access at the end of the chip's address range.
Not sure if this is related to your problem, I will try to boil down the
example to a bare minimum to see where the generated code differs
between armv7m and armv6m.
Michael
Am 11.01.14 14:17, schrieb Reinier Olislagers:
> On 11/01/2014 14:03, Florian Klämpfl wrote:
>> Just type fpc -i to see the possible options. If one does not understand
>> those options, one does not need them :)
> I had a suspicion you were going to say that ;)
>
>> As said, arm targets are very different and every target has its optimal
>> parameters.
> Exactly. Having some additional info IMO helps to at least verify the
> choice somebody else made in his script/wiki page/build tool is correct ;)
>
>> E.g. on my NAS running debian 6.0 I build for thumb with
>> "CROSSOPT=-O4 -Cparmv5te -CIthumb"
>> and for normal arm with
>> "CROSSOPT=-O4 -Cparmv5te"
>> Depending on the distro, one needs different -Fl switches etc. Not to
>> talk about different OSes.
> Yep. -Fl is covered in the cross compiling article, of course also in
> the build faq.
>
>> Yes. But in my opinion then this info should go to the raspi page. I bet
>> 99% of the raspi users don't know what instruction set the raspi needs.
>> So explaining that -Cparmv6 turns on armv6 code generation does not help
>> them :)
> Ehm, this is exactly why I didn't put it on the raspi page ;)... but a
> link from there to the current page would be nice...
>
>>> So when /is/ specifying the ABI needed? When supporting a microcontroller?
>> Seriously: if you want to use an armel compiler to build e.g. for armhf.
> Ok.
>
>> But then you probably want to have also some other defines and you
>> really have to know what you are doing. Or if you have a special armel
>> setup where you want to use hard float code and abi for speed reasons,
>> e.g. when having softfloat raspberry debian installed. But these are
>> special setups, officially not supported.
> Got it. Not interested in going that deep ;)
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
>
More information about the fpc-pascal
mailing list