URL
https://opencores.org/ocsvn/openarty/openarty/trunk
[/] [openarty/] [trunk/] [sw/] [host/] [dumpflash.cpp] - Diff between revs 4 and 14
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 4 |
Rev 14 |
Line 93... |
Line 93... |
while((sz>0)&&(buf[sz] == 0xffffffff))
|
while((sz>0)&&(buf[sz] == 0xffffffff))
|
sz--;
|
sz--;
|
sz+=1;
|
sz+=1;
|
printf("The size of the buffer is 0x%06x or %d words\n", sz, sz);
|
printf("The size of the buffer is 0x%06x or %d words\n", sz, sz);
|
|
|
fp = fopen("eqspidump.bin","w");
|
#define FLASHFILE "eqspidump.bin"
|
|
|
|
if (access(FLASHFILE, F_OK)==0) {
|
|
fprintf(stderr, "Cowardly refusing to overwrite %s\n", FLASHFILE);
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
|
|
fp = fopen(FLASHFILE,"w");
|
fwrite(buf, sizeof(buf[0]), sz, fp);
|
fwrite(buf, sizeof(buf[0]), sz, fp);
|
fclose(fp);
|
fclose(fp);
|
|
|
printf("The read was accomplished in %ld bytes over the UART\n",
|
printf("The read was accomplished in %ld bytes over the UART\n",
|
m_fpga->m_total_nread);
|
m_fpga->m_total_nread);
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.