Hi,
Using the ARM Cortex KL25Z, I have stored the value from the board into a variable. I want to take those values and store it in a text file.
Here is the code I have tried:
FILE *f = fopen("file.txt", "w"); if (f == NULL) { printf("Error opening file!\n"); exit(1); } /* print integers and floats */ int i = 1; float py = 3.1415927; fprintf(f, "Integer: %d, float: %f\n", i, py); fclose(f);
The problems I encounter are:
- Doesnt create a file - Doesnt write to a file
So go back to whoever told you that, and get them to help you with it
I want this file to be created on the PC. Away from the KL25Z. The data I am retrieving from the micro controller is to be store in a database. I done some research and I was told to do communication by serial from my windows pc to the KL25Z, I have no idea on how to do so.
Where exactly do you expect this file to be created? On an SD card on the target? Some place unrelated to the target?
View all questions in Keil forum