OpenCores
URL https://opencores.org/ocsvn/openarty/openarty/trunk

Subversion Repositories openarty

[/] [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);

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.