How to check the size of each interrupt vector entry?

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm trying to write code that does some manipulation of interrupt vectors. What preprocessor macros can I use to check if my vector table uses 16 bit RJMPs (like ATtinys) or 32 bit JMPs (like ATmega2560)?

 

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Haven't had AS up in a while but Isn't that information in the list file?

Happy Trails,

Mike

JaxCoder.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mike32217 wrote:

the list file

 

I want it as a preprocessor macro, so I can code both behaviours into the same code.

 

Would it be reliable to check if FLASHEND is larger than what can be targeted by 12 bits?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Heh.  I had recently started a similar discussion.   https://www.avrfreaks.net/forum/i...

Short answer: use the __AVR_HAVE_JMP_CALL__ symbol defined by the compiler.