Commit 20e1cc91 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

wrcore_v2: genraminit modified for new dpram initializing function

parent 1d173574
......@@ -3,19 +3,24 @@
main(int argc, char *argv[])
{
if(argc < 3) return -1;
FILE *f = fopen(argv[1],"rb");
if(!f) return -1;
unsigned char x[4];
int i=0;
int n = atoi(argv[2]);
while(!feof(f))
{
fread(x,1,4,f);
printf("write %x %02X%02X%02X%02X\n", i++, x[0], x[1], x[2], x[3]);
}
fclose(f);
return 0;
}
\ No newline at end of file
if(argc < 3) return -1;
FILE *f = fopen(argv[1],"rb");
if(!f) return -1;
unsigned char x[4];
int i=0;
int n = atoi(argv[2]);
while(!feof(f))
{
fread(x,1,4,f);
printf("write %x %02X%02X%02X%02X\n", i++, x[0],x[1],x[2],x[3]);
}
for(;i<n;)
{
printf("write %x %02X%02X%02X%02X\n", i++, 0,0,0,0);
}
fclose(f);
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment