ARM Technical Support Knowledge Articles

How do I redirect the semihosting output to a file?

Applies to: DS-5

Scenario

In the automated test environment, I want to save the messages displayed in the DS-5 App Console to a file so that I can analyze the file later on. How do I do this?

The following figure shows the view of the DS5 App Console:

Answer

To redirect the semihosting output to a file, perform the following steps:

1. Make sure that DS-5 is connected to the target and the target is stopped.

2. Disable semihosting for configuration by using the following command:

    set semihosting enabled off

3. Configure semihosting to write error messages into the text file stderr.log using the following command:

    set semihosting stderr "C:\temp\stderr.log

4. Configure semihosting to write the information log into the text file stdout.log by using the following command:

    set semihosting stdout "C:\temp\stdout.log

5. Enable semihosting by using the following command:

    set semihosting enabled on

Related Information

Attachments

redirect_semihosting_output.jpg

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential