Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Crosscompiling to ARM

  1. #1

    Crosscompiling to ARM

    hi, i've a computer that runs on an ARM9 processor (exacly ARM920T), running linux.
    i've read some time ago that it is possible to cross compile to arm with freepascal.. is it true? any hint on how to do it/things i should be aware of?

    thanks!
    If you save your data in a proprietary format, the owner of the format owns your data.
    <br /><A href="http://msx80.blogspot.com">http://msx80.blogspot.com</A>

  2. #2

    Crosscompiling to ARM

    Yep!
    Some months ago I built a crosscompiler for arm-linux. This binary package is a bit outdated and I have lost on my hd the batch script I have made for building, but IIRC it should be pretty similar to gba crossbuild (see the wiki)
    Get your fpc4gba copy now!
    Get your fpc4nds copy now!

  3. #3

    Crosscompiling to ARM

    you mean this page;
    http://www.freepascal.org/wiki/index...ompile_For_ARM
    ?

    uhm looks simple! :shock:
    If you save your data in a proprietary format, the owner of the format owns your data.
    <br /><A href="http://msx80.blogspot.com">http://msx80.blogspot.com</A>

  4. #4

    Crosscompiling to ARM

    If you use Linux on your desktop, you also can download the 2.0.4 ARM-linux release to cross-compile to ARM.

  5. #5

    Crosscompiling to ARM

    Quote Originally Posted by {MSX}
    you mean this page;
    http://www.freepascal.org/wiki/index...ompile_For_ARM
    ?

    uhm looks simple! :shock:
    No, I mean this page:

    http://www.freepascal.org/wiki/index...ameBoy_Advance

    of course, changing the needed here and there
    Get your fpc4gba copy now!
    Get your fpc4nds copy now!

  6. #6

    Crosscompiling to ARM

    I tried compiling a FPC ARM cross-compiler a while back, but the FPC compiler would crash about an hour into the "make all" when trying to compile the runtime library. gtkspinbutton.pas would cause an internal compiler error that no-one on the FPC mailing list seemed interested in fixing, and I don't know how to debug that sort of thing with gdb.

  7. #7

    Crosscompiling to ARM

    Quote Originally Posted by Legolas
    Yep!
    Some months ago I built a crosscompiler for arm-linux. This binary package is a bit outdated and I have lost on my hd the batch script I have made for building, but IIRC it should be pretty similar to gba crossbuild (see the wiki)
    Hi Legolas :-)

    I have tried using that crosscompiler for arm-linux so I can make some pascal GP2X programs and I am having troubles.

    If I try compiling this code which uses the JEDI-SDL 1.0 beta units.

    [pascal]Program Test_gp2x;
    Uses
    SDL;
    Begin
    End.[/pascal]

    I get this output:

    Code:
    C&#58;\>ppcrossarm -Fuc&#58;\fpc\2.0.4\Units\arm-linux Test_gp2x.pp
    Free Pascal Compiler version 2.1.1 &#91;2006/09/09&#93; for arm
    Copyright &#40;c&#41; 1993-2006 by Florian Klaempfl
    Target OS&#58; Linux for ARM
    Compiling Test_gp2x.pp
    Compiling SDL.pas
    jedi-sdl.inc&#40;293,4&#41; Warning&#58; Illegal compiler directive "$THREADING"
    Fatal&#58; Can't find unit pthreads
    Fatal&#58; Compilation aborted
    Any ideas?

    I know I read somewhere about the $THREADING being removed/changed or something, but the fatal error is obviously the killer

    If you noticed the 2.0.4 version in the path, this is because I dumped the crosscompile units and binaries into separate unit and bin folders in the native fpc 2.0.4 version. I can't see this affecting the crosscompile?

    cheers,
    Paul.

  8. #8

    Crosscompiling to ARM

    Try to ifdef it, we cannot multithread on ARM at this time.

  9. #9

    Crosscompiling to ARM

    Quote Originally Posted by dmantione
    Try to ifdef it, we cannot multithread on ARM at this time.
    Ok, what about if I added a -Dgp2x define in the compile line and did something like this in the SDL.pas file:

    {$IFNDEF gp2x}
    //the whole pthreads section
    {$ENDIF}

    could this work?

    cheers,
    Paul.

  10. #10
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Crosscompiling to ARM

    Hey, keep at it Paul! GP2X will be a really nice addition to the list of game platforms for FPC.

    I can't exactly speak for him, but I think that after Legolas is done with getting the major stuff for GBA and NDS working he'll be interested in helping our add support for GP2X in FPC too.
    Jason McMillen
    Pascal Game Development
    Co-Founder





Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •