Simulated I/O - Epson S5U1C17001C Manual

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

Advertisement

10.6.8 Simulated i/O

The simulated I/O function of gdb allows you to evaluate the external input/output of the serial interface, etc. by
means of standard input/output (stdin, stdout) or file input/output.
input by stdin (c17 stdin command)
Set the following conditions in the c17 stdin command:
• Break address
• Input buffer address (with buffer size fixed to 65 bytes)
• Input file (when omitted, input from [Simulated I/O] window)
After setting these conditions, run the program continuously.
When an input file is specified
When the set break address is reached, gdb reads data from the specified file and places it in the buffer.
Then it resumes executing the program from the address where it left off.
Example 1: To set a data input function
(gdb) c17 stdin 1 READ_FLASH READ_BUF input.txt
Example 2: To turn the data input function off
(gdb) c17 stdin 2
When no input files are specified
When the set break address is reached, gdb opens the [Simulated I/O] window and waits for data to be
entered from the keyboard. When you enter data and press the [Enter] key, gdb writes the data entered to
the buffer and resumes executing the program from the address where it left off.
Example: To set a data input function using the [Simulated I/O] window
(gdb) c17 stdin 1 READ_FLASH READ_BUF
Output by stdout (c17 stdout command)
Set the following conditions in the c17 stdout command:
• Break address
• Output buffer address (with buffer size fixed to 65 bytes)
• Output file (when omitted, output to [Simulated I/O] window)
After setting these conditions, run the program continuously.
When an output file is specified
When the set break address is reached, gdb outputs the contents of the buffer to the specified file. Then it
resumes executing the program from the address where it left off.
Example 1: To set a data output function
(gdb) c17 stdout 1 WRITE_FLASH WRITE_BUF output.txt
Example 2: To turn the data output function off
(gdb) c17 stdout 2
When no output files are specified
When the set break address is reached, gdb opens the [Simulated I/O] window and displays the buffer
contents in that window. Then it resumes executing the program from the address where it left off.
Example: To set a data output function using the [Simulated I/O] window
(gdb) c17 stdout 1 WRITE_FLASH WRITE_BUF
S5U1C17001C ManUal
(C COMPilEr PaCkagE fOr S1C17 faMily) (Ver. 1.5.0)
EPSOn
10 DEBUggEr
10
Debugger
10-57

Advertisement

Table of Contents
loading

Table of Contents