If you want to enable trace, the "Enable trace" check box must be checked. In addition you must decide which trace method to use. Here there are two choices; NanoTrace and Auxiliary Trace. NanoTrace is supported both by the AVR ONE! and the JTAG ICE mkII, however it will slow down the target considerably. Auxiliary trace is only supported by the AVR ONE! and will allow the target to execute at full speed.
Note that enabling trace does not start trace. This must be done using actions in the trace view or by means of setting tracepoints.
Contents |
The Buffer size option is used to specify how much of the debugger memory shall be used for trace buffer. Please note that if this value is large you may end up with huge amounts of trace data which could bog down your computer.
When using NanoTrace it's buffer must be specified. This must be in RAM and should be at least 1kB large. There are three ways of specifying this buffer. If a NANOTRACE segment exists in the ELF file, this can be used. You may declare a NANOTRACE variable which also will to some extent protect the buffer area or you may specify the location yourself. The code below will declare such a variable and make sure it does not get optimized away.
char NANOTRACE[1024] __attribute__((used));
Pressing the "Detect" button will use the selected ELF file to determine a buffer 1024 bytes large, located just under the stack. Please note that when using this method it's possible for the heap to grow so large that it overwrites the NanoTrace buffer.
Four different actions can be taken if the trace buffer has been filled. This applies to both the buffer on the AVR ONE! and the NanoTrace buffer in RAM.
When Enable data trace for the entire memory is selected; data trace frames are issued for each data access depending on the value of the Memory access type field. Please note that when using this option you may get too many trace events for the system to handle so use with care.
It also possible to define two ranges of data trace access. For each of the ranges, the access type must be specified and the address range. Using the lookup button you can select from a list of global variables detected in the ELF file.