Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/19/03 02:04
Read: times


 
#41827 - RE: Over Run Interrupt Memory space Using C
Responding to: ???'s previous message
"I am sure there is some variant for this in the C language"

The 'C' language itself has no provision for the peculiarities of the processor-specifics of interrupt handling.
However, any Compiler targetted at embedded applications will need to make such provisions - so these will have to be via Compiler-specific extensions to the language. Invariably, these will be non-portable.
For details, you will have to read the Manual for your particular compiler.

Keil C51 achieves this with the interrupt n keyword extension - which tells the Compiler both that this is an ISR (so it must use RETI, etc), and which vector location it uses.

"So the final answer is: no compiler that I am aware of will automatically compensate for your vector addresses, it is up to you to know that your routine will overrun its boundaries and compensate for that yourself."

The Keil tools will only fix code in the vector space if it is specifically for an ISR - see above.
The Keil Linker will warn you if you have any overlaps. So, as long as you heed the warnings, you're safe!


List of 8 messages in thread
TopicAuthorDate
Over Run Interrupt Memory space Using C            01/01/70 00:00      
   RE: Over Run Interrupt Memory space Using C            01/01/70 00:00      
      RE: Over Run Interrupt Memory space Using C            01/01/70 00:00      
         RE: Over Run Interrupt Memory space Using C            01/01/70 00:00      
   RE: Over Run Interrupt Memory space Using C            01/01/70 00:00      
      RE: Over Run Interrupt Memory space Using C            01/01/70 00:00      
   RE: Over Run Interrupt Memory space Using C            01/01/70 00:00      
      RE: Over Run Interrupt Memory space Using C            01/01/70 00:00      

Back to Subject List