Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2007-11

Problems getting a arm cross-compiler for symbian

5 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Felipe Monteiro de Carvalho

Hello,

I just added symbian arm target and I tryed to build a cross-compiler using a modification of my old script to build the symbian-x86 compiler:

PATH=C:\Programas\lazarus220\fpc\2.2.0\bin\i386-win32 cd c:\Programas\fpcbuild\fpcsrc
cd compiler
make CPU_TARGET=arm
cd ..
cd rtl
cd symbian
make FPC=C:\Programas\fpcbuild\fpcsrc\compiler\ppcarm.exe cd ..
cd ..

Now, that only generates a ppcarm.exe, and not what I really expected, a ppcrossarm.exe

I ignored that and insisted to see if it works and:

C:\Programas\fpcbuild\fpcsrc\rtl\symbian>make FPC=C:\Programas\fpcbuild\fpcsrc\c ompiler\ppcarm.exe
makefile:2155: warning: overriding commands for target `system.ppu' makefile:2153: warning: ignoring old commands for target `system.ppu' C:/Programas/fpcbuild/fpcsrc/compiler/ppcarm.exe -Tsymbian -Parm -XParm-symbian- -Xr -Fi../inc -Fi../arm -FE. -FU../../rtl/units/arm-symbian -darm -Us -Sg syst em.pp -Fi../win
Error: Illegal parameter: -Tsymbian
make: *** [system.ppu] Error 1

Why does FPC think there is no -Tsymbian for arm?

I compared everything I did for x86 and I can't see what I did different here. calling pparm.exe on the command line I get:

-T<x> Target operating system:
-Tlinux Linux
-Twince Windows CE

Symbian seams to be missing here too....

thanks,

Felipe Monteiro de Carvalho

Reply by email

Jonas Maebe
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote 14 lines
:\Programas\fpcbuild\fpcsrc\rtl\symbian>make FPC=C:\Programas \fpcbuild\fpcsrc\c ompiler\ppcarm.exe makefile:2155: warning: overriding commands for target `system.ppu' makefile:2153: warning: ignoring old commands for target `system.ppu' C:/Programas/fpcbuild/fpcsrc/compiler/ppcarm.exe -Tsymbian -Parm - XParm-symbian- -Xr -Fi../inc -Fi../arm -FE. -FU../../rtl/units/arm-symbian -darm - Us -Sg syst em.pp -Fi../win Error: Illegal parameter: -Tsymbian make: *** [system.ppu] Error 1 Why does FPC think there is no -Tsymbian for arm?

Set a breakpoint on find_system_by_string in systems.pas to find out.

Show quoted text 8 lines
I compared everything I did for x86 and I can't see what I did different here. calling pparm.exe on the command line I get: -T<x> Target operating system: -Tlinux Linux -Twince Windows CE Symbian seams to be missing here too....

That's because you didn't update compiler/msg/errore.msg (when you do, make sure that you also commit compiler/msgtxt.inc and compiler/ msgidx.inc afterwards). That text is not automatically extracted from the system info's (although it would actually be nice that were done).

Jonas

Reply by email

Felipe Monteiro de Carvalho
to Jonas Maebe
Jonas Maebe wrote
> Why does FPC think there is no -Tsymbian for arm? Set a breakpoint on find_system_by_string in systems.pas to find out.

I didn't manage to get anything from this.

my gdb on windows doesn't even recognize this function

gdb ppcarm.exe

(gdb) break find_system_by_string
Function "find_system_by_string" not defined.
Make breakpoint pending on future shared library load? (y or [n]) n (gdb) break FIND_SYSTEM_BY_STRING
Function "FIND_SYSTEM_BY_STRING" not defined.
Make breakpoint pending on future shared library load? (y or [n]) n (gdb)

further I have no idea what I would do with that anyway because it's a pretty streight forward function, and I don't know how to get anything useful without a IDE where I can get the variable values and so on.

Looking at the implementation of find_system_by_string I don't see why it wouldn't work, so I would really appreciate if someone could help me further in this problem.

thanks,

Felipe Monteiro de Carvalho

Reply by email

Jonas Maebe
to Felipe Monteiro de Carvalho

Felipe Monteiro de Carvalho wrote on za, 01 dec 2007:

Show quoted text 18 lines
On Nov 25, 2007 11:50 AM, Jonas Maebe wrote: > > Why does FPC think there is no -Tsymbian for arm? > > Set a breakpoint on find_system_by_string in systems.pas to find out. I didn't manage to get anything from this. my gdb on windows doesn't even recognize this function gdb ppcarm.exe (gdb) break find_system_by_string Function "find_system_by_string" not defined. Make breakpoint pending on future shared library load? (y or [n]) n (gdb) break FIND_SYSTEM_BY_STRING Function "FIND_SYSTEM_BY_STRING" not defined. Make breakpoint pending on future shared library load? (y or [n]) n (gdb)

The latter should work if you compiled the executable with debug information and didn't strip it. An alternative syntax is "break file.pas:linenr"

pretty streight forward function, and I don't know how to get anything useful without a IDE where I can get the variable values and so on.

There's no reason why you can't debug the compiler in an IDE. There's even already a ppcarm.lpi file in the compiler directory.

Looking at the implementation of find_system_by_string I don't see why it wouldn't work,

Me neither, that's why it has to be debugged in a debugger.

Jonas

---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.

Reply by email

Felipe Monteiro de Carvalho
to Jonas Maebe
Jonas Maebe wrote
There's no reason why you can't debug the compiler in an IDE. There's even already a ppcarm.lpi file in the compiler directory.

That's really excelent =) I already found the problem, I had forgotten to add t_symbian unit to cputargs for arm.

Now this error is fixed, but I am getting:

ppcarm.exe -Tsymbian qpashello.pas

Error: Illegal parameter: -Tsymbian

I tryed to just see where the error is caused using Lazarus but it's a bit complex to follow the compiler code. Any ideas where to start?

thanks,

Felipe Monteiro de Carvalho

Reply by email