Remove all traces of the interrupt vector table generation mechanism

Clean up cpuinfo tables
Fixed ARMv7M bug(BLX <label> doesn't exist on that version)

git-svn-id: branches/laksen/arm-embedded@22579 -
This commit is contained in:
Jeppe Johansen 2012-10-08 00:10:52 +00:00
parent f67a330519
commit 8b17a358e4
9 changed files with 79 additions and 306 deletions

View File

@ -239,7 +239,6 @@ Const
((
controllertypestr:'';
controllerunitstr:'';
interruptvectors:0;
flashbase:0;
flashsize:0;
srambase:0;
@ -249,7 +248,6 @@ Const
(
controllertypestr:'LPC2114';
controllerunitstr:'LPC21x4';
interruptvectors:8;
flashbase:$00000000;
flashsize:$00040000;
srambase:$40000000;
@ -259,7 +257,6 @@ Const
(
controllertypestr:'LPC2124';
controllerunitstr:'LPC21x4';
interruptvectors:8;
flashbase:$00000000;
flashsize:$00040000;
srambase:$40000000;
@ -269,7 +266,6 @@ Const
(
controllertypestr:'LPC2194';
controllerunitstr:'LPC21x4';
interruptvectors:8;
flashbase:$00000000;
flashsize:$00040000;
srambase:$40000000;
@ -279,7 +275,6 @@ Const
(
controllertypestr:'LPC1754';
controllerunitstr:'LPC1754';
interruptvectors:12;
flashbase:$00000000;
flashsize:$00020000;
srambase:$10000000;
@ -289,7 +284,6 @@ Const
(
controllertypestr:'LPC1756';
controllerunitstr:'LPC1756';
interruptvectors:12;
flashbase:$00000000;
flashsize:$00040000;
srambase:$10000000;
@ -299,7 +293,6 @@ Const
(
controllertypestr:'LPC1758';
controllerunitstr:'LPC1758';
interruptvectors:12;
flashbase:$00000000;
flashsize:$00080000;
srambase:$10000000;
@ -309,7 +302,6 @@ Const
(
controllertypestr:'LPC1764';
controllerunitstr:'LPC1764';
interruptvectors:12;
flashbase:$00000000;
flashsize:$00020000;
srambase:$10000000;
@ -319,7 +311,6 @@ Const
(
controllertypestr:'LPC1766';
controllerunitstr:'LPC1766';
interruptvectors:12;
flashbase:$00000000;
flashsize:$00040000;
srambase:$10000000;
@ -329,7 +320,6 @@ Const
(
controllertypestr:'LPC1768';
controllerunitstr:'LPC1768';
interruptvectors:12;
flashbase:$00000000;
flashsize:$00080000;
srambase:$10000000;
@ -339,7 +329,6 @@ Const
(
controllertypestr:'AT91SAM7S256';
controllerunitstr:'AT91SAM7x256';
interruptvectors:8;
flashbase:$00000000;
flashsize:$00040000;
srambase:$00200000;
@ -349,7 +338,6 @@ Const
(
controllertypestr:'AT91SAM7SE256';
controllerunitstr:'AT91SAM7x256';
interruptvectors:8;
flashbase:$00000000;
flashsize:$00040000;
srambase:$00200000;
@ -359,7 +347,6 @@ Const
(
controllertypestr:'AT91SAM7X256';
controllerunitstr:'AT91SAM7x256';
interruptvectors:8;
flashbase:$00000000;
flashsize:$00040000;
srambase:$00200000;
@ -369,7 +356,6 @@ Const
(
controllertypestr:'AT91SAM7XC256';
controllerunitstr:'AT91SAM7x256';
interruptvectors:8;
flashbase:$00000000;
flashsize:$00040000;
srambase:$00200000;
@ -380,7 +366,6 @@ Const
(
controllertypestr:'STM32F103RB';
controllerunitstr:'STM32F103';
interruptvectors:12;
flashbase:$08000000;
flashsize:$00020000;
srambase:$20000000;
@ -390,7 +375,6 @@ Const
(
controllertypestr:'STM32F103RE';
controllerunitstr:'STM32F103';
interruptvectors:12;
flashbase:$08000000;
flashsize:$00080000;
srambase:$20000000;
@ -400,7 +384,6 @@ Const
(
controllertypestr:'STM32F103C4T';
controllerunitstr:'STM32F103';
interruptvectors:12;
flashbase:$08000000;
flashsize:$00004000;
srambase:$20000000;
@ -412,7 +395,6 @@ Const
(
controllertypestr:'LM3S1110';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00010000;
srambase:$20000000;
@ -422,7 +404,6 @@ Const
(
controllertypestr:'LM3S1133';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00010000;
srambase:$20000000;
@ -432,7 +413,6 @@ Const
(
controllertypestr:'LM3S1138';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00010000;
srambase:$20000000;
@ -442,7 +422,6 @@ Const
(
controllertypestr:'LM3S1150';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00010000;
srambase:$20000000;
@ -452,7 +431,6 @@ Const
(
controllertypestr:'LM3S1162';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00010000;
srambase:$20000000;
@ -462,7 +440,6 @@ Const
(
controllertypestr:'LM3S1165';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00010000;
srambase:$20000000;
@ -472,7 +449,6 @@ Const
(
controllertypestr:'LM3S1166';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00010000;
srambase:$20000000;
@ -482,7 +458,6 @@ Const
(
controllertypestr:'LM3S2110';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00010000;
srambase:$20000000;
@ -492,7 +467,6 @@ Const
(
controllertypestr:'LM3S2139';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00010000;
srambase:$20000000;
@ -502,7 +476,6 @@ Const
(
controllertypestr:'LM3S6100';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00010000;
srambase:$20000000;
@ -512,7 +485,6 @@ Const
(
controllertypestr:'LM3S6110';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00010000;
srambase:$20000000;
@ -524,7 +496,6 @@ Const
(
controllertypestr:'LM3S1601';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00020000;
srambase:$20000000;
@ -534,7 +505,6 @@ Const
(
controllertypestr:'LM3S1608';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00020000;
srambase:$20000000;
@ -544,7 +514,6 @@ Const
(
controllertypestr:'LM3S1620';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00020000;
srambase:$20000000;
@ -554,7 +523,6 @@ Const
(
controllertypestr:'LM3S1635';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00020000;
srambase:$20000000;
@ -564,7 +532,6 @@ Const
(
controllertypestr:'LM3S1636';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00020000;
srambase:$20000000;
@ -574,7 +541,6 @@ Const
(
controllertypestr:'LM3S1637';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00020000;
srambase:$20000000;
@ -584,7 +550,6 @@ Const
(
controllertypestr:'LM3S1651';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00020000;
srambase:$20000000;
@ -594,7 +559,6 @@ Const
(
controllertypestr:'LM3S2601';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00020000;
srambase:$20000000;
@ -604,7 +568,6 @@ Const
(
controllertypestr:'LM3S2608';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00020000;
srambase:$20000000;
@ -614,7 +577,6 @@ Const
(
controllertypestr:'LM3S2620';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00020000;
srambase:$20000000;
@ -624,7 +586,6 @@ Const
(
controllertypestr:'LM3S2637';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00020000;
srambase:$20000000;
@ -634,7 +595,6 @@ Const
(
controllertypestr:'LM3S2651';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00020000;
srambase:$20000000;
@ -644,7 +604,6 @@ Const
(
controllertypestr:'LM3S6610';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00020000;
srambase:$20000000;
@ -654,7 +613,6 @@ Const
(
controllertypestr:'LM3S6611';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00020000;
srambase:$20000000;
@ -664,7 +622,6 @@ Const
(
controllertypestr:'LM3S6618';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00020000;
srambase:$20000000;
@ -674,7 +631,6 @@ Const
(
controllertypestr:'LM3S6633';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00020000;
srambase:$20000000;
@ -684,7 +640,6 @@ Const
(
controllertypestr:'LM3S6637';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00020000;
srambase:$20000000;
@ -694,7 +649,6 @@ Const
(
controllertypestr:'LM3S8630';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00020000;
srambase:$20000000;
@ -706,7 +660,6 @@ Const
(
controllertypestr:'LM3S1911';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -716,7 +669,6 @@ Const
(
controllertypestr:'LM3S1918';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -726,7 +678,6 @@ Const
(
controllertypestr:'LM3S1937';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -736,7 +687,6 @@ Const
(
controllertypestr:'LM3S1958';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -746,7 +696,6 @@ Const
(
controllertypestr:'LM3S1960';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -756,7 +705,6 @@ Const
(
controllertypestr:'LM3S1968';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -766,7 +714,6 @@ Const
(
controllertypestr:'LM3S1969';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -776,7 +723,6 @@ Const
(
controllertypestr:'LM3S2911';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -786,7 +732,6 @@ Const
(
controllertypestr:'LM3S2918';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -796,7 +741,6 @@ Const
(
controllertypestr:'LM3S2919';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -806,7 +750,6 @@ Const
(
controllertypestr:'LM3S2939';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -816,7 +759,6 @@ Const
(
controllertypestr:'LM3S2948';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -826,7 +768,6 @@ Const
(
controllertypestr:'LM3S2950';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -836,7 +777,6 @@ Const
(
controllertypestr:'LM3S2965';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -846,7 +786,6 @@ Const
(
controllertypestr:'LM3S6911';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -856,7 +795,6 @@ Const
(
controllertypestr:'LM3S6918';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -866,7 +804,6 @@ Const
(
controllertypestr:'LM3S6938';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -876,7 +813,6 @@ Const
(
controllertypestr:'LM3S6950';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -886,7 +822,6 @@ Const
(
controllertypestr:'LM3S6952';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -896,7 +831,6 @@ Const
(
controllertypestr:'LM3S6965';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -906,7 +840,6 @@ Const
(
controllertypestr:'LM3S8930';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -916,7 +849,6 @@ Const
(
controllertypestr:'LM3S8933';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -926,7 +858,6 @@ Const
(
controllertypestr:'LM3S8938';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -936,7 +867,6 @@ Const
(
controllertypestr:'LM3S8962';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -946,7 +876,6 @@ Const
(
controllertypestr:'LM3S8970';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -956,7 +885,6 @@ Const
(
controllertypestr:'LM3S8971';
controllerunitstr:'LM3FURY';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -968,7 +896,6 @@ Const
(
controllertypestr:'LM3S5951';
controllerunitstr:'LM3TEMPEST';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -978,7 +905,6 @@ Const
(
controllertypestr:'LM3S5956';
controllerunitstr:'LM3TEMPEST';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -988,7 +914,6 @@ Const
(
controllertypestr:'LM3S1B21';
controllerunitstr:'LM3TEMPEST';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -998,7 +923,6 @@ Const
(
controllertypestr:'LM3S2B93';
controllerunitstr:'LM3TEMPEST';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -1008,7 +932,6 @@ Const
(
controllertypestr:'LM3S5B91';
controllerunitstr:'LM3TEMPEST';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -1018,7 +941,6 @@ Const
(
controllertypestr:'LM3S9B81';
controllerunitstr:'LM3TEMPEST';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -1028,7 +950,6 @@ Const
(
controllertypestr:'LM3S9B90';
controllerunitstr:'LM3TEMPEST';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -1038,7 +959,6 @@ Const
(
controllertypestr:'LM3S9B92';
controllerunitstr:'LM3TEMPEST';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -1048,7 +968,6 @@ Const
(
controllertypestr:'LM3S9B95';
controllerunitstr:'LM3TEMPEST';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -1058,7 +977,6 @@ Const
(
controllertypestr:'LM3S9B96';
controllerunitstr:'LM3TEMPEST';
interruptvectors:72;
flashbase:$00000000;
flashsize:$00040000;
srambase:$20000000;
@ -1069,7 +987,6 @@ Const
(
controllertypestr:'SC32442B';
controllerunitstr:'sc32442b';
interruptvectors:7;
flashbase:$00000000;
flashsize:$00000000;
srambase:$00000000;
@ -1080,7 +997,6 @@ Const
(
controllertypestr:'THUMB2_BARE';
controllerunitstr:'THUMB2_BARE';
interruptvectors:128;
flashbase:$00000000;
flashsize:$00100000;
srambase:$20000000;
@ -1135,8 +1051,8 @@ Const
{ cpu_armv7 } [CPUARM_HAS_BX,CPUARM_HAS_BLX,CPUARM_HAS_BLX_LABEL,CPUARM_HAS_CLZ,CPUARM_HAS_EDSP,CPUARM_HAS_REV,CPUARM_HAS_LDREX],
{ cpu_armv7a } [CPUARM_HAS_BX,CPUARM_HAS_BLX,CPUARM_HAS_BLX_LABEL,CPUARM_HAS_CLZ,CPUARM_HAS_EDSP,CPUARM_HAS_REV,CPUARM_HAS_LDREX],
{ cpu_armv7r } [CPUARM_HAS_BX,CPUARM_HAS_BLX,CPUARM_HAS_BLX_LABEL,CPUARM_HAS_CLZ,CPUARM_HAS_EDSP,CPUARM_HAS_REV,CPUARM_HAS_LDREX],
{ cpu_armv7m } [CPUARM_HAS_BX,CPUARM_HAS_BLX,CPUARM_HAS_BLX_LABEL,CPUARM_HAS_CLZ,CPUARM_HAS_EDSP,CPUARM_HAS_REV,CPUARM_HAS_LDREX,CPUARM_HAS_IDIV],
{ cpu_armv7em } [CPUARM_HAS_BX,CPUARM_HAS_BLX,CPUARM_HAS_BLX_LABEL,CPUARM_HAS_CLZ,CPUARM_HAS_EDSP,CPUARM_HAS_REV,CPUARM_HAS_LDREX,CPUARM_HAS_IDIV]
{ cpu_armv7m } [CPUARM_HAS_BX,CPUARM_HAS_BLX,CPUARM_HAS_CLZ,CPUARM_HAS_EDSP,CPUARM_HAS_REV,CPUARM_HAS_LDREX,CPUARM_HAS_IDIV],
{ cpu_armv7em } [CPUARM_HAS_BX,CPUARM_HAS_BLX,CPUARM_HAS_CLZ,CPUARM_HAS_EDSP,CPUARM_HAS_REV,CPUARM_HAS_LDREX,CPUARM_HAS_IDIV]
);
Implementation

View File

@ -104,7 +104,6 @@ Const
((
controllertypestr:'';
controllerunitstr:'';
interruptvectors:0;
flashbase:0;
flashsize:0;
srambase:0;
@ -115,7 +114,6 @@ Const
(
controllertypestr:'ATMEGA16';
controllerunitstr:'ATMEGA16';
interruptvectors:0;
flashbase:0;
flashsize:$4000;
srambase:0;
@ -126,7 +124,6 @@ Const
(
controllertypestr:'ATMEGA32';
controllerunitstr:'ATMEGA32';
interruptvectors:0;
flashbase:0;
flashsize:$8000;
srambase:0;
@ -137,7 +134,6 @@ Const
(
controllertypestr:'ATMEGA48';
controllerunitstr:'ATMEGA48';
interruptvectors:0;
flashbase:0;
flashsize:$1000;
srambase:0;
@ -148,7 +144,6 @@ Const
(
controllertypestr:'ATMEGA64';
controllerunitstr:'ATMEGA64';
interruptvectors:0;
flashbase:0;
flashsize:$10000;
srambase:0;
@ -159,7 +154,6 @@ Const
(
controllertypestr:'ATMEGA128';
controllerunitstr:'ATMEGA128';
interruptvectors:0;
flashbase:0;
flashsize:$20000;
srambase:0;

View File

@ -28,13 +28,6 @@
{$define USEEXCEPT}
{ If anyone wants to use interrupt for
a specific target, add a
$define FPC_HAS_SYSTEMS_INTERRUPT_TABLE
to fpcdefs.inc to reactivate
the corresponding code }
{$undef FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
{ This fake CPU is used to allow incorporation of globtype unit
into utils/ppudump without any CPU specific code PM }
{$ifdef generic_cpu}

View File

@ -267,7 +267,6 @@ interface
{ Used by ARM / AVR to differentiate between specific microcontrollers }
tcontrollerdatatype = record
controllertypestr, controllerunitstr: string[20];
interruptvectors:integer;
flashbase, flashsize, srambase, sramsize, eeprombase, eepromsize: dword;
end;

View File

@ -146,8 +146,6 @@ interface
procedure gen_fpc_dummy(list : TAsmList);
procedure InsertInterruptTable;
implementation
uses
@ -2143,89 +2141,4 @@ implementation
end;
procedure InsertInterruptTable;
procedure WriteVector(const name: string);
{$IFDEF arm}
var
ai: taicpu;
{$ENDIF arm}
begin
{$IFDEF arm}
if current_settings.cputype in [cpu_armv7m] then
current_asmdata.asmlists[al_globals].concat(tai_const.Createname(name,0))
else
begin
ai:=taicpu.op_sym(A_B,current_asmdata.RefAsmSymbol(name));
ai.is_jmp:=true;
current_asmdata.asmlists[al_globals].concat(ai);
end;
{$ENDIF arm}
end;
function GetInterruptTableLength: longint;
begin
{$if defined(ARM)}
result:=embedded_controllers[current_settings.controllertype].interruptvectors;
{$else}
result:=0;
{$endif}
end;
var
hp: tused_unit;
sym: tsym;
i, i2: longint;
interruptTable: array of tprocdef;
pd: tprocdef;
begin
SetLength(interruptTable, GetInterruptTableLength);
FillChar(interruptTable[0], length(interruptTable)*sizeof(pointer), 0);
hp:=tused_unit(usedunits.first);
while assigned(hp) do
begin
for i := 0 to hp.u.symlist.Count-1 do
begin
sym:=tsym(hp.u.symlist[i]);
if not assigned(sym) then
continue;
if sym.typ = procsym then
begin
for i2 := 0 to tprocsym(sym).ProcdefList.Count-1 do
begin
pd:=tprocdef(tprocsym(sym).ProcdefList[i2]);
if pd.interruptvector >= 0 then
begin
if pd.interruptvector > high(interruptTable) then
Internalerror(2011030602);
if interruptTable[pd.interruptvector] <> nil then
internalerror(2011030601);
interruptTable[pd.interruptvector]:=pd;
break;
end;
end;
end;
end;
hp:=tused_unit(hp.next);
end;
new_section(current_asmdata.asmlists[al_globals],sec_init,'VECTORS',sizeof(pint));
current_asmdata.asmlists[al_globals].concat(Tai_symbol.Createname_global('VECTORS',AT_DATA,0));
{$IFDEF arm}
if current_settings.cputype in [cpu_armv7m] then
current_asmdata.asmlists[al_globals].concat(tai_const.Createname('_stack_top',0)); { ARMv7-M processors have the initial stack value at address 0 }
{$ENDIF arm}
for i:=0 to high(interruptTable) do
begin
if interruptTable[i]<>nil then
writeVector(interruptTable[i].mangledname)
else
writeVector('DefaultHandler'); { Default handler name }
end;
end;
end.

View File

@ -1484,26 +1484,9 @@ begin
end;
procedure pd_interrupt(pd:tabstractprocdef);
{$ifdef FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
var v: Tconstexprint;
{$endif FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
begin
if pd.parast.symtablelevel>normal_function_level then
Message(parser_e_dont_nest_interrupt);
{$ifdef FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
if target_info.system in systems_interrupt_table then
begin
if token<>_SEMICOLON then
begin
pd.proccalloption:=pocall_interrupt;
v:=get_intconst;
Tprocdef(pd).interruptvector:=v.uvalue;
end;
end;
{$endif FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
end;
procedure pd_abstract(pd:tabstractprocdef);

View File

@ -2225,11 +2225,6 @@ type
cnodeutils.InsertResStrTablesTable;
cnodeutils.InsertMemorySizes;
{$ifdef FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
if target_info.system in systems_interrupt_table then
InsertInterruptTable;
{$endif FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
{ Insert symbol to resource info }
cnodeutils.InsertResourceInfo(resources_used);

View File

@ -638,8 +638,6 @@ interface
{$ifdef oldregvars}
regvarinfo: pregvarinfo;
{$endif oldregvars}
{ interrupt vector }
interruptvector : longint;
{ First/last assembler symbol/instruction in aasmoutput list.
Note: initialised after compiling the code for the procdef, but
not saved to/restored from ppu. Used when inserting debug info }
@ -4079,7 +4077,6 @@ implementation
{$ifdef i386}
fpu_used:=maxfpuregs;
{$endif i386}
interruptvector:=-1;
end;
@ -4125,10 +4122,6 @@ implementation
else
import_name:=nil;
import_nr:=ppufile.getword;
{$ifdef FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
if target_info.system in systems_interrupt_table then
interruptvector:=ppufile.getlongint;
{$endif FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
if (po_msgint in procoptions) then
messageinf.i:=ppufile.getlongint;
if (po_msgstr in procoptions) then
@ -4275,10 +4268,6 @@ implementation
if po_has_importname in procoptions then
ppufile.putstring(import_name^);
ppufile.putword(import_nr);
{$ifdef FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
if target_info.system in systems_interrupt_table then
ppufile.putlongint(interruptvector);
{$endif FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
if (po_msgint in procoptions) then
ppufile.putlongint(messageinf.i);
if (po_msgstr in procoptions) then

View File

@ -303,15 +303,6 @@ interface
systems_internal_sysinit = [system_i386_linux,system_i386_win32];
{$ifdef FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
{ If anyone wants to use interrupt for
a specific target, add a
$define FPC_HAS_SYSTEMS_INTERRUPT_TABLE
to fpcdefs.inc to reactivate
the corresponding code }
systems_interrupt_table = [{system_arm_embedded}];
{$endif FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
{ all systems that use garbage collection for reference-counted types }
systems_garbage_collected_managed_types = [
system_jvm_java32,