Is it possible to direct the output of arm semihosting to a file?

Sysprogs forums Forums VisualGDB Is it possible to direct the output of arm semihosting to a file?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #30149
    AEHadi
    Participant

    Now that I have fast semihosting setup. It would be very useful to be able redirect the output to a file. I understand that you can right click on the console and choose save to file. However is there a way to do this automatically?

    #30150
    AEHadi
    Participant

    I have also used stdio’s IO operations like the code below.

    printf(“bla\n”);
    char str1[] = “towrite\n”;
    //scanf(“%s”, str1);

    FILE* fp = fopen(“SemiOut.txt”, “w”);
    //fprintf(fp, “%s”, “ToWrite\n”);
    fwrite(str1, 1, sizeof(str1), fp);

    fclose(fp);

    However these did not do anything in hardware. Only in simulation.

     

    • This reply was modified 3 years, 9 months ago by AEHadi.
    #30164
    support
    Keymaster

    Hi,

    Please try using VisualGDB Project Properties -> Embedded Debug Tweaking to enable saving of various output types to files.

    If you would like to access the files on the Windows machine from the embedded targets, please consider using the Test Resource Manager API.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.