Epson S5U1C17001C Manual page 538

Cmos 16-bit single chip microcomputer, c compiler package for s1c17 family
Hide thumbs Also See for S5U1C17001C:
Table of Contents

Advertisement

10 DEBUggEr
#define SP_INI
0x1000
.global ext_test
ext_test:
ld.a
Xld.a
ld.a
ld.a
ld.a
ld.a
ld.a
add.a
ld
ld
ld
ld
ld
ld
sub.a
ld
ld
Xcall
add.a
ld.a
ld.a
ld.a
ld.a
ld.a
ld.a
jpa
User function
#include "stdio.h"
void *iprint_data( long arg1, long arg2, long arg3 );
struct {
long size;
char buf[0x100];
} tmpbuf;
void *iprint_data( long arg1, long arg2, long arg3 )
{
tmpbuf.size = sprintf(tmpbuf.buf,"arg1=%d,arg2=%d,arg3=%d",arg1,arg2,arg3);
return (void*)&tmpbuf;
}
Notes
If any function without an entry program is called, gdb may run uncontrollably.
10-88
%r7, %sp
%r2, SP_INI
%sp, %r2
-[%sp], %r7
-[%sp], %r1
-[%sp], %r0
%r6, %r0
%r6, 0x0c
%r0, [%r6]+
%r1, [%r6]+
%r2, [%r6]+
%r3, [%r6]+
%r5, [%r6]+
%r4, [%r6]+
%sp, 4
[%sp+0x0], %r5
[%sp+0x2], %r4
iprint_data
%sp, 4
%r6, %r0
%r0, [%sp]+
[%r0], %r6
%r1, [%sp]+
%r7, [%sp]+
%sp, %r7
%r1
;
; set SP
; save SP
; save return address
; save debug ram start address
; %r0 : debug ram start address = ****28
; Set Arg1
; Set Arg2
; Set Arg3
; enter C program
; return = %r0: message buffer address
;
; restore debug ram start address
; set %r0 ( message address ) to WBUF data1
; restore return address
; restore SP
; back to mini monitor
EPSOn
(C COMPilEr PaCkagE fOr S1C17 faMily) (Ver. 1.5.0)
S5U1C17001C ManUal

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the S5U1C17001C and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents