[fpc-pascal] Variable alignment in arm-embedded
ludo.brands at free.fr
Fri Jun 8 06:45:47 CEST 2012
> I want to make an interrupt-vector-table for the cortex-M3 processor.
> When I read the docs of the processor good, the start of that table
> needs to be on a multiple of $100 bytes in memory. Since with
> FPC there
> seems no way of getting that table in flash I need to have it in RAM.
> But how can I have the table at those $100-bytes multiple ? I
> found an
> ALIGN directive, but that's limited to 32 bytes.
> Any suggestions ?
> I had hoped that the first variable would be at the first location in
> RAM and the first variable in the startup-code is that vector-table.
> Unfortunatly, my hope was in vain.
> Any help ?
ReservedBlock:array[0..$1FF] of byte;
IntVectors:=pointer((ptruint(@ReservedBlock)+$100) and not $ff);
IntVectors:=pointer((ptruint(pReservedBlock)+$100) and not $ff);
More information about the fpc-pascal