mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
Extending SPIFFS into last page of the SPI FLASH
This commit is contained in:
parent
825dea27a0
commit
d1db0aa799
2 changed files with 4 additions and 1 deletions
|
@ -28,6 +28,7 @@
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
#include "flashmem.h"
|
#include "flashmem.h"
|
||||||
|
#include "pmflash.h"
|
||||||
|
|
||||||
//#include <stddef.h>
|
//#include <stddef.h>
|
||||||
//#include <unistd.h>
|
//#include <unistd.h>
|
||||||
|
@ -236,7 +237,7 @@ typedef uint8_t u8_t;
|
||||||
// Instead of giving parameters in config struct, singleton build must
|
// Instead of giving parameters in config struct, singleton build must
|
||||||
// give parameters in defines below.
|
// give parameters in defines below.
|
||||||
#ifndef SPIFFS_CFG_PHYS_SZ
|
#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
|
#endif
|
||||||
#ifndef SPIFFS_CFG_PHYS_ERASE_SZ
|
#ifndef SPIFFS_CFG_PHYS_ERASE_SZ
|
||||||
#define SPIFFS_CFG_PHYS_ERASE_SZ(ignore) (4*1024)
|
#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)
|
# define FLASH_MEM_MAX_4K_SECTOR_P(p64k) (FLASH_MEM_MAX_SIZE_P(p64k) - 4096)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define FLASH_RESERVED_TRAILING_4K_SECTORS 10
|
||||||
|
|
||||||
#ifndef FLASH_MEM_ID_LEN
|
#ifndef FLASH_MEM_ID_LEN
|
||||||
# define FLASH_MEM_ID_LEN 8
|
# define FLASH_MEM_ID_LEN 8
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue