GP32 Taking over interrupt handlers


Squidge

Certified Guru
Joined
Nov 16, 2003
Messages
8,493
Location
UK
Website
Visit site
Just wondering if it's possible to have some of IRQ handlers (maybe even the FIQ handler) pointing to my own code instead of the GP32's BIOS code? Every other Microcontroller I've used has had the interrupt routine addresses embedded in the flash code, so they can't be changed unless the main controller is reflashed. Since the main flash in the gp32 is used for the bios, I'm wondering if the ARM processor can change the interrupt handlers on the fly, as I really don't want to keep flashing the processor just to change the interrupt vectors.
 
Well, the BIOS IRQ code points to a table in RAM, so you can hook a IRQ if you want.
But if you want to hook the IRQ exception vector you'll have to hack the FW..
I did that for the GDB stub, and it wasn't that hard, there are some unused areas in the low 32k of the FW where you can hack in some code of your own.

---
mithris
 
Multifw did patch several handlers to do the biosmon thing.. also it did patch some stuff to cooperate nicely with GDB. All in all the IRQ handler code in GP32 is pretty ok and allow you to change every handler routine via a BIOS SWI call. FIQ & trap handlers are not changeable.
 
Back
Top