This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Illegal instruction address (TRAP B)

Hi,

My build is successfull but when running on hardware, I'm facing a Trap B interrupt. (HW is ST10F276)
I followed the http://www.keil.com/support/docs/2534.htm tutorial and found:

   tfr = 2
   illegal instruction address = 0xE083D


... but this address does not correspond to any addressable space in my linker file...
I tried to pop some bytes from the stack to know where the PC is coming from but difficult to interpret...

Any ideas ?

thanks a lot

  • Do you have any function pointers within your program? Or in any way can something be construed as a function pointer et al? The other possibility is stack corruption, IE the data on the stack got mangled by an ISR and when it poped back it jumped to an illegal address OR it allowed the function it returned to do so.

    Stephen