We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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
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) )