2 IMPLEMENTING THE DEBUG MONITOR
2.2 Starting Up the Debug Monitor
The debug monitor starts by jumping to m_mon_start( ).
Normally, provide a select switch outside the S1C33 chip for selecting either starting up the debug monitor or a normal execution and create the program that can jump to m_mon_start( ) from the boot routine after an initial reset. Furthermore, start the debug monitor after initializing the BCU if necessary. In case the debug monitor is started before the BCU is initialized, downloaded data cannot be written to a
Example: boot routine of "dmt33004\m3s_boot.s"
;******************************************************************************
;
;BOOT program
;******************************************************************************
BOOT:
xld.w %r0,0x800
| ld.w | %sp,%r0 |
|
; | xld.w | %r5,BCU_A10_ADDR | |
; | xld.w | %r4,0b0000000000010010 | ;Device 16 bits,delay 1.5, wait 2 |
; | ld.h | [%r5]+,%r4 |
|
; | xld.w | %r5,BCU_A8_ADDR | ;area8 |
; | xld.w | %r4,0b0000000000010010 | ;Device 16 bits,delay 1.5, wait 2 |
; | ld.h | [%r5]+,%r4 |
|
; | xld.w | %r5,BCU_A5_A6_ADDR | |
; | xld.w | %r4,0b0001001000010010 | ;Device 16 bits,delay 1.5, wait 2 |
; | ld.h | [%r5]+,%r4 |
|
| xbtst | [K6XD],0x3 | ;K63 (debug SW check) 0:MON33 1:USER |
| xjreq | m_mon_start | ;MON33 start |
| jp | USER |
|
USER: |
|
|
|
| xld.w | %r4,TBRP |
|
| xld.w | %r6,0x59 |
|
| xld.b | [%r4],%r6 | ;TTBR writable 0x59 |
| xld.w | %r4,TTBR |
|
| xld.w | %r6,0x200000 |
|
| ld.w | [%r4],%r6 | ;TTBR set 0x200000 |
| ld.w | %r4,[%r6] |
|
| jp | %r4 | ;user application(flash) start |
S1C33 FAMILY DEBUG MONITOR | EPSON | 5 |
OPERATION MANUAL |
|
|