[fpc-devel] Code generated for the embedded arm port for lpc1768 (armv7m)

Michael Ring mail at michael-ring.org
Thu Oct 23 21:16:38 CEST 2014


This smells like some system.o left over from an old build or from an 
incorrect setting in fpc.cfg. Please use the switch -vu when you compile 
your program to find out where this file is in your filesystem.

If you do not get the correct path then please add the parameter -sh to 
your commandline. This does create a link script, the good thing is that 
you can now do:

cat link.res
SEARCH_DIR("/usr/local/lib/fpc/2.7.1/units/arm-embedded/rtl/")
SEARCH_DIR("/usr/local/lib/fpc/2.7.1/units/arm-embedded/")
SEARCH_DIR("/usr/local/lib/fpc/2.7.1/")
INPUT (
peephole.o
/usr/local/lib/fpc/2.7.1/units/arm-embedded/rtl/system.o
/usr/local/lib/fpc/2.7.1/units/arm-embedded/rtl/objpas.o
/usr/local/lib/fpc/2.7.1/units/arm-embedded/rtl/stm32f40x.o
)

and you can see where system.o comes from.


Michael

Am 23.10.14 um 21:08 schrieb Sietse Achterop:
> On 10/23/2014 08:38 PM, Jeppe Græsdal Johansen wrote:
>> Are you sure those are the precise steps you took? Because that 
>> should work as you expected it unless you have a broken binutils 
>> version. It's normally very quick to complain about incompatible ARM 
>> versions
>>
>> Try to disassemble the objects in the source directory at 
>> rtl/units/arm-embedded
>> Those should largely contain variable length thumb2 code.
>   Hello,
> thanks for the reply.
> My program code is ok, and also lpc1768.o and the cortexm3_start code 
> is ok.
> But code from system.o is wrong.
> And thanks to Michael Ring I now can be more consise:
>
>  arm-none-eabi-readelf -A lpc1768.o
> Attribute Section: aeabi
> File Attributes
>   Tag_CPU_name: "7-M"
>   Tag_CPU_arch: v7
>   Tag_CPU_arch_profile: Microcontroller
>   Tag_THUMB_ISA_use: Thumb-2
>
> arm-none-eabi-readelf -A system.o
> Attribute Section: aeabi
> File Attributes
>   Tag_CPU_arch: v5TE
>   Tag_ARM_ISA_use: Yes
>   Tag_THUMB_ISA_use: Thumb-1
>
> So why is system.o generated in the wrong version?
> I think that I did everything as I said.
> I will do the compiler starting from scratch again, just to be sure.
> I now know where to look for.
>
>    Sietse
>
>
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel




More information about the fpc-devel mailing list