Input and output file, File control commands – Freescale Semiconductor Microcontrollers User Manual

Page 127

Advertising
background image

Debugger Components

General Debugger Components

127

Microcontrollers Debugger Manual

You can simply choose one of the default configurations in the Default Configuration
combo box. In the Connections section all active connections are listed in a list box.
There you can customize input to output device redirection by adding and removing
connections.

To add a connection specify the source and target devices using the From and To combo
boxes and then press the Add button. The new connection then appears in the list below,
which shows all active connections.

To remove connections, select them in the list of active connections and press the Remove
button.

In the Serial Port section you can specify which serial port to use and its properties. This
is only possible if there is at least one connection from or to the serial port.

If you select a connection from or to the virtual SCI port you can also specify which ports
to take as virtual SCI ports in the Virtual SCI section. This enables you to make a
connection to any port in the FCS framework.

Input and Output File

It is also possible to take a file as an input stream for the terminal component or redirect
the output to a file.

To use a file as an input stream, make sure that there exists at least one connection from
the input file to any output device. Then you can open an input file by simply choosing
Input File from the context menu. As soon as you press the OK button in the File Open
dialog, input from the file starts. The file closes as soon as the end of file is reached or you
choose Close Input File from the context menu.

When the input file has reached its end, it sends a CTRL-Z character (ASCII code 26
decimal) to all output devices receiving characters from the input file to notify them that
the file transfer has been finished.

If you want to redirect some input devices to an output file, you have to proceed similarly.
Make sure that you have chosen your connections from input devices to the output file.
Then you can open or create your output file by choosing Output File from the context
menu. If the file does not exist it is created. Otherwise you can choose to overwrite or
append the existing file. To stop writing to the output file you can choose Close Output
File
from the context menu.

File Control Commands

It is also possible to open and close input and output files through special Escape
sequences in the data stream from serial port or virtual SCI.

Table 3.37

illustrates the

different possible commands and associated Escape sequences where filename is a
sequence of characters terminated by a control character (e.g. CR) and is a valid filename.

Advertising