| |||
| Home > DS-5 Debugger commands > DS-5 Debugger commands listed in alphabetical order > set semihosting | |||
This command controls the semihosting settings in the debugger. Semihosting is used to communicate input/output requests from application code to the host workstation running the debugger.
These settings only apply if the target supports semihosting and they cannot be changed while the target is running.
set semihosting option
Where:
optionSpecifies additional options:
args argumentsSpecifies the command-line arguments that are passed
to the main() function in the application using
the argv parameter. The name of the image is always
implicitly passed in argv[0] and it is not necessary
to pass this as an argument.
file-base directorySpecifies the base directory where the files that the application opens are relative to.
stderr "stderr" | filenameSpecifies either console streams or a file to write stderr for semihosting
operations.
stdin "stdin" | filenameSpecifies either console streams or a file to read stdin for semihosting
operations.
stdout "stdout" | filenameSpecifies either console streams or a file to write stdout for semihosting
operations.
top-of-memory addressSpecifies the top of memory.
stack_heap_optionsSpecifies finer controls to manually configure the
base address and limits for the stack and heap. If you use ,
then these settings take precedence over the top-of-memory and all
of the following options must be specified:stack_heap_options
stack-base addressThe base address of the stack.
stack-limit addressThe end address of the stack.
heap-base addressThe base address of the heap.
heap-limit addressThe end address of the heap.
enabledautoAutomatically enables semihosting operations if appropriate when an image is loaded. This is the default.
offDisables all semihosting operations.
onEnables all semihosting operations.
You must configure semihosting addresses before you enable semihosting.
For example:
set semihosting top-of-memory address
set semihosting enabled on
vector addressSpecifies a breakpoint address for semihosting support. If it is not set, the debugger uses vector catch (if supported) or 0x8.