[fpc-devel] fpc on ARM without OS
Bernd Mueller
mueller.b at gmx.net
Thu Oct 16 15:29:24 CEST 2008
Hello,
I am trying hard to avoid C on an ARM7TDMI/ARMv4T Controller
(AT91SAM7Sx) ;-)
fpc seems to work pretty well on the controller (running the firmware
out of flash memory) unless it comes to interrupts. But interrupts are
required for my application. The ARM interrupt implementation seems to
be rather complex.
Usually an interrupt procedure needs special entry and exit code. First
I tried to simulate this with inline assembler. This failed because fpc
did not support the required instructions. Then I modified the fpc
generated assembler source and assembled this manually. As this would
only be a proof of concept and I could not be sure, that the fpc
developers would implement this in the compiler, I gave up on this (for
now) and tried a second approach.
The startup code catches the interrupt and provides a wrapper around a
normal C (Pascal) function, so that the special entry/exit code is not
required. This is of cause the slower interrupt processing variant.
Unfortunately the set of linker script and startup code (which work with
C) fail with fpc. The fpc generated binary has a size of 0 byte (no
error message). So there is something fundamental wrong. I attached the
original files and would be happy, if someone could look over it or has
another idea, what I could check to get this work.
Regards, Bernd.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ls_startup.zip
Type: application/x-zip-compressed
Size: 4760 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20081016/daab9125/attachment.bin>
More information about the fpc-devel
mailing list