[ABANDONED] File I/O from the Target to Host(PC)

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [ABANDONED] File I/O from the Target to Host(PC)

    Hi,
    Can any one help me on this issue?

    Issue: as subjected.

    Target : MCIMX6S5
    JTAG: JLINK
    GDB Server
    IDE: Atollic True studio Free version

    Here is the code which am currently working on :


    int main(void){

    FILE *fp;
    SystemClkInit();

    fp =fopen ("C:\\temp\\File.txt", "w+");

    if (fp!=NULL){

    fputs("SampleText file created",fp);

    fclose(fp);}


    While(1);

    }
    I discussed with out India support team, They said we have to use Semihosting. I tried understanding,
    Tried these methods:
    In the GDB script(Script present in Atollic True Studio RUN--> Debug Configurations...inside the tab "EmbeddedC/C++ Application" - Under "Startup Scripts") I used the following commands but NO use:


    monitor semihosting enable
    monitor semihosting IOclient 3


    With this also am unable to get the file out.
    When I debug file pointer fp is coming as NULL.


    Please Help me to resolve this issue ?( . Thanks in advance.
  • Hi,

    could you please open J-Link Commander and provide us with a screenshot from the output?
    J-Link Commander is part of the J-Link software package, which is available free of charge here .

    Best regards,
    Niklas
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.