Results 1 to 7 of 7

Thread: Lazarus on the Raspberry Pi

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    PGD Staff / News Reporter phibermon's Avatar
    Join Date
    Sep 2009
    Location
    England
    Posts
    524
    It'll be a lot faster with successive builds as Pascal compilers work differently from say a C++ compiler : they compile the units then build the final output from combining this intermediate stage (as well as normal linking) so that any unit that is unchanged, does not need to be recompiled. Some C/C++ etc compilers have similar optimizations that fit around the language, but that's more of a vendor specific optimization than anything inherent to the language itself. Classicly C compilers concatenate all source into one big file then compile that. (that's why you see compiler level IFDEFs / constant sections in some C source code checking to see if they've already been defined))

    If you do have a fairly modern desktop or laptop, compiling on the Pi isn't the way forward. As good as it is, it's no powerhouse and compilation (as quick as it might be with Delphi/FPC) isn't a task you should expect to be quick in any context. (don't forget your blistering compilation speeds in Delphi have a lot to thank to the far superior processing power of whatever system you used compared to the Pi and the Delphi compiler itself)

    You should examine Cross compilation if working on the Pi is slowing you down, no reason you can't build your Pi executables on your PC (you'll need a proper CVS checkout and build of FPC/Lazarus with all the trimmings to do this properly) and test on the Pi, build to a network directory, execute the app on the Pi automatically as part of execution by writing a script that uses SSH to start the process remotely.

    If you're coding in a cross platform way then you shouldn't be using any specific hardware functionality of the Pi (preferably), So a program/game sucessfully debugged on a PC is going to work on other platforms too. That is to say that once you have a framework that compiles and runs on multiple platforms and works as expected, then anything you build within that framework should be platform agnostic, including the bugs (providing you're using the standard/proven cross platform libs and handling generic cross architecture/platform concerns such as endiness correctly).

    (Oh and obviously if the game calls for it, taking into account the available memory and any performance aspects of the intended devices)
    Last edited by phibermon; 02-05-2013 at 12:49 PM.
    When the moon hits your eye like a big pizza pie - that's an extinction level impact event.

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
  •