#15835 - SmileyDude - Sat Jan 31, 2004 10:44 pm
Hello everybody,
I'm running into a problem that I haven't seen before, and I was wondering if anyone could help me out. I have an interrupt handler that works fine until I try accessing a variable defined in another file.
For example, in my main.c, I have the following:
and in my interrupt.c, I try to access it like this:
if I remove the reference to gOffset, everything works fine. With it, though, the program locks up almost immediately.
I'm sure that everything is initialised when the interrupt happens, because I don't even install the interrupt handler until the last part of my initialisation. I haven't tested this on hardware yet, only in VBA, but even if it did work on hardware, I need to be able to use VBA for debugging, etc. The main.c is compiled in Thumb, and the interrupt.c is compiled in ARM.
Any ideas?
_________________
dennis
I'm running into a problem that I haven't seen before, and I was wondering if anyone could help me out. I have an interrupt handler that works fine until I try accessing a variable defined in another file.
For example, in my main.c, I have the following:
Code: |
u16 gOffset; |
and in my interrupt.c, I try to access it like this:
Code: |
int vcount = REG_VCOUNT;
REG_BG0HOFS = vcount + gOffset; |
if I remove the reference to gOffset, everything works fine. With it, though, the program locks up almost immediately.
I'm sure that everything is initialised when the interrupt happens, because I don't even install the interrupt handler until the last part of my initialisation. I haven't tested this on hardware yet, only in VBA, but even if it did work on hardware, I need to be able to use VBA for debugging, etc. The main.c is compiled in Thumb, and the interrupt.c is compiled in ARM.
Any ideas?
_________________
dennis