I am writing an embedded C program on the ARM Cortex-M4 processor. I have saved data from MATLAB in a .txt file and want to read the same in my C code. When I use the fopen() function, I get the "cannot load from non-primitive location" error. Can anyone tell me what I am doing wrong?
FILE *fp = fopen("x_real.txt","r"); Getting NULL pointer here // Return if could not open file if (fp == NULL) { printf("Could not open the file"); return 0; } do { // Taking input single character at a time char c = fgetc(fp); // Checking for end of file if (feof(fp)) break ; printf("%c", c); } while(1); fclose(fp);