Tool/software: Code Composer Studio
Hello Team,
I want to read a .csv file for my algorithm but it doesnot work in CCS7. The same code I tried in IAR and it is working. Please can you tell me how to make it work in CCS.
#include <msp430.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
FILE* stream = fopen("data.csv", "r");
if(stream == NULL)
exit(1);
char line[10];
if((fgets(line, 10, stream))!=NULL)
{
char* tmp = strtok(line,",");
free(tmp);
}
}
Regards,
Soumit