[fpc-devel] fpc on ARM without OS
Bernd Mueller
mueller.b at gmx.net
Thu Oct 16 17:33:30 CEST 2008
Florian Klaempfl wrote:
> Bernd Mueller schrieb:
>> Hello,
>>
>> I am trying hard to avoid C on an ARM7TDMI/ARMv4T Controller
>> (AT91SAM7Sx) ;-)
>
> What about simply supporting the interrupt keyword on arm? Point me to
> some description and I'll implement it.
I searched the web for some details:
http://www.state-machine.com/arm/Building_bare-metal_ARM_with_GNU.pdf
shows the complete interrupt mess on Page 6-1ff regarding gcc.
http://www.inf.ethz.ch/personal/wirth/Articles/Oberon/Interrupts.pdf
Page 1 and 2.
http://www.mikrocontroller.net/topic/71979
Last post from Martin Thomas.
and did not look further. I really think it is not worth your effort to
implement this in fpc now. ARM interrupt handling is so complex, because
of the different ARM modes and the different exception types (IRQ/Fast
IRQ/SWI etc. which need different return address alignment). Another
point are the vendor specific vector controller implementations. I think
this would be very hard to implement, hard to debug and maybe error prone.
I could live with a performance penalty and think my second approach
(going via the wrapper in the startup code) is perhaps the better start
with fpc. This would have had the advantage too, that this should work
with other controller vendors (ATMEL, ST, NXP, Samsung) without changing
the compiler. Only the linker script and the startup code had to be adapted.
Regards, Bernd.
More information about the fpc-devel
mailing list