Difference between revisions of "Embedded Studio Debug Options"

From SEGGER Wiki
Jump to: navigation, search
(Created page with "The Debug Options configure how the project should be debugged, which debug interface (J-Link, GDB Server, Simulator) should be used, and how the target should be configured o...")
 
(Target Trace)
 
(6 intermediate revisions by the same user not shown)
Line 28: Line 28:
 
|-
 
|-
 
|  Startup Completion Point
 
|  Startup Completion Point
||  
+
|| ''string''
||  
+
|| Specifies the point in the program where startup is complete. Software breakpoints and debugIO will be enabled after this point has been reached.
 
|-
 
|-
 
|  Start From Entry Point Symbol
 
|  Start From Entry Point Symbol
||  
+
|| Yes, No
||  
+
|| If yes the debugger will start execution from the entry point symbol.If no the debugger will start execution from the core specific location.
 
|-
 
|-
 
|  Leave Target Running
 
|  Leave Target Running
||  
+
|| Yes, No
||  
+
|| Debugger will leave the target running on debug stop.
 
|-
 
|-
 
|  Register Definition File
 
|  Register Definition File
||  
+
|| ''filepath''
||  
+
|| The name of the file containing register definitions.
 
|-
 
|-
 
|  Debug Terminal Log File
 
|  Debug Terminal Log File
||  
+
|| ''string''
||  
+
|| A file to write the output from the debug terminal to.
 
|-
 
|-
 
|  Threads Script File
 
|  Threads Script File
||  
+
|| ''filepath''
||  
+
|| The threads script used by the debugger.
 
|-
 
|-
 
|  Thread Maximum
 
|  Thread Maximum
||  
+
|| ''number''
||  
+
|| The maximum number of threads to display.
 
|-
 
|-
 
|  Working Directory
 
|  Working Directory
||  
+
|| ''directorypath''
||  
+
|| The working directory for a debug session. This property will have macro expansion applied to it.
 
|-
 
|-
 
|  Command Arguments
 
|  Command Arguments
||  
+
|| ''string''
||  
+
|| The command arguments passed to the executable. This property will have macro expansion applied to it.
 
|-
 
|-
 
|  Access Variables Within Memory Map Only
 
|  Access Variables Within Memory Map Only
||  
+
|| Yes, No
||  
+
|| If enabled the debugger will only display variables located in the memory map.
 
|-
 
|-
 
|  Entry Point Symbol
 
|  Entry Point Symbol
||  
+
|| ''string''
||  
+
|| Debugger will start execution at symbol if defined.
 
|-
 
|-
 
|  Ignore .debug_aranges Section
 
|  Ignore .debug_aranges Section
||  
+
|| Yes, No
||  
+
|| The debugger will not use the .debug_aranges section.
 
|-
 
|-
 
|  Ignore .debug_frame Section
 
|  Ignore .debug_frame Section
||  
+
|| Yes, No
||  
+
|| The debugger will not use the .debug_frame section.
 
|-
 
|-
 
|  Memory Upload Page Size
 
|  Memory Upload Page Size
||  
+
|| ''number''
||  
+
|| The aligned page size the debugger uses when uploading address ranges.
 
|-
 
|-
 
|  Reserved Member Name
 
|  Reserved Member Name
||  
+
|| ''string''
||  
+
|| The struct reserved member name. Struct members that contain the (case insensitive) string will not be displayed.
 
|-
 
|-
 
|  RTT Control Block Address
 
|  RTT Control Block Address
||  
+
|| ''string''
||  
+
|| The symbol or 0x prefixed address of the RTT control block.
 
|-
 
|-
 
|  RTT Enable
 
|  RTT Enable
||  
+
|| Yes, No
||  
+
|| If enabled the debugger will service RTT input/output in the debug terminal.
 
|-
 
|-
 
|  Starting Stack Pointer Value
 
|  Starting Stack Pointer Value
||  
+
|| ''number''
||  
+
|| The symbol or 0x prefixed value to set the stack pointer on start debugging.
 
|-
 
|-
 
|  Type Interpretation File
 
|  Type Interpretation File
||  
+
|| ''string''
||  
+
|| Specifies the type interpretation file to use.
 
|-
 
|-
 
|  Debug Symbols File[0-3]
 
|  Debug Symbols File[0-3]
||  
+
|| ''string''
||
+
|| The name of the debug symbols file. This property will have macro expansion applied to it. If it is not defined then the main load file is used.
 
|}
 
|}
  
Line 123: Line 123:
 
|-
 
|-
 
|  Target Interface Type
 
|  Target Interface Type
||  
+
|| ''string'', select from possible interface types
||  
+
|| Specifies the type of interface the target has.
 
|-
 
|-
 
|  Speed
 
|  Speed
||  
+
|| ''number''
||  
+
|| The required JTAG/SWD clock frequency in kHz (0 to auto-detect best possible).
 
|-
 
|-
 
|  Supply Power
 
|  Supply Power
||  
+
|| Yes, No
||  
+
|| The J-Link supplies power to the target.
 
|-
 
|-
 
|  Show Log Messages In Output Window
 
|  Show Log Messages In Output Window
||  
+
|| Yes, No
||  
+
|| Display the J-Link log messages to the output window.
 
|-
 
|-
 
|  Log File
 
|  Log File
||  
+
|| ''filepath''
||  
+
|| The file to output the J-Link log to.
 
|-
 
|-
 
|  Script File
 
|  Script File
||  
+
|| ''filepath''
||  
+
|| The file path of the optional J-Link script file to use.
 
|-
 
|-
 
|  Exclude Flash Cache Range
 
|  Exclude Flash Cache Range
||  
+
|| ''string''
||  
+
|| Define a memory range that should not be cached by J-Link
 
|-
 
|-
 
|  Additional J-Link Options
 
|  Additional J-Link Options
||  
+
|| ''string''
||  
+
|| Specify additional J-Link options to allow enabling or disabling advanced features and fine tuning. [[J-Link Command Strings]]
 
|}
 
|}
  
Line 223: Line 223:
 
|-
 
|-
 
|  Memory Simulation file
 
|  Memory Simulation file
||  
+
|| ''filepath''
||  
+
|| Specifies the dll that simulates the memory system. This property will have macro expansion applied to it.
 
|-
 
|-
 
|  Memory Simulation Parameter
 
|  Memory Simulation Parameter
||  
+
|| ''string''
||  
+
|| Parameter passed to the memory simulation. The format of this is specific to the memory simulation.
 
|-
 
|-
 
|  Memory Simulation Parameter Macros
 
|  Memory Simulation Parameter Macros
||  
+
|| ''string''
||  
+
|| Macros to apply to the parameter passed to the memory simulation on creation.
 +
|-
 +
|  Stop On Branch
 +
|| Yes, No
 +
|| Stop when the simulator executes a b . instruction.
 
|-
 
|-
 
|  Stop On Memory Error
 
|  Stop On Memory Error
||  
+
|| ''string'', select from several options
||  
+
|| Specifies the simulator behaviour when a memory error occurs.
 
|-
 
|-
 
|  Trace Buffer Size
 
|  Trace Buffer Size
||  
+
|| ''number''
||  
+
|| The number of trace entries to store.
 
|}
 
|}
  
 
== Loader ==
 
== Loader ==
 
The Loader Options configure which application file and additional files to program to the target device on debug.
 
The Loader Options configure which application file and additional files to program to the target device on debug.
 +
 +
{| class="wikitable"
 +
|-
 +
!  Options
 +
!  Values
 +
!  Description
 +
|-
 +
|  Load File
 +
|| ''string''
 +
|| The name of the main load file. This property will have macro expansion applied to it. If it is not defined then the output filepath of the linker command is used.
 +
|-
 +
|  Load File Type
 +
|| ''string'', select from several options
 +
|| The file type of the main load file. The options are Detect, elf, bin, ihex, hex, tihex, srec.
 +
|-
 +
|  Load File Address
 +
|| ''string''
 +
|| The address to download the main load file to.
 +
|-
 +
|  Load ELF Sections
 +
|| Yes, No
 +
|| The debugger will load ELF sections rather than ELF programs.
 +
|-
 +
|  No Load Sections
 +
|| ''string''
 +
|| Names of (loadable) sections not to load.
 +
|-
 +
|  Additional Load File[0-3]
 +
|| ''string''
 +
|| Additional file to load on debug load. This property will have macro expansion applied to it.
 +
|-
 +
|  Additional Load File Type[0-3]
 +
|| ''string'', select from several options
 +
|| The file type of the additional load file. The options are Detect, elf, bin, ihex, hex, tihex, srec.
 +
|-
 +
|  Additional Load File Address[0-3]
 +
|| ''filepath''
 +
|| The address to load the additional load file.
 +
|-
 +
|}
  
 
== Target Control ==
 
== Target Control ==
 
Additional Options for checks when debugging on a target.
 
Additional Options for checks when debugging on a target.
 +
 +
 +
{| class="wikitable"
 +
|-
 +
!  Options
 +
!  Values
 +
!  Description
 +
|-
 +
|  Check Load Sections Fit Target Description
 +
|| Yes, No
 +
|| Specifies whether load sections in the program match the memory segments described in the memory map.
 +
|}
  
 
== Target Script ==
 
== Target Script ==
 
The Target Scrip Options configure script functions to be executed on certain debug operations.
 
The Target Scrip Options configure script functions to be executed on certain debug operations.
 +
 +
{| class="wikitable"
 +
|-
 +
!  Options
 +
!  Values
 +
!  Description
 +
|-
 +
|  Attach Script
 +
|| ''string''
 +
|| The script that is executed when the target is attached to.
 +
|-
 +
|  Connect Script
 +
|| ''string''
 +
|| The script that is executed when the target is connected to.
 +
|-
 +
|  Debug Begin Script
 +
|| ''string''
 +
|| The script that is executed when the debugger begins a debug session.
 +
|-
 +
|  Debug End Script
 +
|| ''string''
 +
|| The script that is executed when the debugger ends a debug session.
 +
|-
 +
|  Disconnect Script
 +
|| ''string''
 +
|| The script that is executed when the target is disconnected from.
 +
|-
 +
|  Reset Script
 +
|| ''string''
 +
|| The script that is executed when the target is reset.
 +
|-
 +
|  Target Script File
 +
|| ''string''
 +
|| The target script file, the contents of this file are prepended to script project properties before they are executed.
 +
|}
  
 
== Target Trace ==
 
== Target Trace ==
 
The Target Trace Options configure which trace interface to use and how to initialize trace on the target device.
 
The Target Trace Options configure which trace interface to use and how to initialize trace on the target device.
 +
 +
 +
 +
{| class="wikitable"
 +
|-
 +
!  Options
 +
!  Values
 +
!  Description
 +
|-
 +
|  Trace Interface Type
 +
|| ''string'', select from several options
 +
|| Specifies the type of trace interface the target has.
 +
|-
 +
|  Trace Initialize Script
 +
|| ''string''
 +
|| The script that is executed to initialize the target trace hardware.
 +
|}
 +
  
 
[[Category:Embedded Studio]]
 
[[Category:Embedded Studio]]

Latest revision as of 14:44, 14 August 2019

The Debug Options configure how the project should be debugged, which debug interface (J-Link, GDB Server, Simulator) should be used, and how the target should be configured on certain operations.

Debugger

The Debugger options control how to debug the project. These options apply to all debug interfaces.

Options Values Description
Target Connection J-Link, GDB Server, Simulator Select the debug interface to use to connect to the target device.
Target Device string, select from the list of known devices The name of the device to connect to.
Run To Control Always, Only With No Breakpoint Set, Never, On Entry Specifies when the initial breakpoint should be set.
Run To string Specifies where to set the initial breakpoint.
Startup Completion Point string Specifies the point in the program where startup is complete. Software breakpoints and debugIO will be enabled after this point has been reached.
Start From Entry Point Symbol Yes, No If yes the debugger will start execution from the entry point symbol.If no the debugger will start execution from the core specific location.
Leave Target Running Yes, No Debugger will leave the target running on debug stop.
Register Definition File filepath The name of the file containing register definitions.
Debug Terminal Log File string A file to write the output from the debug terminal to.
Threads Script File filepath The threads script used by the debugger.
Thread Maximum number The maximum number of threads to display.
Working Directory directorypath The working directory for a debug session. This property will have macro expansion applied to it.
Command Arguments string The command arguments passed to the executable. This property will have macro expansion applied to it.
Access Variables Within Memory Map Only Yes, No If enabled the debugger will only display variables located in the memory map.
Entry Point Symbol string Debugger will start execution at symbol if defined.
Ignore .debug_aranges Section Yes, No The debugger will not use the .debug_aranges section.
Ignore .debug_frame Section Yes, No The debugger will not use the .debug_frame section.
Memory Upload Page Size number The aligned page size the debugger uses when uploading address ranges.
Reserved Member Name string The struct reserved member name. Struct members that contain the (case insensitive) string will not be displayed.
RTT Control Block Address string The symbol or 0x prefixed address of the RTT control block.
RTT Enable Yes, No If enabled the debugger will service RTT input/output in the debug terminal.
Starting Stack Pointer Value number The symbol or 0x prefixed value to set the stack pointer on start debugging.
Type Interpretation File string Specifies the type interpretation file to use.
Debug Symbols File[0-3] string The name of the debug symbols file. This property will have macro expansion applied to it. If it is not defined then the main load file is used.

J-Link

The J-Link Options configure how to connect to a J-Link and how J-Link connects to the target. These options apply only when "J-Link" is selected as "Target Connection".

Options Values Description
Host Connection string, USB, USB s/n, IP s/n, IP nnn.nnn.nnn.nnn, selection from available J-Links Defines how to connect Embedded Studion to the J-Link.
Target Interface Type string, select from possible interface types Specifies the type of interface the target has.
Speed number The required JTAG/SWD clock frequency in kHz (0 to auto-detect best possible).
Supply Power Yes, No The J-Link supplies power to the target.
Show Log Messages In Output Window Yes, No Display the J-Link log messages to the output window.
Log File filepath The file to output the J-Link log to.
Script File filepath The file path of the optional J-Link script file to use.
Exclude Flash Cache Range string Define a memory range that should not be cached by J-Link
Additional J-Link Options string Specify additional J-Link options to allow enabling or disabling advanced features and fine tuning. J-Link Command Strings

GDB Server

The GDB Server Options configure how to connect to a GDB Server and how to handle it. these options apply only when "GDB Server" is selected as "Target Connection".

Options Values Description
Host string, Default: localhost The hostname or IP of the GDB Server to connect to.
Type J-Link, OpenOCD, ST-Link, Custom The type of GDB Server being connected to.
GDB Server Command Line string The command line to start GDB Server.
Auto Start GDB Server Yes, No Specifies whether GDB Server is started by Embedded Studio on connect or assumed to be already running.
Port number The portnumber of the GDB Server to connect to.
Reset and Stop Command string, automatically set for known GDB Servers. The remote GDB Server command to use to reset and stop the target.
Ignore Checksum Errors Yes, No, automatically set for known GDB Servers. Specifies whether an incorrect GBD communication checksum causes an error. Workaround for ST-Link GDB Server.
Allow Memory Access During Execution Yes, No, automatically set for known GDB Servers. Specifies whether memory can be accessed while target is running. If No, target will be stopped for each memory access.
Log File filepath Specifies a file to output the log of GDB Server communication to.
Target XML File filepath If set, use this file instead of the target.xml returned by GDB Server.
Connect Timeout number The length of time in secconds to attempt to connect to server before failing.


Simulator

The Simulation Options configure how the target device core should be simulated. These options apply only when "Simulator" is selected as "Target Connection".

Options Values Description
Memory Simulation file filepath Specifies the dll that simulates the memory system. This property will have macro expansion applied to it.
Memory Simulation Parameter string Parameter passed to the memory simulation. The format of this is specific to the memory simulation.
Memory Simulation Parameter Macros string Macros to apply to the parameter passed to the memory simulation on creation.
Stop On Branch Yes, No Stop when the simulator executes a b . instruction.
Stop On Memory Error string, select from several options Specifies the simulator behaviour when a memory error occurs.
Trace Buffer Size number The number of trace entries to store.

Loader

The Loader Options configure which application file and additional files to program to the target device on debug.

Options Values Description
Load File string The name of the main load file. This property will have macro expansion applied to it. If it is not defined then the output filepath of the linker command is used.
Load File Type string, select from several options The file type of the main load file. The options are Detect, elf, bin, ihex, hex, tihex, srec.
Load File Address string The address to download the main load file to.
Load ELF Sections Yes, No The debugger will load ELF sections rather than ELF programs.
No Load Sections string Names of (loadable) sections not to load.
Additional Load File[0-3] string Additional file to load on debug load. This property will have macro expansion applied to it.
Additional Load File Type[0-3] string, select from several options The file type of the additional load file. The options are Detect, elf, bin, ihex, hex, tihex, srec.
Additional Load File Address[0-3] filepath The address to load the additional load file.

Target Control

Additional Options for checks when debugging on a target.


Options Values Description
Check Load Sections Fit Target Description Yes, No Specifies whether load sections in the program match the memory segments described in the memory map.

Target Script

The Target Scrip Options configure script functions to be executed on certain debug operations.

Options Values Description
Attach Script string The script that is executed when the target is attached to.
Connect Script string The script that is executed when the target is connected to.
Debug Begin Script string The script that is executed when the debugger begins a debug session.
Debug End Script string The script that is executed when the debugger ends a debug session.
Disconnect Script string The script that is executed when the target is disconnected from.
Reset Script string The script that is executed when the target is reset.
Target Script File string The target script file, the contents of this file are prepended to script project properties before they are executed.

Target Trace

The Target Trace Options configure which trace interface to use and how to initialize trace on the target device.


Options Values Description
Trace Interface Type string, select from several options Specifies the type of trace interface the target has.
Trace Initialize Script string The script that is executed to initialize the target trace hardware.