I thought Free Pascal did this already...?
My response to this was that it already cross-compiles. At the least it is what I had meant.Originally Posted by Legolas
As for the GBA port of FPC, why not contact Noeska and FPK(easier to reach on IRC at #fpc, check the FPC website for the server) and see what may help? Noeska is good for it and FPK is willing under the right conditions...
I think what FPK is getting at is not only does he want to see it actually being used, unlike his other BeOS and Solaris ports, but that someone will actually be required to maintain it and handle bug reports and the like aswell.
However I think that we have already established that there is a want and some will use it. I certanly will if it's available to me. But is a handfull of people enough? Maybe, maybe not... I'll definately be looking into this further.
I don't know about freepascal, but with a bit of headache and a lot of attempts I built a gpc cross compiler from cygwin to arm-elf that (theorically) could compile gba code
At this time I'm trying to convert some simple code from c to pascal to do some testing... Stay tuned!
[quote="noeska"]I think al that is needed on how to modify free pascal for the gba is written here: http://linux.gbadev.org/gcc-gba/ .
The important part is crt0.s as this defines the gba (cartridge/executable) header. But even more improtant is the lnkscript that is used. As that glues together the crt0.o with your applicton .o file in a special way. Without that ]
im pretty sure the gba supports both thumb and arm instruction sets
iirc due to bus issues thumb is faster when running from cart but arm is faster when running from ram.
If I understood FPK ok, there is one main problem compiler side:Originally Posted by Legolas
- FPC supports ARM, but only normal 32-bit ARM assembler. ARM also has a shortened 16-bit THUMB chipset. (not every ARM chip has this, it is an added option). FPC doesn't support THUMB instruction generation yet.
Besides that, the typical other tasks that must be done for a new port:
- somehow create startup code (the already mentioned crt0.[o|as])
- Create something that can interface with the OS.
- Interface to other compiler's libraries (typical GCC) to get access to code.
- Do stuff that is special for that port. (e.g. for Windows: DLL support)
Bookmarks