----- Ursprüngliche Nachricht -----
Von: Steve DeLaney
An: [email protected]
Gesendet am: 27.Februar.2009 06:16:50
Betreff: [Mspgcc-users] some stuff missing from stdio ?


> Hi all, I'm new to mspgcc so bear with me if these topics are repetitive, but
> The stdio.h seems incomplete -   FILE and fopen(), fclose(), etc.
> appear to be missing.  This is raising havoc with a port I'm working on which 
> is
> "ANSI" C.   I'm puzzled how a C99 compiler and libc can have a subset of stdio

Well, which files you want to open and where?

fopen() etc. are wrapping functions to the OS' file system. And the MSP doesn 
not have an OS and no file system.
So what do youthing would happen if you open a file on an MSP?

You'll notice that puchar() is also missing (not in the header files but in the 
library code). Just because there is no default place where to put a char to.
You'll have to write your own function that puts the char to one of the 
parallel ports or any of the USART ports, along with the porper code to control 
the data transfer.
Same for the files. Since there is no file system, it is up to you to implement 
functions to handle your data storage. Unless you do so, all file (or stream) 
related functions do not make any sense.
And if you do, a dedicated function to handle your way of data storage will be 
surely smaller and faster than any global handling.

If you decide to add one of the FAT file system library packages out there 
(e.g. for SD cards or external serial FLASH) to your project, I'm pretty sure, 
that you'll find fopen() in one of its header files then.

JMGross

Reply via email to