hi I want to save my intermediate data into a file. I tried to use fopen, fwrite, it can not even read. how should i use rtl.h ?
int count[10]; FILE *fout; fout = fopen ("Counter.bin","w"); if (fout != NULL) { fwrite (&count[0], sizeof (int), 10, fout); // write an item 10 times to the file fclose (fout);
my keil version 4.6 ARM core is cortex-M0. I am using the startup_MPS_CM0.s startup file to do the work.
Thanks for help!
Not sure what you are trying to save but would LOG or SLOG save the data you need? If so, you can write a simple script to LOG the data to a file.
Then set a BreakExec at a code point where you would like to save the data. A BreakExec will fire the script but will not stop code execution.
Might this work for you? Good luck.
Bradford
Thanks for reply!
I want to save a long array into a file, this file can be .hex or .bin format. it is good to do this in the c coding.
The LOG or SLOG are the commands, similar as SAVE. can you give an example about your suggestion?
Thanks again.