I was testing some code on mx233 the other day and got "SWI" string printed out on debug uart after which processor reboots.
I guessed that this means some code I linked (newlib 1.20.0) used SWI instruction for something, and ocrom caught it and rebooted processor.
To confirm this I went through ton of documents and little less code from different projects, but got almost nowhere.
This I found in mx233 technical manual:
The vector table pointing to these interrupts can be located at physical address 0x00000000 or 0xFFFF0000. The i.MX23 maps its 64-Kbyte on-chip ROM to the address 0xFFFF0000 to 0xFFFFFFFF. The core is hardwired to use the high address vector table at hard reset (core port VINITHI =1).
So, is this mapping only hardwired for hard reset or forever?
I'm still trying to find out:
- does mx233 support IVT we can set up from code (looks like mx25 and mx28 do)?
- if it does, how is it done? where is the chip register I should write 1 or 0 to so IVT is remapped to 0x00000000?
- if it doesn't, then what ocrom does with abort, undef, swi and exceptions other than irq and fiq? is there a way to handle those other exceptions?
I realize that I must have compiled newlib so that it uses swi for some of 16 (or was it 18?) syscalls we need to implement, I just don't know which one.
I have implemented them all except 3 (kill, exit and can't remember third). Linker was complaining about already defined functions.
Anyway, back to the topic, question is not about newlib, it is about IVT in mx233. Any ideas?