2 IMPLEMENTING THE DEBUG MONITOR
(4) void m_dummy_rd( )This is a dummy read routine. It reads data from the receive buffer and clears the buffer. Return value is not necessary.
Example: m_dummy_rd( ) of "m3s_sci.s";******************************************************************************
;
;void m_dummy_rd()
;dummy read function
;******************************************************************************
.global m_dummy_rd m_dummy_rd:
xld.b | %r4,[SRDR] | ;read data |
ret |
|
|
This is a version read routine. Modifying the constant MON_VER can change the S5U1C330M2S version number. It returns MON_VER as the return value.
Example: m_ver_rd( ) of "m3s_sci.s";******************************************************************************
;
;void m_ver_rd()
;mon firmware version read function
;******************************************************************************
.global m_ver_rd m_ver_rd:
xld.w | %r10,MON_VER | ;mon firmware version |
ret |
|
|
When the above routines are newly created, create a linker command file as the following example and link "mon33.lib" to the user modules.
Example: dmt33001\dmt33001.cm ;Map set
;Library path
;Executable file
;Object files |
|
m3s_boot.o |
|
m3s_bcu.o |
|
m3s_sci.o | .... Originally created SIO routine |
;Library files |
|
string.lib |
|
ctype.lib |
|
fp.lib |
|
idiv.lib |
|
mon33.lib | .... Link "mon33.lib" that does not include SIO routine |
S1C33 FAMILY DEBUG MONITOR | EPSON | 9 |
OPERATION MANUAL |
|
|