|
|||||||||||
|
Technical Support On-Line Manuals ISD51 User's Guide |
Flash BreakpointsFlash Breakpoints use IAP (In-Application Programming) to replace breakpoint instructions with CALL instructions into the ISD51 code. Flash breakpoints are supported on all devices that offer IAP and have relatively small Flash block sizes (128 bytes or less). Numerous Flash breakpoints can be enabled simultaneously. They require almost no overhead and allow programs to execute at full speed. When you set a Flash breakpoint, ISD51 modifies the code memory and inserts a CALL instruction at the breakpoint address. When the breakpoint is reached, ISD51 is invoked (by the CALL). Run-time address checking (which is what software breakpoints do) is not required. To use Flash breakpoints, you must configure ISD51 for your target MCU. There is a place in the ISD51.H header file where you may configure the Flash block size and the algorithm to program a block. CBLK_SZ specifies the flash block size in bytes. If it is 0, Flash breakpoints are not enabled. If it is non-zero, a memory buffer (named CBLK) is reserved in IDATA for a single Flash block. The CWRITE macro defines the flash erase and programming function. On entry, A contains the MSB and R0 contains the LSB of the Flash memory block to reprogram with data from the CBLK buffer. You must write the code that reprograms the Flash block. Note
Known IssuesTo perform a Flash breakpoint, ISD51 inserts a CALL instruction in the user program at the breakpoint address. This avoids extra hardware for the breakpoint logic. However, the CALL instruction occupies up to three bytes and may therefore cause side-effects when set before a label (jump target) on one-byte and two-byte CPU instructions. For example: 0100 E4 CLR A 0101 74 03 MOV A,#3 . . . . . . . . . 0110 80 ED SJMP 0101
To avoid this problem, in C applications use the disassembly window and check to see if the instruction sequence described above exists. The following C statements may cause such side-effects:
Note
| ||||||||||
|
|||||||||||