Recent

Poll

Should there be an Pascal/Lazarus IDE for Symbian?

Yes
10 (90.9%)
No
1 (9.1%)

Total Members Voted: 10

Voting closed: February 14, 2007, 08:02:09 pm

Author Topic: fpc and lazarus on (for) symbian  (Read 34334 times)

SambucusELF

  • New Member
  • *
  • Posts: 25
fpc and lazarus on (for) symbian
« on: February 14, 2007, 08:02:09 pm »
a could really use a tiny IDE for Symbian cell phone if there was any...

Is anyone working on it?


 :?:

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
RE: fpc and lazarus on (for) symbian
« Reply #1 on: February 14, 2007, 08:27:50 pm »
I´m working on it ... because a Bounty was posted: http://wiki.lazarus.freepascal.org/Bounties

My current guesses about how long it will take to get done is: 3 months to get into usable state, and 6 months to be stable.

Take into account that this work only covers creating a Free Pascal port for Symbian OS, so porting LCL isn´t included, and thus using the form designer.

To create forms and such, it will be necessary to call Symbian OS GUI APIs directly. But of course someone can add a LCL port latter.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
RE: fpc and lazarus on (for) symbian
« Reply #2 on: February 14, 2007, 08:54:46 pm »
One extra comment, I don´t know what you meant by "tiny IDE", but Lazarus is huge, and thus my idea is using it on a Desktop machine to cross-compile applications to either the emulator or the real devices. I don´t think lazarus would run on Smartphones, specially because it wouldn´t fit the screen.

SambucusELF

  • New Member
  • *
  • Posts: 25
RE: fpc and lazarus on (for) symbian
« Reply #3 on: February 14, 2007, 09:25:43 pm »
yes, I was somewhat undefined, I meant, that there should be a tiny ide for FPC on Symbian, something that would resemble Turbo Pascal IDE on DOS, ... Basic stuff like compile, link, run (maybe debug and breakpoint would be too much to ask) ... in one place...

Is there some alpha work I could try?

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: RE: fpc and lazarus on (for) symbian
« Reply #4 on: February 15, 2007, 08:12:12 pm »
Quote from: "SambucusELF"
Is there some alpha work I could try?


Yes and no. You can download latest Free Pascal from subversion, learn how to compile a cross-compiler to Symbian-i386, cross-compile the Run-time library, and finally compile some software for Symbian - i386 (emulator).

But, the software will give an error on the initialization and not run, because something is wrong with the initialization code I created so far.

SambucusELF

  • New Member
  • *
  • Posts: 25
fpc and lazarus on (for) symbian
« Reply #5 on: February 16, 2007, 07:21:26 pm »
I would like to try that. I have some experience in compiling stuff like linux kernel, programs, libraries, etc.

Maybe I could help in making a cross compiler.

P.S. I already have FPC, I just need to intall libraries for Symbian types and procedures I guess...

Can you get me some link for info on how to do that.

If I can mention, I am an amateur programmer since 1991 (when I was 7), so maybe I can be of some assistance - the golden rule of multiple people checking the code for mistakes that are obvious to them, but maybe not for someone else...

 :?:

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
fpc and lazarus on (for) symbian
« Reply #6 on: February 16, 2007, 07:39:50 pm »
I voted no. Lazarus should not run symbian, but should compile with symbian as target.

SambucusELF

  • New Member
  • *
  • Posts: 25
fpc and lazarus on (for) symbian
« Reply #7 on: February 16, 2007, 07:44:42 pm »
Yes, you are right, lazarus is too big, but fpc port with IDE such as Turbo Pascal would be great...

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
fpc and lazarus on (for) symbian
« Reply #8 on: February 17, 2007, 10:41:50 pm »
Quote from: "SambucusELF"
P.S. I already have FPC, I just need to intall libraries for Symbian types and procedures I guess...


You will need to:

1 - Download latest subversion Free Pascal Source code

2 - Install stable Free Pascal 2.0.4 binaries

3 - Download and install Symbian UIQ 3 SDk. That´s the current target ... others will follow on the future.

4 - Use fpc 2.0.4 to create a cross-compiler with fpc 2.1.1 source code. The command is:

cd fpc21\compiler
make i386

5 - Use the cross-compiler to compile symbian rtl

cd fpc21\rtl\symbian
make PPC=C:\fpc21\compiler\ppci386.exe <not sure about this command>

You need to be in Windows for all of this, because Symbian OS SDK only works on Windows.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
fpc and lazarus on (for) symbian
« Reply #9 on: February 17, 2007, 10:47:26 pm »
Quote from: "SambucusELF"
Yes, you are right, lazarus is too big, but fpc port with IDE such as Turbo Pascal would be great...


Free Pascal comes with a IDE which is almost exactly like Turbo Pascal IDE.

However, it´s a complex task to get free pascal running inside symbian os, which dependens on things like the availability of binutils for the platform.

symbian SDK only provides (incomplete) binutils for win32-symbian. They don´t provide binutils for symbian-symbian, althougth it´s obviously possible to roll your own.

SambucusELF

  • New Member
  • *
  • Posts: 25
fpc and lazarus on (for) symbian
« Reply #10 on: March 05, 2007, 03:06:19 pm »
ok, thanks, I just downloaded Carbide.C++ Nokia Symbian SDK, I'll try to make something of my own.

I'll inform you if I made some progress.

Thanks for the info.

SambucusELF

SambucusELF

  • New Member
  • *
  • Posts: 25
fpc and lazarus on (for) symbian
« Reply #11 on: March 05, 2007, 03:10:57 pm »
Quote from: "sekel"
Quote from: "SambucusELF"
P.S. I already have FPC, I just need to intall libraries for Symbian types and procedures I guess...


You will need to:

1 - Download latest subversion Free Pascal Source code

2 - Install stable Free Pascal 2.0.4 binaries

3 - Download and install Symbian UIQ 3 SDk. That´s the current target ... others will follow on the future.

4 - Use fpc 2.0.4 to create a cross-compiler with fpc 2.1.1 source code. The command is:

cd fpc21\compiler
make i386

5 - Use the cross-compiler to compile symbian rtl

cd fpc21\rtl\symbian
make PPC=C:\fpc21\compiler\ppci386.exe <not sure about this command>

You need to be in Windows for all of this, because Symbian OS SDK only works on Windows.


Obviously, I wasn't reading carefully enough. I will try to get UIQ SDK when I get my broadband back.

c u l8r

SambucusELF

  • New Member
  • *
  • Posts: 25
fpc and lazarus on (for) symbian
« Reply #12 on: April 09, 2007, 01:07:17 pm »
sorry for opening an old topic,... but, hence you said there should be some progress on fpc for symbian I wanted to ask is there any change on the procedure of building fpc for UIQ before I start downloading.

Thanks, SambucusELF

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
fpc and lazarus on (for) symbian
« Reply #13 on: April 09, 2007, 03:31:44 pm »
No, there were no changes.

2 months ago I said it would probably take 3 months before it get's usable, so I'm inside my estimative =)

It doesn't really work currently. I posted a question of fpc mailling list, but noone could answer it, so I have a strange problem that I can't solve. I will rewrite my question here. If you manage to find a solution for this, the development of symbian os port will be greatly accelerated =)

From: Felipe Monteiro de Carvalho    
to: FPC mailling list
   
show details
    Mar 24
Hello,

I am having some trouble with the symbian os port. Basically I am
working with the emulator so far, so consider as if I were writing a
normal (or almost) win32 application.

Basically windows will refuse running the application with a message
saying it´s not a valid win32 application.

To test further, I created a trivial win32 asm app, assembled it with
gas and linked it. Here is the file:

    .file   "prt0.as"
    .text
    /* Entry point for Symbian OS executables */
    .globl E32EXE
E32EXE:
    /* Entry point for MS Windows */
    .globl main
main:
    leave
    ret

And here is how I assemble and link it:

C:\Programas\lazarus20\fpc\2.0.4\bin\i386-win32\as.exe prt0.as -o prt0.o
C:\Programas\lazarus20\fpc\2.0.4\bin\i386-win32\ld.exe --entry=E32EXE
-o prt0.exe prt0.o

This works fine (ok, the app doesn´t do anything, but also I don´t see
any error messages). by the way, prt0 is just a random name ... don´t
think it has anything to do with the prt0 asm files on fpc

Next I tryed to simply compile the same app, but adding the symbian RTL also:

C:\Programas\lazarus20\fpc\2.0.4\bin\i386-win32\ld.exe --entry=E32EXE
-o prt0.exe prt0.o C:\Programas\fpc21\rtl\units\i386-symbian\system.o
qhelloworld.o

This won´t work. The executable is linked fine, but the app won´t run.
I´m puzzled, because there is absolutely no reference from prt0.o to
system.o or qhelloworld.o, so in fact, only prt0 should be used. Just
by linking together the other .o files makes the .exe problematic.

Any ideas why? system.o is assembled with gnu asm too. I added
qhelloworld.o only because linking system.o alone won´t work, as it
complains about missing things.

And there are no main or E32EXE functions on either system.o or qhelloworld.o

This problem is important because it also occurs when I link a
complete symbian app.

thanks,
--
Felipe Monteiro de Carvalho

Lord_ZealoN

  • Full Member
  • ***
  • Posts: 141
    • http://lordzealon.com
fpc and lazarus on (for) symbian
« Reply #14 on: April 09, 2007, 04:07:59 pm »
Quote from: "Vincent"
I voted no. Lazarus should not run symbian, but should compile with symbian as target.


Well, I voted yes, and only would like Symbian as target.

 

TinyPortal © 2005-2018