Not applicable
Nov 14, 2017
08:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 14, 2017
08:43 AM
Hello everyone,
I'm working with a XMC 4700, I'm trying to use the fopen() as it follows:
const char* pFileName = "SOMETHING.BIN";
FILE* fp = fopen(pFileName, "w");
char * cadena = strerror(errno);
Instead of a direction, the value a I get from fp = 0, from cadena = "Function not implemented" and from errno = 88 (Socket operation on non-socket).
I don't know what I'm doing wrong heir, so I ask for your help.
I thank you in advance.
Best regards
Alan
I'm working with a XMC 4700, I'm trying to use the fopen() as it follows:
const char* pFileName = "SOMETHING.BIN";
FILE* fp = fopen(pFileName, "w");
char * cadena = strerror(errno);
Instead of a direction, the value a I get from fp = 0, from cadena = "Function not implemented" and from errno = 88 (Socket operation on non-socket).
I don't know what I'm doing wrong heir, so I ask for your help.
I thank you in advance.
Best regards
Alan
1 Reply
Nov 24, 2017
05:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 24, 2017
05:40 AM
Hi Alan,
fopen will not work, it is a posix call which is not fully implemented in the c library (newlib).
Newlib requires an external implementation of system call open (a stub), which it is not provided since we do not know on which media you want to open a file.
I would recommend you to use the FatFS on the SDMMC (sdcard).
Regards,
Jesus
fopen will not work, it is a posix call which is not fully implemented in the c library (newlib).
Newlib requires an external implementation of system call open (a stub), which it is not provided since we do not know on which media you want to open a file.
I would recommend you to use the FatFS on the SDMMC (sdcard).
Regards,
Jesus