ARM Technical Support Knowledge Articles

DETECTING UNUSED INTERRUPTS

Applies to: A166 Macro Assembler

Answer


Information in this article applies to:


QUESTION

How can I detect unused interrupts in my assembly programs?

ANSWER

There are a number of ways to do detect unused interrupts.

One method involves creating an UnusedInterrupt function and placing a call to that function in each unused interrupt vector. The following code illustrates this idea. Note that you must create the UnusedInterrupt function to use this example.

%*DEFINE   (VECTORX  (intfunction)) (
            EXTERN %intfunction:NEAR
            JMP    %intfunction
)

INTERRUPT_VECTORS SECTION       CODE PUBLIC 'VECTORS'
TABLE                           PROC NEAR
; Trap
        ORG              0h             ;
        %VECTORX (?C_STARTUP)           ; 0x00 RESET (4 bytes)
        ORG              8h             ;
        %VECTORX (UnusedInterrupt)      ; 0x02 NMITRAP Non-maskable int (4 bytes)
        ORG              10h            ;
        %VECTORX (UnusedInterrupt)      ; 0x04 STOTRAP Stack overflow
        ORG              18h            ;
        %VECTORX (UnusedInterrupt)      ; 0x06 STUTRAP Stack underflow
        ORG              20h            ;
        %VECTORX (UnusedInterrupt)      ; 0x08 V_INT_UNKNOWN Not supported (a gap)
        ORG              28h            ;
        %VECTORX (UnusedInterrupt)      ; 0x0A BTRAP HW Traps Flags
        ORG              2Ch            ;
        %VECTORX (UnusedInterrupt)      ; 0x0B RESERVED_0 Do not use
        ORG              30h
;
TABLE                           ENDP
INTERRUPT_VECTORS               ENDS
END

Article last edited on: 2004-06-10 15:25:41

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential