Hi,
I think I’ve found a explanation of the error that occur in oc-console. I found this piece of text in the HCS12 manual.
Redirected Interrupt Vectors
The interrupt vectors of the HCS12 are located at the end of the
64KB memory address range, which falls within the protected monitor code space. Therefore, the application program can not modify the interrupt vectors directly. To provide an alternative way, the monitor redirects all vectors (except the reset vector) to RAM. The procedure is similar to how the HC11 behaved in Special Bootstrap Mode.
The application program can set the required interrupt vectors during runtime (before global interrupt enable!) by placing a jump instruction into the RAM pseudo vector. The following example shows the steps to utilizy the IRQ interrupt:
For a C program, the following sequence could be used:
// install IRQ pseudo vector in RAM
// (if running with TwinPEEKs monitor)
*((unsigned char *)0x3fee) = 0x06; // JMP opcode
*((void (**)(void))0x3fef) = isrFunc;
I implemented the C – code of this example in my main.c but it didn’t compile. I think the example code isn’t for codewarrior but for ICC12.
How do I translate it into codewarrior code? Or is there another way to solve this problem?
Greetings dan23