colognechip: fix dumpFlash: add override, remove filename param and use _filename from constructor
This commit is contained in:
parent
74790c40b6
commit
648de05e6d
|
|
@ -118,8 +118,7 @@ void CologneChip::waitCfgDone()
|
||||||
/**
|
/**
|
||||||
* Dump flash contents to file. Works in both SPI and JTAG-SPI-bypass mode.
|
* Dump flash contents to file. Works in both SPI and JTAG-SPI-bypass mode.
|
||||||
*/
|
*/
|
||||||
bool CologneChip::dumpFlash(const std::string &filename, uint32_t base_addr,
|
bool CologneChip::dumpFlash(uint32_t base_addr, uint32_t len)
|
||||||
uint32_t len)
|
|
||||||
{
|
{
|
||||||
if (_spi) {
|
if (_spi) {
|
||||||
/* enable output and hold reset */
|
/* enable output and hold reset */
|
||||||
|
|
@ -142,7 +141,7 @@ bool CologneChip::dumpFlash(const std::string &filename, uint32_t base_addr,
|
||||||
}
|
}
|
||||||
flash->reset();
|
flash->reset();
|
||||||
flash->power_up();
|
flash->power_up();
|
||||||
flash->dump(filename, base_addr, len);
|
flash->dump(_filename, base_addr, len);
|
||||||
} catch (std::exception &e) {
|
} catch (std::exception &e) {
|
||||||
printError("Fail");
|
printError("Fail");
|
||||||
printError(std::string(e.what()));
|
printError(std::string(e.what()));
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ class CologneChip: public Device, SPIInterface {
|
||||||
|
|
||||||
bool cfgDone();
|
bool cfgDone();
|
||||||
void waitCfgDone();
|
void waitCfgDone();
|
||||||
bool dumpFlash(const std::string &filename, uint32_t base_addr, uint32_t len);
|
bool dumpFlash(uint32_t base_addr, uint32_t len) override;
|
||||||
virtual bool protect_flash(uint32_t len) override {
|
virtual bool protect_flash(uint32_t len) override {
|
||||||
(void) len;
|
(void) len;
|
||||||
printError("protect flash not supported"); return false;}
|
printError("protect flash not supported"); return false;}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue