mirror of
https://github.com/trabucayre/openFPGALoader.git
synced 2026-08-30 09:59:03 +02:00
efinix: fix dumpFlash: add override, remove filename param and use _filename from constructor
This commit is contained in:
+2
-3
@@ -143,8 +143,7 @@ void Efinix::program(unsigned int offset, bool unprotect_flash)
|
||||
programSPI(offset, data, length, unprotect_flash);
|
||||
}
|
||||
|
||||
bool Efinix::dumpFlash(const std::string &filename,
|
||||
uint32_t base_addr, uint32_t len)
|
||||
bool Efinix::dumpFlash(uint32_t base_addr, uint32_t len)
|
||||
{
|
||||
uint32_t timeout = 1000;
|
||||
_spi->gpio_clear(_rst_pin);
|
||||
@@ -155,7 +154,7 @@ bool Efinix::dumpFlash(const std::string &filename,
|
||||
SPIFlash flash(reinterpret_cast<SPIInterface *>(_spi), false, _verbose);
|
||||
flash.reset();
|
||||
flash.power_up();
|
||||
flash.dump(filename, base_addr, len);
|
||||
flash.dump(_filename, base_addr, len);
|
||||
} catch (std::exception &e) {
|
||||
printError("Fail");
|
||||
printError(std::string(e.what()));
|
||||
|
||||
+1
-2
@@ -26,8 +26,7 @@ class Efinix: public Device {
|
||||
~Efinix();
|
||||
|
||||
void program(unsigned int offset, bool unprotect_flash) override;
|
||||
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 {
|
||||
(void) len;
|
||||
printError("protect flash not supported"); return false;}
|
||||
|
||||
Reference in New Issue
Block a user