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!
Another thing to consider, is to have the program store the data you want to save into a RAM buffer or known address. Let the debugger retrieve this data and save to file. On another run, load this file and have the debugger send it to the RAM of your device.
So similar operations as when programming, or reading, the contents of the flash memory.