Tuesday, April 24th 2018, 10:42pm 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.



Date of registration: Apr 6th 2017

Posts: 2


Thursday, April 6th 2017, 1:09pm

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

Can any one help me on this issue?

Issue: as subjected.

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

Here is the code which am currently working on :

int main(void){

FILE *fp;

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

if (fp!=NULL){

fputs("SampleText file created",fp);



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


Thursday, April 6th 2017, 1:40pm


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,
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



Date of registration: Apr 6th 2017

Posts: 2


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.