1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Dismiss Notice

Lazarus and Freepascal PND

Discussion in 'C /C ++' started by ptitSeb, Nov 5, 2012.

  1. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,697
    Location:
    France, near Lyon
    Hum, the compile/generic/cpuinfo.pas was bugging me. I replace it with the arm one (I should have just patched it with ome dumy definition of tcontrollertype), and Iam back to compile 2.6.0 with VFPv3.


    And no trace of NEON in the source, so yes, we will have to wait for an other version...
     
  2. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,697
    Location:
    France, near Lyon
    Still fighting with recompiling UNITS... The makefile is ... well, it doesn't allways catch the dependencies... So compilation stops. I have to figure out wich UNIT is missing, compile the unit, and relaunch make package_install


    Painfully slow, but it seems to works...
     
  3. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,697
    Location:
    France, near Lyon
    Ok at least it compile ! I have to define an new export FPCMAKE="$FPC -CpARMV6 -CfVFPV3", so fpcmake -r -w can actualy works, because this step compile some fpmake.pas utilities per folder, that use the rtl, this is compiled with those options...


    So, after hours of Pandora time, fpc 2.6.0 was fully compiled.


    I compile Lazarus then...


    and launch it...


    ... and a superb Runtime Error 216 appears :(


    So, back to make clear and build again...


    and the link fail with a out of Memory... Well, make all again, it tend to work the second time.


    It still doesn't run


    I have



    Code:
    
    Runtime error 216 at $00019034
    
    Runtime error 216 at $FF89EE78
    
      $FF89EE78
    
      $0002BA4
    
      $4080103C
    
    

    Back to square one I guess...
     
  4. ThomasSeban

    ThomasSeban Still Fresh

    Joined:
    Oct 12, 2007
    Messages:
    63
    I got the same 216 runtime error with my FPC 2.6.X or 2.7.X cross compiler under windows. I can compile, but execution on pandora doesn't work. I have test serveral different options, but nothing helps. The problem occurs if any external functions is called, in my case like SDL_Init or any other SDL - function. My 2.5.1 cross compile work without any problems, so they must changed calling convention, but i coudn't find anything.


    Thomas
     
  5. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,697
    Location:
    France, near Lyon
    Ah, thanks for the tip ! So I'm not crazy -_- , there is a problem with fpc 2.6.0+ it seems. When you cross compile, do you use the -CpVFPV3 also ? Because I have Runtime error only when using this flag.


    I may have to downgrade compiler to 2.5.1 to compile with VFP3 floting point...
     
    Last edited by a moderator: Nov 9, 2012
  6. ThomasSeban

    ThomasSeban Still Fresh

    Joined:
    Oct 12, 2007
    Messages:
    63
    Softfloat, VFPV3 and some other testet, but nothing works with 2.6.X. But this coud means nothing, there are too many options and too many different topics in the world, which options has to used in which situation :) . My 2.5.1 cross compiler using only SoftFloat at moment, -CfVFP3 is not suppoted :(


    Thomas
     
  7. ZXDunny

    ZXDunny Deep avatar

    Joined:
    Oct 12, 2010
    Messages:
    2,388
    That's interesting - I cross compile from within a Debian VM with FPC 2.4.0, and that supports -Cfvfpv3 so long as I use the assembler override I mentioned above, as FPC doesn't pass the machine-type flag to as.


    D.
     
  8. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,697
    Location:
    France, near Lyon
    Yes, in the -CfVFPV3 flag is noted as *new* on the FPC 2.6.0 ChangeLog. So it may have appear in some 2.5.1, but 2.4.0 is early.I suspect your 2.4.0 to be more recent than 2.4.0, but still gaving 2.4.0 as version number.
     
    Last edited by a moderator: Nov 9, 2012
  9. ZXDunny

    ZXDunny Deep avatar

    Joined:
    Oct 12, 2010
    Messages:
    2,388
    Well, I installed it more than a year ago shortly after I got my Pandora, so around May or June of 2011. I recall it took me a couple of days to get vfpv3 working.


    D.
     
  10. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,697
    Location:
    France, near Lyon
    A yes a couple of days to get vfpv3 working, I can't agree more ! The programs build with vfpv3 just crash with a General Protection Fault (Runtime Error 216). Once I have get my Pandora back, in an hour or 2 (my kid borough it), I try to re-compile without vfpv3 (because I swtiched to fpc 2.6.1 and lazarus 1.1, all from today), just to see if it's the option or the sources...
     
  11. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,697
    Location:
    France, near Lyon
    Ok, I will stop trying to put VFPV3 for a while. I just drive me crazy right now... Back to some Code::Blocks coding, and take fpc back in a few days or weeks.
     
  12. ZXDunny

    ZXDunny Deep avatar

    Joined:
    Oct 12, 2010
    Messages:
    2,388
    Well, thanks for trying :)


    I'll go back to developing in FPC under x86 for now then, as not having vfpv3 support really harms performance in floating point heavy apps - which PandaBAS unfortunately is.


    D.
     
  13. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,697
    Location:
    France, near Lyon
    Finally I managed to recompile everything with the VFPV3 switch, and have everything working !

    I used the assembler and linker from Binutil 2.22 (from codeblocks PND). I think the linker is important here as this one has the abality to link programs > 32Mo, and lazarus is ... 140 Mo of size !!!

    So enjoy hardware floating point (and report if it work)...

     

    Build 03

    • Added -CpARMV6 -CfVFPV3 switch to have "hardware" floating point and recompile everything
    • updated FreePascal Compiler to v2.7.1 (dated 18/01/2013) from v2.6.0
    • updated Lazarus 1.0.4 from 1.0.2
    • updated ld and as to binutil 2.22 from firmware ones (1.18).
     
     
    Last edited by a moderator: Jan 20, 2013
  14. frostfall

    frostfall Still Fresh

    Joined:
    Jan 27, 2011
    Messages:
    77
    Wonderful :)
     
  15. ZXDunny

    ZXDunny Deep avatar

    Joined:
    Oct 12, 2010
    Messages:
    2,388
    Thread Necromancy!

    Any chance of an updated 1.2 build of Lazarus? And any updates to FPC? :)

    Cheers,

    D.
     
  16. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,697
    Location:
    France, near Lyon
    I will try. Last time I try to work on this PND didn't went well, but I think I know a better approach now. It will take time anyway...
     
  17. ZXDunny

    ZXDunny Deep avatar

    Joined:
    Oct 12, 2010
    Messages:
    2,388
    Thanks for that - would be nice to get at least the latest IDE for it. iirc you've already got the latest FPC in there?

    D.
     
  18. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,697
    Location:
    France, near Lyon
    I'm not really satisfied with the build of FPC I had, so I will try to get a better one someday.
     
  19. Gandi

    Gandi Member

    Joined:
    Jan 23, 2009
    Messages:
    141
    Location:
    Germany
    Just stumbled over this thread.

    I would be happy about an update, too.

    Pascal is by far my favourite language and the only one I've been doing something "productive" with on my Pandora.

    No need to hurry, though.

    The current Lazarus.pnd still works very well for me.
     
  20. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,697
    Location:
    France, near Lyon
    If all goes well ("only" packaging now), I should be able to push an update release of the pnd soon, featuring fpc 2.6.4 and lazarus 1.2.6.

    preview1.png
     
    ZXDunny likes this.

Share This Page

Loading...