SparkFun Forums 

Where electronics enthusiasts find answers.

Discussions on how to get your MSP JTAG programmer up and running.
By naz
#66293
Hai All,

This is naz,i'm using MSP430f149,IAR workbench 2.0. Following codes are my code,

[color=green][color=green][code][code]#include<msp430x14x.h>
FILE *fp,*fp1;
unsigned char c;
fp=("read.txt","r");
fp1=("write.txt","w");
if(fp==NULL)
printf("no data");
else
{
while(fgetc(c,fp)!=NULL)
{
fputch(c,fp1);
}
}
fclose(fp);
fclose(fp1);[/code][/code][/color]
}[/color]
problem is 1.it doesn't creat a write file and deoesn't copy the content of one to onther file
By engrforever
#66430
Naz,

I had reasons to contact IAR regarding some other issue and inquired about your post and here was their response:
fprintf/fputch is not really supported in embedded environment , it is there part of the C runtime library, in embedded development you do not have File system, unless you are using an RTOS for example writing to a hardware SD card. If you want to use it you must customized the fputch to output the data to hardware device like an SD card. -IAR Support
By naz
#66515
Thank you ...

by
naz
By steveduck
#78155
Naz,
IAR do not provide the File System specific code within eW430. This can be added by using FAT 16 libraries from the MSP430 Power Pack software from IAR or alternativly HCC Embedded (google it...) provide non FAT based software which will work with SD/MMC/NAND/Dataflash memories etc. HCC can provide FAT16 format or their own inplementation which is not FAT based but is a smaller footprint.

IAR have a demo version of power pack for MSP430 which will allow access to one file at any one time.

Both HCC and IAR products are expensive and not very accessable to experimenters.

I hope that this helps.
By naz
#78207
Thank you