Wednesday, April 25th 2018, 12:42am UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

GURU

Beginner

Date of registration: Apr 6th 2017

Posts: 2

1

Thursday, April 6th 2017, 1:09pm

[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.

SEGGER - Niklas

Super Moderator

Date of registration: Oct 6th 2014

Posts: 1,691

2

Thursday, April 6th 2017, 1:40pm

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
Would you like to be added to the J-Link software update notification list, so you get informed automatically when a new version becomes available?
Just write me a PM or in case you want to subscribe to it yourself, please use this link: Link
Notification for J-Link, J-Link Debugger, SystemView & J-Scope: Link
Notification for Embedded Studio: Link

GURU

Beginner

Date of registration: Apr 6th 2017

Posts: 2

3

Thursday, April 6th 2017, 7:23pm

Hi Niklas,
There is no error. Compilation and loading is good. when i start the debugging no file is creating. NULL pointer value.