mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-05-12 11:18:11 -07:00
Extending SPIFFS into last page of the SPI FLASH
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include "printf.h"
|
||||
#include "string.h"
|
||||
#include "flashmem.h"
|
||||
#include "pmflash.h"
|
||||
|
||||
//#include <stddef.h>
|
||||
//#include <unistd.h>
|
||||
@@ -236,7 +237,7 @@ typedef uint8_t u8_t;
|
||||
// Instead of giving parameters in config struct, singleton build must
|
||||
// give parameters in defines below.
|
||||
#ifndef SPIFFS_CFG_PHYS_SZ
|
||||
#define SPIFFS_CFG_PHYS_SZ(ignore) (1024 * 64 * (spi_flash_pages64k - 1))
|
||||
#define SPIFFS_CFG_PHYS_SZ(ignore) ((1024 * 64 * spi_flash_pages64k) - (1024 * 4 * (FLASH_RESERVED_TRAILING_4K_SECTORS + 1)))
|
||||
#endif
|
||||
#ifndef SPIFFS_CFG_PHYS_ERASE_SZ
|
||||
#define SPIFFS_CFG_PHYS_ERASE_SZ(ignore) (4*1024)
|
||||
|
||||
@@ -48,6 +48,8 @@
|
||||
# define FLASH_MEM_MAX_4K_SECTOR_P(p64k) (FLASH_MEM_MAX_SIZE_P(p64k) - 4096)
|
||||
#endif
|
||||
|
||||
#define FLASH_RESERVED_TRAILING_4K_SECTORS 10
|
||||
|
||||
#ifndef FLASH_MEM_ID_LEN
|
||||
# define FLASH_MEM_ID_LEN 8
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user