📄 icelim.htm
字号:
<title>SerialICE Limitations</title><h1 align=center>SerialICE Limitations</h1><!--INDEX "SerialICE limitations" "k0 register" "k1 register" --><!--INDEX "Breakpoints in Exception handlers" -->When the target system is halted at a breakpoint, it's possible to savethe contents of most general purpose registers. However, in this scheme,the contents of two general purpose registers must besacrificed; two registers are required for use by the SerialICE Kernel codethat extracts the contents of the other general purpose registers. Theregisters chosen are k0 and k1 because those are the only two registersthat are guaranteed (by convention) to not contain useful values wheninterrupts are enabled. Users shouldkeep in mind that the contents of these registers at the time of abreakpoint are therefore not available. <p>SerialICE uses a hardware interrupt to take control of the target CPU.Since the SIO is connected to one of the CPU's interrupt request inputs,it's possible that the SerialICE Controller may be prevented from takingcontrol of the target system by masking of that interrupt.Of course, the target system software is usually written with theintention of minimizing the time during which interrupts are masked, inorder to optimize the system's realtime response.<p>However, it's possible that inadvertent errors during programdevelopment could result in prolonged or even indefinite masking ofinterrupts. That would prevent the SerialICE Controller from placing thetarget in Debug mode, so care should be taken to avoid such errors.<p>Also, it should be noted that SerialICE itself makes use of the CPU'sexception handling mechanism whenever a breakpoint occurs. Therefore,care must be taken in debugging exception handlers, to ensure that anynecessary machine state is saved before a debug exception may occur. Inparticular, the EPC (Exception Program Counter), and SR (StatusRegister) must be saved, along with any other registers which may beused by the handler.<p>In practice, this means that breakpoints or single-stepping may safelybe used within the body of an exception handler, provided it is writtenin such a way that all necessary state is saved as its initial actionon entry. However neither of these features may be used during thefirst few instructions of the handler; these must be allowed tocomplete the task of saving essential machine state to the stack. <p></dl><p><hr><b>Navigation:</b> <a href="index.htm">Document Home</a> | <a href="doctoc.htm">Document Contents</a> | <a href="docindex.htm">Document Index</a> <p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -