Subversion Repositories svn.mios


Blame | Last modification | View Log | RSS feed

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1">
<TITLE>Debug Functions</TITLE>
<LINK REL="stylesheet" TYPE="text/css" HREF="standard.css">
<BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000066" alink="#0000ff">
<CENTER><H1>Debug Functions</H1></CENTER>
The Debug Functions tab provides a graphical front-end to 'Command 0D' of the MIOS SysEx Implementation. It is split into three sections: Function Builder, SRAM Read and SRAM Write.
<p><img src="images/debug_functions.png">

<p>The MIOS Debug Interface consists of two tabs, the LCD Message tab and the Debug functions tab. Common to both are the Device ID and BankStick No spin boxes and the Hex/Dec view switch.
<p><img src="images/debug_common.png">

<p>The Hex/Dec view switch will toggle between Hexadecimal (Base16) and Decimal (Base10) views for number input and display.

<p>NOTE: When in Decimal view, Hex numbers can still be inputted by prefixing the numbers with either '0x' or '#':
<p><img src="images/debug_base.png">

<H2>Function Builder</H2>
The Fuction Builder allows MIOS functions to be remotely called using the debug-command 01. On startup, the file from the MIOS source code is parsed and all available functions loaded into a drop down list in the Function Builder table:
<p><img src="images/debug_functions_dropdown.png">

<p>The Function Builder table allows a number of fuctions to be strung together and grows in size as more rows are added. The WREG, MIOS_PARAM1, MIOS_PARAM2 and MIOS_PARAM3 columns allow parameters for each function to be specified. The format for specifying parameters for each function can be looked up by highlighting the appropriate row, and pressing the help button:
<p><img src="images/debug_functions_help.png">

<p>Rows can be re-ordered by using the up and down arrow buttons, or by highlighting the required rows and 'dragging and dropping'. Drag n Drop also works between the Function Builder table and external programs such as a text editor or web browser. This allows for programmers to save command strings in a comma delimited format, or share with others when trying to debug or troubleshoot problems:
        <td valign="top"><img src="images/debug_functions_drag.png"></td>
        <td valign="top"><img src="images/debug_functions_drop.png"></td>
        <td valign="top"><img src="images/debug_functions_import.png"></td>

<p>Pressing the "Start" button will send the MIOS Debug functions from the Function Builder table, ordered from top to bottom with a delay in between each message as specified in the "Delay" spinbox. Return values will be displayed in the "Return Values" text area.

<H2>SRAM Read</H2>
<p>The SRAM Read facility allows the SRAM memory to be read using the debug-command 02. The byte address to start reading from is inputted in the Address field, and the number of bytes to read in the No. Bytes field. After pressing the "Start" button, the returned memory dump will be displayed in the "Return Values" text area.
<p><img src="images/debug_sram_read.png">

<H2>SRAM Write</H2>
<p>The SRAM Write facility allows the SRAM memory to be written to using the debug-command 03. The byte address to write to is inputted in the Address field, and the data to write to memory in the Data field (only one value can be written at a time). Pressing the "Start" button will send the data to be written and if successfull, a write acknowledge message will be returned and displayed in the "Return Values" text area.
<p><img src="images/debug_sram_write.png">