|
Unused interruptsNext Thread | Thread List | Previous Thread Start a Thread | Settings | Details | Message |
|---|
Read-Only Author Walt Conley Posted 12-Jul-2002 15:57 Toolset C166 |  Unused interrupts Walt Conley Hello:
Here are a couple knowledge base articles on the subject. I will have about 100 unused interrupt vectors.
The first article creates a different ISR for each unused interrupt and calls a common fault handling function. This generates way too much code for me.
The second article seems like what I want but I'm not sure because I cannot get it to assemble. I get a syntax error when it sees the macro definition. I did try something very similar. I have an assembly file that ORGs a JMPS instruction to the location of each unused vector, skipping the ones I use. This reserves a contiguous block of memory from my first JMPS to the last one including the ones I skip, so I get a memory overlap error for each vector I am using.
http://www.keil.com/support/docs/216.htm
http://www.keil.com/support/docs/941.htm
Does anyone have a neat way you have figured out to do this that you can share with me.
Any help would be appreciated, Walt | | Read-Only Author Mike Kleshov Posted 12-Jul-2002 17:41 Toolset C166 |  RE: Unused interrupts Mike Kleshov Just an idea: drop the automatically generated interrupt vector table and build your own one. Use the macro processor to generate the necessary assembly code using a list of ISRs kept in an include file. I never had to use the macro processor, but having seen some Keil's assembly code I got the impression that it's much more powerful than the C preprocessor. For example, this is how the interrupt vector table is generated in Monitor166 source code:
%SET(COUNT,4) ; SET UP INTERRUPT TABLE
%WHILE(%COUNT LE 01FCH)
(%IF (%COUNT EQ (%BRK_T_ADR*4)) THEN (JMP FAR BRKP
) ELSE (%IF (%COUNT EQ (2BH*4)) THEN (JMP FAR SER_ISR
) ELSE (JMPS INT_ADR_SEG,INT_ADR_OFF + %COUNT ) FI ) FI
%SET(COUNT,%COUNT + 4)
)
- Mike
| | Read-Only Author Jon Ward Posted 14-Jul-2002 12:43 Toolset C166 |  RE: Unused interrupts Jon Ward Make sure that you use MACRO(MPL) to assemble this file.
Jon | | Read-Only Author Keil Support Intl. Posted 15-Jul-2002 06:20 Toolset C166 |  RE: Unused interrupts Keil Support Intl. Since C166 Version 4.10 the Linker supports the fill option in the INTNO directive.
Take a look to the Release Notes (http://www.keil.com/update/_c166/c166v422.htm).
The syntax for the L166 directive is:
INTNO (interrupt_name (FILL))
| | Read-Only Author Walt Conley Posted 15-Jul-2002 07:33 Toolset C166 |  RE: Unused interrupts Walt Conley Thanks for all the replies guys. Looking at the release notes, it appears that INTNO (interrupt_name (FILL)) will do the trick.
Jon: Is it possible for someone to put a reference to this command in the knowledge base articles I sited in the original post.
-Walt | | Read-Only Author Walt Conley Posted 16-Jul-2002 14:47 Toolset C166 |  RE: Unused interrupts Walt Conley Yep, works great!!! Hopefully Keil will update the links I referenced so the next guy does not spend a day and a half on this as I have done.
-Walt | |
Next Thread | Thread List | Previous Thread Start a Thread | Settings |
|