[fpc-pascal] Variable alignment in arm-embedded
anton at riecktron.co.za
Mon Jun 11 13:46:50 CEST 2012
I've been using the actual ROM based interrupt table for the past month now
in freepascal ad it seems to work great. No need to declare a block of RAM
and pointing the interrupt table to it.
You can code any procedure and just give it the interrupt keyword with an
There are 3 patches you need to apply to your compiler. I'll try to submit
the patches to the Freepascal mailing list and hopefully someone will accept
them, but in the mean time you can find them here.
The first patch enables the interrupt keyword for the arm-embedded target
and allows the compiler to generate the NVIT table that will link in at
The second patch is a small bug fix with the stm32f103.pp definition file
The third patch fixed the exit code, otherwise you will get Hard Fault
interrupt when a interrupt occurs as a procedure is busy restoring the stack
No need to give the nostackframe since the ARMv7m automatically stores
R0-R3, R12, SP and LR for you when an interrupt occurs, thus the interrupt
procedure looks exactly like a normal procedure.
Please let me know if you have any questions.
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Variable-alignment-in-arm-embedded-tp5709962p5709998.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
More information about the fpc-pascal