<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Please download my diff here:<br>
    <br>
    <a class="moz-txt-link-freetext" href="http://temp.michael-ring.org/fpc-arm.diff">http://temp.michael-ring.org/fpc-arm.diff</a><br>
    <br>
    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:<br>
    <br>
    Build&Install the compiler (in Cortex-M3 Mode)<br>
    make clean buildbase CROSSINSTALL=1 OS_TARGET=embedded
    CPU_TARGET=arm <b>SUBARCH=armv7m</b> CROSSOPT="-O- -gw2"
    BINUTILSPREFIX=arm-none-eabi- || exit 1<br>
    sudo make installbase CROSSINSTALL=1 OS_TARGET=embedded
    CPU_TARGET=arm SUBARCH=armv7m CROSSOPT="-O-"
    BINUTILSPREFIX=arm-none-eabi- || exit 1<br>
    <br>
    Build&Install the compiler (in Cortex-M4 Mode)<br>
    make clean buildbase CROSSINSTALL=1 OS_TARGET=embedded
    CPU_TARGET=arm <b>SUBARCH=armv7em</b> CROSSOPT="-O- -gw2"
    BINUTILSPREFIX=arm-none-eabi- || exit 1<br>
    sudo make installbase CROSSINSTALL=1 OS_TARGET=embedded
    CPU_TARGET=arm SUBARCH=armv7em CROSSOPT="-O-"
    BINUTILSPREFIX=arm-none-eabi- || exit 1<br>
    <br>
    This gives me a compiler that works for compiling:<br>
    <br>
    /usr/local/lib/fpc/2.7.1/ppcrossarm -MObjFPC -Scghi -al -Ch1024
    -Cs1024 -Tembedded -Parm -gw2 -godwarfsets -godwarfmethodclassprefix
    -vewnhixv -l -Cparmv7m <b>-WpSTM32F407VG</b> -XParm-none-eabi-
    -FD/usr/local/bin -a peephole.pas<br>
    <br>
    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. <br>
    <br>
    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.<br>
    <br>
    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.<br>
    <br>
    Michael<br>
    <br>
    <div class="moz-cite-prefix">Am 30.11.14 um 16:53 schrieb Sietse
      Achterop:<br>
    </div>
    <blockquote cite="mid:547B3D70.1070603@rug.nl" type="cite">On
      11/30/2014 11:55 AM, Michael Ring wrote:
      <br>
      <blockquote type="cite">You need to change two files,
        <br>
        <br>
        +++ compiler/arm/cpuinfo.pas    (working copy)
        <br>
        +++ compiler/systems/t_embed.pas    (working copy)
        <br>
      </blockquote>
      <br>
        Thanks Florian van Michael,
      <br>
      <br>
      You can find the files I changed on
      <br>
           <a class="moz-txt-link-freetext" href="http://fwn06.housing.rug.nl/fpc-stm32f4">http://fwn06.housing.rug.nl/fpc-stm32f4</a>
      <br>
      There you find the above files, the Makefile.fpc from rtl/embedded
      and
      <br>
      the new files in rtl/embedded/arm.
      <br>
      <br>
      The diff from cpuinfo.pas with current trunk is:
      <br>
      <br>
      <br>
      *** tmp/fpc/compiler/arm/cpuinfo.pas    2014-11-30
      11:59:12.008103356 +0100
      <br>
      --- fpc/compiler/arm/cpuinfo.pas    2014-11-30 11:51:10.332117439
      +0100
      <br>
      ***************
      <br>
      *** 249,254 ****
      <br>
      --- 249,255 ----
      <br>
              ct_stm32f107rc,
      <br>
              ct_stm32f107vb,
      <br>
              ct_stm32f107vc,
      <br>
      +       ct_stm32f4xx,    // use this name for the moment
      <br>
      <br>
              { TI - Fury Class - 64 K Flash, 16 K SRAM Devices }
      <br>
              ct_lm3s1110,
      <br>
      ***************
      <br>
      *** 617,622 ****
      <br>
      --- 618,627 ----
      <br>
              (controllertypestr:'STM32F107VB';    
      controllerunitstr:'STM32F10X_CL';     flashbase:$08000000;
      flashsize:$00020000; srambase:$20000000; sramsize:$00010000),
      <br>
              (controllertypestr:'STM32F107VC';    
      controllerunitstr:'STM32F10X_CL';     flashbase:$08000000;
      flashsize:$00040000; srambase:$20000000; sramsize:$00010000),
      <br>
      <br>
      +       { STM32F4 series }
      <br>
      +       (controllertypestr:'STM32F4xx';      
      controllerunitstr:'STM32F4xx';   flashbase:$08000000;
      flashsize:$00100000; srambase:$20000000; sramsize:$00010000),
      <br>
      +          {  How to include CCMRAM?  : ORIGIN = 0x10000000,
      LENGTH = 64K  }
      <br>
      +
      <br>
              (controllertypestr:'LM3S1110';   
      controllerunitstr:'LM3FURY';    flashbase:$00000000;   
      flashsize:$00010000;    srambase:$20000000;   
      sramsize:$00004000),
      <br>
              (controllertypestr:'LM3S1133';   
      controllerunitstr:'LM3FURY';    flashbase:$00000000;   
      flashsize:$00010000;    srambase:$20000000;   
      sramsize:$00004000),
      <br>
              (controllertypestr:'LM3S1138';   
      controllerunitstr:'LM3FURY';    flashbase:$00000000;   
      flashsize:$00010000;    srambase:$20000000;   
      sramsize:$00004000),
      <br>
      <br>
      <br>
      Looks alright to me.
      <br>
      The diff from t_embed.pas is:
      <br>
      <br>
      *** tmp/fpc/compiler/systems/t_embed.pas    2014-11-30
      11:59:12.172103351 +0100
      <br>
      --- fpc/compiler/systems/t_embed.pas    2014-11-30
      11:37:14.796141869 +0100
      <br>
      ***************
      <br>
      *** 401,406 ****
      <br>
      --- 401,407 ----
      <br>
              ct_stm32f107rc,
      <br>
              ct_stm32f107vb,
      <br>
              ct_stm32f107vc,
      <br>
      +       ct_stm32f4xx,
      <br>
      <br>
              { TI - 64 K Flash, 16 K SRAM Devices }
      <br>
              ct_lm3s1110,
      <br>
      <br>
      Also ok?
      <br>
      I think the error has to come from one of these files, not the
      contents of the rtl itself.
      <br>
      The rtl code is still rather rough, but it compiles.
      <br>
      <br>
      <blockquote type="cite">
        <br>
        I have already done that work, I can send you a patchfile for
        trunk that adds the following devices:
        <br>
        <br>
      </blockquote>
        That would be nice,
      <br>
      <br>
           Thanks,
      <br>
              Sietse
      <br>
      <br>
      <br>
      <br>
      _______________________________________________
      <br>
      fpc-devel maillist  -  <a class="moz-txt-link-abbreviated" href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>
      <br>
      <a class="moz-txt-link-freetext" href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</a>
      <br>
    </blockquote>
    <br>
  </body>
</html>