mirror of https://github.com/FOME-Tech/fome-fw.git
simulator crash fix #101
This commit is contained in:
parent
49fb17718c
commit
fd98124304
|
@ -17,6 +17,7 @@
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "chprintf.h"
|
#include "chprintf.h"
|
||||||
#include "rusEfiFunctionalTest.h"
|
#include "rusEfiFunctionalTest.h"
|
||||||
|
#include "flash_int.h"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
@ -213,11 +214,13 @@ static std::string makeFileName(flashaddr_t addr) {
|
||||||
return ss.str();
|
return ss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
int intFlashErase(flashaddr_t address, size_t size) {
|
int intFlashErase(flashaddr_t address, size_t) {
|
||||||
// Try to delete the file, swallow any errors (we can overwrite it anyway)
|
// Try to delete the file, swallow any errors (we can overwrite it anyway)
|
||||||
try {
|
try {
|
||||||
std::filesystem::remove(makeFileName(address));
|
std::filesystem::remove(makeFileName(address));
|
||||||
} catch (...) { }
|
} catch (...) { }
|
||||||
|
|
||||||
|
return FLASH_RETURN_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
int intFlashRead(flashaddr_t address, char* buffer, size_t size) {
|
int intFlashRead(flashaddr_t address, char* buffer, size_t size) {
|
||||||
|
|
Loading…
Reference in New Issue