[fpc-devel] Option -Wp does not work with new embedded target

Michael Ring mail at michael-ring.org
Sun Nov 30 20:14:41 CET 2014


Please download my diff here:

http://temp.michael-ring.org/fpc-arm.diff

I could not really find a difference in what you are doing to what I am 
doing so perhaps I give you my commandlines for the build, perhaps the 
difference is in the way you build:

Build&Install the compiler (in Cortex-M3 Mode)
make clean buildbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm 
*SUBARCH=armv7m* CROSSOPT="-O- -gw2" BINUTILSPREFIX=arm-none-eabi- || exit 1
sudo make installbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm 
SUBARCH=armv7m CROSSOPT="-O-" BINUTILSPREFIX=arm-none-eabi- || exit 1

Build&Install the compiler (in Cortex-M4 Mode)
make clean buildbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm 
*SUBARCH=armv7em* CROSSOPT="-O- -gw2" BINUTILSPREFIX=arm-none-eabi- || 
exit 1
sudo make installbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm 
SUBARCH=armv7em CROSSOPT="-O-" BINUTILSPREFIX=arm-none-eabi- || exit 1

This gives me a compiler that works for compiling:

/usr/local/lib/fpc/2.7.1/ppcrossarm -MObjFPC -Scghi -al -Ch1024 -Cs1024 
-Tembedded -Parm -gw2 -godwarfsets -godwarfmethodclassprefix -vewnhixv 
-l -Cparmv7m *-WpSTM32F407VG* -XParm-none-eabi- -FD/usr/local/bin -a 
peephole.pas

I usually compile for Cortex-M4 in Cortex-M3 Mode, this makes life a 
little easier when you do not need the features of armv7em.

The reason for this is that currently fpc cannot distinguish between 
different subarchs and I do not want to have several installations of 
ppcrossarm on my machine as long as I do not need the special armv7em 
features.

Please have a look at the rtl-files I provide (and tell me if you like 
the way I created them) , they are automagically created out of the 
CMSIS sources provided by ARM&ST.

Michael

Am 30.11.14 um 16:53 schrieb Sietse Achterop:
> On 11/30/2014 11:55 AM, Michael Ring wrote:
>> You need to change two files,
>>
>> +++ compiler/arm/cpuinfo.pas    (working copy)
>> +++ compiler/systems/t_embed.pas    (working copy)
>
>   Thanks Florian van Michael,
>
> You can find the files I changed on
>      http://fwn06.housing.rug.nl/fpc-stm32f4
> There you find the above files, the Makefile.fpc from rtl/embedded and
> the new files in rtl/embedded/arm.
>
> The diff from cpuinfo.pas with current trunk is:
>
>
> *** tmp/fpc/compiler/arm/cpuinfo.pas    2014-11-30 11:59:12.008103356 
> +0100
> --- fpc/compiler/arm/cpuinfo.pas    2014-11-30 11:51:10.332117439 +0100
> ***************
> *** 249,254 ****
> --- 249,255 ----
>         ct_stm32f107rc,
>         ct_stm32f107vb,
>         ct_stm32f107vc,
> +       ct_stm32f4xx,    // use this name for the moment
>
>         { TI - Fury Class - 64 K Flash, 16 K SRAM Devices }
>         ct_lm3s1110,
> ***************
> *** 617,622 ****
> --- 618,627 ----
>         (controllertypestr:'STM32F107VB'; 
> controllerunitstr:'STM32F10X_CL';     flashbase:$08000000; 
> flashsize:$00020000; srambase:$20000000; sramsize:$00010000),
>         (controllertypestr:'STM32F107VC'; 
> controllerunitstr:'STM32F10X_CL';     flashbase:$08000000; 
> flashsize:$00040000; srambase:$20000000; sramsize:$00010000),
>
> +       { STM32F4 series }
> +       (controllertypestr:'STM32F4xx'; 
> controllerunitstr:'STM32F4xx';   flashbase:$08000000; 
> flashsize:$00100000; srambase:$20000000; sramsize:$00010000),
> +          {  How to include CCMRAM?  : ORIGIN = 0x10000000, LENGTH = 
> 64K  }
> +
>         (controllertypestr:'LM3S1110'; controllerunitstr:'LM3FURY';    
> flashbase:$00000000; flashsize:$00010000;    srambase:$20000000; 
> sramsize:$00004000),
>         (controllertypestr:'LM3S1133'; controllerunitstr:'LM3FURY';    
> flashbase:$00000000; flashsize:$00010000;    srambase:$20000000; 
> sramsize:$00004000),
>         (controllertypestr:'LM3S1138'; controllerunitstr:'LM3FURY';    
> flashbase:$00000000; flashsize:$00010000;    srambase:$20000000; 
> sramsize:$00004000),
>
>
> Looks alright to me.
> The diff from t_embed.pas is:
>
> *** tmp/fpc/compiler/systems/t_embed.pas    2014-11-30 
> 11:59:12.172103351 +0100
> --- fpc/compiler/systems/t_embed.pas    2014-11-30 11:37:14.796141869 
> +0100
> ***************
> *** 401,406 ****
> --- 401,407 ----
>         ct_stm32f107rc,
>         ct_stm32f107vb,
>         ct_stm32f107vc,
> +       ct_stm32f4xx,
>
>         { TI - 64 K Flash, 16 K SRAM Devices }
>         ct_lm3s1110,
>
> Also ok?
> I think the error has to come from one of these files, not the 
> contents of the rtl itself.
> The rtl code is still rather rough, but it compiles.
>
>>
>> I have already done that work, I can send you a patchfile for trunk 
>> that adds the following devices:
>>
>   That would be nice,
>
>      Thanks,
>         Sietse
>
>
>
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20141130/71e86d4e/attachment.html>


More information about the fpc-devel mailing list