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

Subversion Repositories openarty

[/] [openarty/] [trunk/] [sw/] [host/] [dumpflash.cpp] - Diff between revs 14 and 18

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 14 Rev 18
Line 53... Line 53...
        m_fpga->kill();
        m_fpga->kill();
        exit(0);
        exit(0);
}
}
 
 
// #define      DUMPMEM         RAMBASE
// #define      DUMPMEM         RAMBASE
 
////////////////////////////////////////////////////////////////////////////////
 
//
 
// Filename:    dumpflash.cpp
 
//
 
// Project:     OpenArty, an entirely open SoC based upon the Arty platform
 
//
 
// Purpose:     The purpose of this program is to read the entire flash memory,
 
//              and dump it to a file.
 
//
 
//
 
// Creator:     Dan Gisselquist, Ph.D.
 
//              Gisselquist Technology, LLC
 
//
 
////////////////////////////////////////////////////////////////////////////////
 
//
 
// Copyright (C) 2015-2016, Gisselquist Technology, LLC
 
//
 
// This program is free software (firmware): you can redistribute it and/or
 
// modify it under the terms of  the GNU General Public License as published
 
// by the Free Software Foundation, either version 3 of the License, or (at
 
// your option) any later version.
 
//
 
// This program is distributed in the hope that it will be useful, but WITHOUT
 
// ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
 
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 
// for more details.
 
//
 
// You should have received a copy of the GNU General Public License along
 
// with this program.  (It's in the $(ROOT)/doc directory, run make with no
 
// target there if the PDF file isn't present.)  If not, see
 
// <http://www.gnu.org/licenses/> for a copy.
 
//
 
// License:     GPL, v3, as defined and found on www.gnu.org,
 
//              http://www.gnu.org/licenses/gpl.html
 
//
 
//
 
////////////////////////////////////////////////////////////////////////////////
 
//
 
//
// #define      DUMPWORDS       MEMWORDS
// #define      DUMPWORDS       MEMWORDS
 
 
#define DUMPMEM         EQSPIFLASH
#define DUMPMEM         EQSPIFLASH
#define DUMPWORDS       FLASHWORDS      // 1MB Flash
#define DUMPWORDS       FLASHWORDS      // 1MB Flash
 
 
int main(int argc, char **argv) {
int main(int argc, char **argv) {
        FILE    *fp;
        FILE    *fp;
        const int       BUFLN = MEMWORDS; // 1MB Flash
        const int       BUFLN = FLASHWORDS;
        FPGA::BUSW      *buf = new FPGA::BUSW[BUFLN];
        FPGA::BUSW      *buf = new FPGA::BUSW[BUFLN];
 
 
        FPGAOPEN(m_fpga);
        FPGAOPEN(m_fpga);
        fprintf(stderr, "Before starting, nread = %ld\n",
        fprintf(stderr, "Before starting, nread = %ld\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.