<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>failure to compile an interrupt handler</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/38979/failure-to-compile-an-interrupt-handler</link><description> 
Hello, 
I am stuck with handling interrupts on lpc3180 uC.I have the
following interrupt routine: 

 
void IRQ_Handler (void) __irq {
 MSTIM_INT = MSTIM_INT | 2;
 PIO_OUTP_SET | = 4;
 MSTIM_CTRL = MSTIM_CTRL | 1;
 }
 

 
and the following modifications</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: failure to compile an interrupt handler</title><link>https://community.arm.com/thread/147643?ContentTypeID=1</link><pubDate>Mon, 20 Sep 2010 14:27:03 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:6e9ac125-2e40-414e-a690-e48436913a39</guid><dc:creator>Roman Kozlechkov</dc:creator><description>&lt;p&gt;&lt;p&gt;
Just found out, that after deleting the excessive line in the
vector table code it actually did work OK, it is just my poor
debugging skills and extremely bad mood, that prevented me from
realising that, so, I beg your pardon for wasting your time! And the
working variant of the interrupt vector table code is as
follows:&lt;/p&gt;

&lt;pre&gt;
Vectors         LDR     PC,Reset_Addr
                LDR     PC,Undef_Addr
                LDR     PC,SWI_Addr
                LDR     PC,PAbt_Addr
                LDR     PC,DAbt_Addr
                DCD     ||Image$$ER_IROM1$$RO$$Length|| + ||Image$$RW_IRAM1$$RW$$Length||
                DCD     0x4000 ;PHYTEC comment: This hard codes the size
                                                           ;that the secondary bootloader uses to copy
                                                           ;binary software to SDRAM.

                LDR     PC,IRQ_Addr
                LDR     PC,FIQ_Addr

Reset_Addr      DCD     Reset_Handler
Undef_Addr      DCD     Undef_Handler
SWI_Addr        DCD     SWI_Handler
PAbt_Addr       DCD     PAbt_Handler
DAbt_Addr       DCD     DAbt_Handler
                DCD     0               ; Reserved Address
IRQ_Addr        DCD     IRQ_Handler
FIQ_Addr        DCD     FIQ_Handler

Undef_Handler   B       Undef_Handler
SWI_Handler     B       SWI_Handler
PAbt_Handler    B       PAbt_Handler
DAbt_Handler    B       DAbt_Handler
;IRQ_Handler     B       IRQ_Handler
FIQ_Handler     B       FIQ_Handler
                IMPORT  IRQ_Handler
&lt;/pre&gt;

&lt;p&gt;
Once again, excuse me for wrong information and thanks to
everyone, who helped to solve the problem!&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: failure to compile an interrupt handler</title><link>https://community.arm.com/thread/146603?ContentTypeID=1</link><pubDate>Sun, 19 Sep 2010 23:06:20 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:3d437efc-6d11-419e-9385-2066ce5394de</guid><dc:creator>Dragi Pandeliev</dc:creator><description>&lt;p&gt;&lt;p&gt;
What does it do when the first interrupt comes? Where does it go?
Can you show how your interrupt table looks now?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: failure to compile an interrupt handler</title><link>https://community.arm.com/thread/144964?ContentTypeID=1</link><pubDate>Fri, 17 Sep 2010 12:49:26 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a64d1a26-9226-4870-b0df-771b34e3cb5f</guid><dc:creator>Roman Kozlechkov</dc:creator><description>&lt;p&gt;&lt;p&gt;
Got the code compiled, but the program gets stuck. When the first
interrupt comes, it fails jumping to interrupt service routine.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: failure to compile an interrupt handler</title><link>https://community.arm.com/thread/142713?ContentTypeID=1</link><pubDate>Fri, 17 Sep 2010 01:30:54 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:2ff97b19-47e7-4354-a931-e6eeada7fb6d</guid><dc:creator>John Linq</dc:creator><description>&lt;p&gt;&lt;p&gt;
My Lag.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: failure to compile an interrupt handler</title><link>https://community.arm.com/thread/139682?ContentTypeID=1</link><pubDate>Fri, 17 Sep 2010 01:21:58 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:309e5aef-f0e5-4e90-8a3b-25ae70aff21e</guid><dc:creator>John Linq</dc:creator><description>&lt;p&gt;&lt;p&gt;
I tried this, it can NOT be compiled.&lt;/p&gt;

&lt;p&gt;
In LPC3000.s&lt;/p&gt;

&lt;pre&gt;
Undef_Handler   B       Undef_Handler
SWI_Handler     B       SWI_Handler
PAbt_Handler    B       PAbt_Handler
DAbt_Handler    B       DAbt_Handler
;IRQ_Handler     B       IRQ_Handler
&lt;b&gt;IMPORT          IRQ_Handler&lt;/b&gt;
FIQ_Handler     B       FIQ_Handler
&lt;/pre&gt;

&lt;p&gt;
And the error message is:&lt;br /&gt;
LPC3000.s(664): error: A1163E: Unknown opcode IRQ_Handler , expecting
opcode or Macro&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: failure to compile an interrupt handler</title><link>https://community.arm.com/thread/142712?ContentTypeID=1</link><pubDate>Fri, 17 Sep 2010 01:18:16 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:f108039b-f32d-41c1-9f52-3a9c2e7d8a36</guid><dc:creator>Cactus Burp</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;quot;Smells like an excessive space in the line that causes the
error. Align it with the ones above it to be sure.&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Can&amp;#39;t remember ever writing this, but glad my advice helped.&lt;/p&gt;

&lt;p&gt;
Burp.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: failure to compile an interrupt handler</title><link>https://community.arm.com/thread/139691?ContentTypeID=1</link><pubDate>Fri, 17 Sep 2010 01:11:40 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:5b165a9e-a58d-4df0-8bcf-daa7ade585e4</guid><dc:creator>Roman Kozlechkov</dc:creator><description>&lt;p&gt;&lt;p&gt;
Many thanks! It really works, I have to admit, my suggestion, that
the reason of failure cannot be connected with alignment of the lines
was totally wrong.From now I will keep this in mind.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: failure to compile an interrupt handler</title><link>https://community.arm.com/thread/136277?ContentTypeID=1</link><pubDate>Thu, 16 Sep 2010 18:34:47 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:cf6d13b6-8131-47b7-8e5e-532d01de8e4f</guid><dc:creator>John Linq</dc:creator><description>&lt;p&gt;&lt;p&gt;
Sorry for my mistake. Please ignore my previous post, it is
wrong.&lt;/p&gt;

&lt;p&gt;
I tried this, it can be compiled.&lt;/p&gt;

&lt;p&gt;
In LPC3000.s&lt;/p&gt;

&lt;pre&gt;
Undef_Handler   B       Undef_Handler
SWI_Handler     B       SWI_Handler
PAbt_Handler    B       PAbt_Handler
DAbt_Handler    B       DAbt_Handler
;IRQ_Handler     B       IRQ_Handler
                &lt;b&gt;IMPORT IRQ_Handler&lt;/b&gt;
FIQ_Handler     B       FIQ_Handler
&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: failure to compile an interrupt handler</title><link>https://community.arm.com/thread/126391?ContentTypeID=1</link><pubDate>Thu, 16 Sep 2010 18:20:12 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:833a2e52-a4cf-4fe7-a6f9-d3fd9cb94201</guid><dc:creator>John Linq</dc:creator><description>&lt;p&gt;&lt;p&gt;
In LPC3000.s&lt;/p&gt;

&lt;pre&gt;
Vectors         LDR     PC,Reset_Addr
                LDR     PC,Undef_Addr
                LDR     PC,SWI_Addr
                LDR     PC,PAbt_Addr
                LDR     PC,DAbt_Addr
                IF      :DEF:__EVAL
                  DCD   0x4000
                ELSE
                  DCD   ||Image$$ER_ROM1$$RO$$Length||+\ 
                        ||Image$$RW_RAM1$$RW$$Length||
                ENDIF
                &lt;b&gt;LDR     PC,IRQ_Addr     &lt;/b&gt;
                LDR     PC,FIQ_Addr

Reset_Addr      DCD     Reset_Handler
Undef_Addr      DCD     Undef_Handler
SWI_Addr        DCD     SWI_Handler
PAbt_Addr       DCD     PAbt_Handler
DAbt_Addr       DCD     DAbt_Handler
                DCD     0               ; Reserved Address
&lt;b&gt;IRQ_Addr        DCD     IRQ_Handler&lt;/b&gt;
FIQ_Addr        DCD     FIQ_Handler

Undef_Handler   B       Undef_Handler
SWI_Handler     B       SWI_Handler
PAbt_Handler    B       PAbt_Handler
DAbt_Handler    B       DAbt_Handler
&lt;b&gt;IRQ_Handler     B       IRQ_Handler&lt;/b&gt;
FIQ_Handler     B       FIQ_Handler
&lt;/pre&gt;

&lt;p&gt;
So, I think/guess that, only modifying&lt;br /&gt;
&lt;i&gt;[IRQ_Handler B IRQ_Handler]&lt;/i&gt;&lt;br /&gt;
is not enough.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: failure to compile an interrupt handler</title><link>https://community.arm.com/thread/116016?ContentTypeID=1</link><pubDate>Thu, 16 Sep 2010 12:45:42 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:bf5d2642-dceb-47a6-9a0f-8a6455bd5f60</guid><dc:creator>CACTUS BURP</dc:creator><description>&lt;p&gt;&lt;p&gt;
If that is the case, then it a simple matter of mistaken identity
and I really should offer you my sincerest appologies.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: failure to compile an interrupt handler</title><link>https://community.arm.com/thread/104261?ContentTypeID=1</link><pubDate>Thu, 16 Sep 2010 12:15:32 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ee38c6fd-5a7b-46ca-ad4b-f87832a66811</guid><dc:creator>Tamiryan Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
Look, buddy, I don&amp;#39;t feel like replying to you but I will deviate
from my general guideline not to confront assholes and do so once -
and never again:&lt;br /&gt;
1. Why are you hiding behind a monikers? Have an identity
complex?&lt;br /&gt;
2. I&amp;#39;m not related to the poster above.&lt;br /&gt;
3. I don&amp;#39;t care what you say, think, do or whatever so spare me and
the rest - they are even less interested.&lt;br /&gt;
4. There are doctors that treat people like you. You should get
yourself tested/checked/admitted/put away.&lt;br /&gt;
5. Burp.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: failure to compile an interrupt handler</title><link>https://community.arm.com/thread/78646?ContentTypeID=1</link><pubDate>Thu, 16 Sep 2010 12:04:43 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:813c5a2a-81e5-48c7-93b1-9a41ec8f7e96</guid><dc:creator>CACTUS BURP</dc:creator><description>&lt;p&gt;&lt;p&gt;
Tamir probably has a strong desire to assist you.&lt;/p&gt;

&lt;p&gt;
Burp.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: failure to compile an interrupt handler</title><link>https://community.arm.com/thread/78651?ContentTypeID=1</link><pubDate>Thu, 16 Sep 2010 11:00:29 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c61ae6e8-5ee5-4375-8751-8257db48761f</guid><dc:creator>Roman Kozlechkov</dc:creator><description>&lt;p&gt;&lt;p&gt;
Just tried, does not change anything, I am afraid there is a more
fundamental problem (some definition is missing or something like
that), but, being quite novice to ARM programming, I have no idea,
which one :(((&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: failure to compile an interrupt handler</title><link>https://community.arm.com/thread/58664?ContentTypeID=1</link><pubDate>Thu, 16 Sep 2010 06:14:20 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:10e86439-14bf-48e9-8769-1a6bb4d0df5a</guid><dc:creator>CACTUS BURP</dc:creator><description>&lt;p&gt;&lt;p&gt;
Smells like an excessive space in the line that causes the error.
Align it with the ones above it to be sure.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>