4) void m_dummy_rd( ), 5) void m_ver_rd( ), 6) sample command file for building – Epson S1C33 User Manual
Page 15

2 IMPLEMENTING THE DEBUG MONITOR
S1C33 FAMILY DEBUG MONITOR
EPSON
OPERATION MANUAL
9
(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
(5) void m_ver_rd( )
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
(6) Sample command file for building
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
-code 0x0c00000
; set relative code section start address
-bss 0x081f640
; set relative bss section start address
;Library path
-l c:\CC33\lib
-l ..\lib
;Executable file
-o dmt33001.srf
;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