s5u1c33000c Epson Electronics America, Inc., s5u1c33000c Datasheet - Page 342

no-image

s5u1c33000c

Manufacturer Part Number
s5u1c33000c
Description
Cmos 32-bit Single Chip Microcomputer S5u1c33000c Manual
Manufacturer
Epson Electronics America, Inc.
Datasheet
CHAPTER 16: DEBUGGER
Program definitions for simulated I/O
Precautions
326
Before the simulated I/O function described above can be used, you must write the following definitions in
the program.
Input/output buffer definition
Define the global buffers used by the db33 to input or output data in the following format:
Input buffer definition: unsigned char READ_BUF[65]
Output buffer definition: unsigned char WRITE_BUF[65]
For these buffer names, you can use any desired name that conforms to symbol name designations. Fix the
buffer size to 65 bytes. When executing the stdin and stdout commands, use this symbol name to specify a
buffer address.
When data is input, the size (1 to 64) of the actually input data is placed in READ_BUF[0]. If EOF is input,
READ_BUF[0] is set to 0. The input data is stored in READ_BUF[1] and following elements.
When outputting data, write the size of the output data (1 to 64) to WRITE_BUF[0], and the output data to
WRITE_BUF[1] and following elements. To output EOF, write 0 to WRITE_BUF[0].
Thus, a data stream of up to 64 bytes can be input and output between the db33 and the program.
Data updating global label definition
Define the global labels shown below at a position where data is fed into the input buffer by the db33 and a
position where data is output from the output buffer.
Input position:
Output position: .global WRITE_FLASH
For these labels, you can use any desired name. When executing the stdin and stdout commands, use this
symbol name to specify the break address.
In the C source, define these labels in the lower-level functions "write" and "read" (see Section 8.4) of the
standard I/O library function.
For actual examples, refer to the sample programs and debugger command files installed in the
sample\simio\ directory.
When a break occurs at the READ_FLASH label, the db33 reads data that input to the [Simulated I/O]
window or the file and load it to the defined input buffer. Then the db33 resume executing the program.
When a break occurs at the WRITE_FLASH label, the db33 output data that stored in the output buffer to
the [Simulated I/O] window or the file, then resume executing the program.
Make sure the break addresses specified by the stdin and stdout commands do not overlap the software
break addresses.
Since software breaks are used for this purpose inside the chip, the ROM area of the target board cannot be
specified.
Use only ASCII characters for input and output. If binary data (0x0 and 0x1a in particular) is used, the db33
may operate erratically.
The part of the program to input/output data by stdin and/or stdout should be successively executed using
the go command. Do not execute it by single-stepping and make sure that no break occurs in or around the
part.
When those stdin and/or stdout are using in ICE or ICD mode. Without on-the-fly by md command (setting
'0') makes display faster. When using on-the-fly by md command, setting '10' makes faster display than
default setting value '5'.
.global READ_FLASH
READ_FLASH:
WRITE_FLASH:
EPSON
(C COMPILER PACKAGE FOR S1C33 FAMILY) (Ver. 4)
(.comm READ_BUF 65)
(.comm WRITE_BUF 65)
S5U1C33000C MANUAL

Related parts for s5u1c33000c