DUMP addr size
Dumps "size" bytes of data beginning at the specified address expression. Data is displayed in both hex and ASCII. If "size" is not specified,
DUMP addr
then the size is the same as that of the previous dump. The dump size is initially set to 128 bytes.
If no address is specified, the next block after the previous dump is displayed.
"D" is an abbreviation of "DUMP". The F2 function key is equivalent to "DUMP" with no parameters.
EDIT {addr} {%type} {val} {val2} {val...}
This command allows the user to examine and/or change memory locations or program variables in a variety of formats.
If an address expression is specified on the command line, that address will be opened. Thus
EDIT 1000
will open the Edit Memory dialog beginning at address 1000.
If no address is specified, then the last opened address will be reopened. After completion of the previous example, entering
EDIT
will open the Edit Memory dialog beginning at address 1000. If one or more data values, separated by spaces, are specified on the command line, those values will be written to the one or more successive bytes beginning at the specified address, and the dialog will not be opened:
EDIT 1000 55 66 77
will store the value 55 at address 1000, the value 66 at address 1001, and 77 at the address 1002. In this case, the original contents of the locations will not be shown, and control will return to the NoICE command prompt. This form of the command is primarily useful when issued from command files, but may be used at any time.
If the address specified has a data type, then display and entry will be done using that data type. For example, if "retry" is DEFINEd as a 16 bit signed integer, then
EDIT retry
will display the value of the 16 bit word at address "retry" as an integer, and accept entry of a new value as a 16 bit integer. Structures and arrays may also be edited. See DEFTYPE and subsequent commands for more information about data types.
The default data type may be overridden by specifying a data type name preceded by "%". For example,
EDIT 1000 %S16
will display the contents of the 16 bit word at address 1000 as a integer, and accept entry of a new value as a 16 bit integer.
"E" is an abbreviation of "EDIT".
This command is a shortcut to specify an address in the Memory tab of the lower window. The command
MEM addr
will make the Memory Window visible, and display the contents of memory beginning at the specified address expression. Data is displayed in both hex and ASCII, and either format can be edited by clicking on the appropriate location. You can also use the Tab and Shift-Tab keys to move between the hex and ASCII fields.
"M" is an abbreviation of "MEM".
This command allows the user to disassemble a program in target memory. To view the source code for a program, refer to the SOURCE command.
To begin disassembly at address expression "addr", enter
DISASSEMBLE addr
To continue disassembly at the instruction after the last one shown in the source window, enter
DISASSEMBLE
"U" (for "unassemble", since "D" is used for "DUMP) is an abbreviation of "DISASSEMBLE"..
LOAD file {load offset}
This command writes the contents of a disk-resident file to target memory. NoICE supports
In addition to directly LOADing these formats, NoICE includes utility programs that can convert a variety of formats into information suitable for symbolic and source-level debugging with NoICE.
Except for binary files, NoICE automatically determines the file type based on the data in the file.
For hex files, an optional load offset can specify an address expression to be added to 16 bit addresses within the load file. Data is written to the target locations specified by the effective address. Thus
LOAD file 33:0
will load "file" into page 33, and
LOAD file 1234
will add hex 1234 to all load addresses in "file". This option is not supported for IEEE 695 files.
"L" is an abbreviation of "LOAD".
To abort this command, press the Escape key or click on the Cancel button on the toolbar.
Every compiler and emulator vendor seems to have a slightly different interpretation of the formats described below. If you experience difficulty loading any of these formats, please contact us with information about the compiler or assembler used and example source and load files.
If a Motorola/Freescale S9 or S8 record is encountered, the target program counter will be set to the start address contained in the record. Motorola/Freescale S0 records are ignored. Records other than S0, S1, S2, S9 or S8 will cause an error.
S2 and S8 records contain 24-bit addresses. If the target processor is the 68HC08, 68HC11 or 68HC12, these addresses are interpreted as recommended by Motorola/Freescale:
For other processors, a 24-bit address is interpreted as
Note: The ImageCraft IDE calls the first format "Linear" and the second one "CPU / Banked". NoICE's default for Motorola/Freescale targets is "Linear".
Note: Even though Motorola/Freescale recommends the linear format, their Metrowerks compiler and free MCUez assembler generates the banked format. Doh!
To change NoICE's interpretation of S2 addresses to match your compiler or assembler, you can use the S2FORMAT command or the checkbox in the Load File dialog..
As if that weren't bad enough, GNU/GCC for the HC11 and HC12 defines a third way to interpret S-records: If memory banking is used, all records in the file will be S2 records. If the address is less than 0x10000, it is an unbanked address. If the address is 0x10000 or greater, it is interpreted as a "linear" address after subtracting 0x10000 from the address in the S-record. NoICE will not correctly load S-records in this format.
(If you don't understand this section, you probably don't need it.)
Some projects are linked in pieces to produce more than one hex file. However, in some cases NoICE performs special actions before or after loading a hex file, and you may not want this action to be performed for each file. For example
NoICE includes the utility EatS9 to get around these issues. EatS9 simply removes the S9 (or S8 or S7 for extended address records) from the end of a file. This allows files to be concatenated and burned as a single file. In operation,
If an Intel type 03 record is encountered, the target program counter will be set to the start address contained in the record.
Intel's definition of the 01 (end) record states that the address field is unused. However, some assemblers and compilers seem to place the start address in the 01 record rather than in a 03 record. If a non-zero address is specified in a 01 record, NoICE will set the target program counter to the start address contained in the record.
NoICE supports record types 6 (data), 8 (end), and 3 (symbol). If a non-zero address is specified in an end record, NoICE will set the target program counter to the start address contained in the record.
Section names defined in symbol records will be converted into NoICE file scope specifications, in order that local scope symbols may be defined. This use of sections is not supported by all tools which produce Tektronix records. In cases where actual section names are used, it may be possible (via compiler or assembler directive) to set the section name equal to the file name (without extension) for each module.
Symbols defined with Tektronix symbol types 1 through 4 will be defined as global. Symbols defined with Tektronix symbol types 5 and above will be defined as file scope within the current file (section).
Symbols of type 7 (local code address) with names of the form L_123 will be interpreted as line number information within the current file (section). Not all tools which produce Tektronix records can generate line number information.
Version 6 and later of the ImageCraft compiler can generate debug files in the ImageCraft .DBG format. These files contain symbol and source debug information. When NoICE loads an ImageCraft DBG file, it will also try to load an S19 file with the same name.
The original .DBG format supports primitive data types, pointers, and arrays, but does not support C structure or union definitions.
DBG format 1.1, supported by ImageCraft Professional Version 6.13 and later, does support structures, unions, and bitfields.
To produce a DBG file, use the ImageCraft "-g" compiler switch. When using the ImageCraft IDE, select "Options" from the "Project" menu. Select the "Compiler" tab.
Build your project (myproject.prj in our example here). Then run NoICE and LOAD myproject.dbg.
If the Run until "main" after LOAD option on the Run menu is checked, NoICE will automatically place a breakpoint at "main" and execute the C startup code after you LOAD an ImageCraft DBG file.
NoICE will load both memory content and symbolic debug information from IEEE 695 binary and ASCII files, using the HP/Microtec extensions. The extensions are quite complex, and ambiguous in places. If you experience any difficulty loading a IEEE 695 file, please contact us.
We note that the Production Languages Corp. 8051 compiler uses proprietary extensions to IEEE 695 for structure definitions. These files cannot be loaded by NoICE.
IEEE 695 files can contain debug information not possible in some other formats supported by NoICE:
If the Run until "main" after LOAD option on the Run menu is checked, NoICE will automatically place a breakpoint at "main" and execute the C startup code after you LOAD an IEEE 695 file.
NoICE can also load files that contain a binary memory image. In this case, you must provide a load address, since the binary file does not contain anything except memory content.
If the file has the extension "BIN", then the file will be loaded as a binary image. To force a file with any extension to be loaded as a binary image, specify the file name, a load address, and the letter "B". Thus
LOAD file 1000 B
will load "file" as a binary image beginning at address 1000.
The original definitions of the Motorola/Freescale and Intel hex formats contain only data, with no symbolic information. However, various emulator manufacturers have extended the formats to include symbolic information. While not as full-featured as IEEE 695, these formats can provide useful debug information.
If your assembler or compiler cannot produce any of these formats, you may still be able to extract the necessary information from MAP and LST files. Utilities are provided to perform this task.
The following symbol formats are supported by the NoICE LOAD command for Motorola/Freescale and Intel hex files:
"Intel format" (sometimes known as "Applied Microsystems format") symbol definitions appear before the hex records, and are of the form
0 name hexvalueH
"Zax" format symbol and line number definitions appear before the hex records, and are of the form
$$file name hexvalueH #linenumber hexvalueH
Symbols declared in the block after $$file will be defined as having scope limited to that file. A "file" name of GLOBAL will cause subsequent symbol definitions to be global.
The file name will often occur without either extension or path. In this case, NoICE will be unable to open the file for source-level debug, because it does not know the file's extension. This can be corrected either before or after loading the Zax symbols by issuing a FILE command for each file, including the extension and any necessary path information. Often, it will be convenient to include these definitions in a command file, which may also load the hex file. For example, such a file might contain:
FILE ctest.c FILE \cxx\lib\start.s LOAD ctest.hex
"Atron" format symbol and line number definitions appear before the hex records, and are of the form
$$ file.ext name $hexvalue #linenumber $hexvalue
Symbols declared in the block after $$file.ext will be defined as having scope limited to that file. A "file" name of GLOBAL will cause subsequent symbol definitions to be global.
Atron format includes path and extension information for files.
For processors like the HC12 that have memory banking, Motorola/Freescale recommends a format called "linear":
The most common mode for non-Motorola/Freescale processors is "banked" mode, where the top eight bits of the 24-bit address is the page or bank:
By default, NoICE assumes that Motorola/Freescale target architectures will use "linear" format, and that other target architectures will use "banked" format. The S2FORMAT command may be used to change the interpretation.
S2FORMAT linear
will set the format to linear, and
S2FORMAT banked
will set the format to banked.
The format is saved in the Registry, so you only need to set it once.
You may also examine or change this setting using the checkbox labelled "S2 Records have linear addresses" in the LOAD dialog.
SAVE file addr size
This command writes the contents of the specified region of target memory to a disk file in Motorola/Freescale or Intel hex format, or as a binary image. If the file already exists, it is deleted and a new file of the same name is created.
The default save format is Motorola/Freescale hex. S1 records are used for non-banked data, and S2 records are used for banked data. The S2 address format follows S2FORMAT.
To force a file with any extension to be written as Intel hex, specify the file name, start address, size, and the letter "I".
If the file has the extension "BIN", then the file is written as a binary image. To force a file with any extension to be written as a binary image, specify the file name, start address, size, and the letter "B":
SAVE file 1000 100 B
To abort this command, press the Escape key or click on the Cancel button on the toolbar.
Note: prior to version 8.2, the default format was Intel hex. The default was changed to Motorola because it can address more than 64K of memory, as is required on some targets such as the HC12.
FILL addr size value
Sets "size" bytes of target memory beginning at "addr" to "value".
To abort this command, press the Escape key or click on the Cancel button on the toolbar.
COPY addr1 size addr2
Copies "size" bytes of target memory beginning at "addr1" to target memory beginning at "addr2".
To abort this command, press the Escape key or click on the Cancel button on the toolbar.
CHECKSUM addr size
Computes and displays the 16 bit sum of "size" bytes of target memory beginning at "addr".
To abort this command, press the Escape key or click on the Cancel button on the toolbar.
"CHECK" is an abbreviation of "CHECKSUM".
The "WATCH" or "W" command allows the contents of a byte, word, or region of memory to be displayed in the Watch window. The display is updated:
Watch data may be displayed in various formats as described below.
Syntax to create a watch is
WATCH addr {%type}
where
Valid values for the type are:
X08 | unsigned hex byte or bytes (default if omitted, unless "addr" has a data type) |
X16 | unsigned hex word (16 bits) or words |
X24 | unsigned hex "semi-long" (24 bits) or words |
X32 | unsigned hex long word (32 bits) or words |
B08 | binary byte or bytes |
S08 | signed byte or bytes in current radix |
S16 | signed word (16 bits) or words in current radix |
S24 | signed "semi-long" word (24 bits) or words in current radix |
S32 | signed long word (32 bits) or words in current radix |
U08 | unsigned byte or bytes in current radix |
U16 | unsigned word (16 bits) or words in current radix |
U24 | unsigned "semi-long" word (24 bits) or words in current radix |
U32 | unsigned long word (32 bits) or words in current radix |
ASCII | ASCII (actually ISO-8859-1) character or characters |
float | IEEE-754 floating point number (32 bits) |
any user-defined data type may also be specified. See DEFTYPE and subsequent commands for more information about data types.
Examples:
W 1000
will show the byte at address 1000 in hex in the data window.
W 1000 %S16
will show the word at address 1000 (i.e., the bytes at addresses 1000 and 1001) as a signed decimal integer in the data window. The byte order for words is processor dependent.
W -
will delete all watches.
W -1000
will delete the (first) watch at address 1000.
This command allows the user to enter instructions into target memory using their assembly mnemonics.
To begin entering assembly instructions at address expression 1000, enter
ASSEMBLE 1000
This will open the Assemble Memory dialog beginning at address 1000. If no address is specified, then the last opened address will be reopened.
Note that all currently defined symbols may be used as instruction arguments. Thus for the 68HC11
LDAA 1000h ADDA FOO STAA FOO+1000h
are all legal instructions if FOO has been previously defined.
As an alternative to the dialog, if the user follows the address by a valid assembly language statement, the statement will be assembled and written to memory without showing the dialog. For example:
ASM 1000 LDAA 1000h
You may also specify a file containing assembly statements by prefixing the name with "@":
ASM 1000 @myfile.asm
Lines will be read from the file and assembled into sequential memory locations. Occurrence of an assembly error will cause the file operation to be aborted. Note that this will typically not work with a normal assembly source file, because such files usually contain pseudo-ops such an EQU and ORG that are not known to NoICE. Comment lines beginning with ";" are allowed, however.
Please note that the ASM command is intended for use in patching code and entering small programs. It is not intended to replace a stand-alone assembler. In particular, the parser is not guaranteed to catch all illegal combinations of arguments, and the error messages may at times be misleading.
"ASM" is an abbreviation of "ASSEMBLE".