|
61 | 61 | #define REPEAT_COUNT 10 |
62 | 62 | #define ONE_MS 1000 |
63 | 63 | #define FLASH_RAM_SIZE (1024 * 1024) /* 1MB */ |
| 64 | +#define FLASH_SECTOR_SIZE (128 * 1024) /* 128KB */ |
| 65 | +#define FLASH_PAGE_SIZE (8) /* 8B */ |
64 | 66 |
|
65 | 67 | #ifdef WOLFHSM_CFG_DMA |
66 | 68 | #define DMA_TEST_MEM_NWORDS 3 |
@@ -708,12 +710,14 @@ int whTest_ClientServerSequential(void) |
708 | 710 | }}; |
709 | 711 |
|
710 | 712 | /* RamSim Flash state and configuration */ |
| 713 | + uint8_t memory[FLASH_RAM_SIZE] = {0}; |
711 | 714 | whFlashRamsimCtx fc[1] = {0}; |
712 | 715 | whFlashRamsimCfg fc_conf[1] = {{ |
713 | | - .size = 1024 * 1024, /* 1MB Flash */ |
714 | | - .sectorSize = 128 * 1024, /* 128KB Sector Size */ |
715 | | - .pageSize = 8, /* 8B Page Size */ |
| 716 | + .size = FLASH_RAM_SIZE, /* 1MB Flash */ |
| 717 | + .sectorSize = FLASH_SECTOR_SIZE, /* 128KB Sector Size */ |
| 718 | + .pageSize = FLASH_PAGE_SIZE, /* 8B Page Size */ |
716 | 719 | .erasedByte = ~(uint8_t)0, |
| 720 | + .memory = memory, |
717 | 721 | }}; |
718 | 722 | const whFlashCb fcb[1] = {WH_FLASH_RAMSIM_CB}; |
719 | 723 |
|
@@ -1734,12 +1738,14 @@ static int wh_ClientServer_MemThreadTest(void) |
1734 | 1738 | }}; |
1735 | 1739 |
|
1736 | 1740 | /* RamSim Flash state and configuration */ |
| 1741 | + uint8_t memory[FLASH_RAM_SIZE] = {0}; |
1737 | 1742 | whFlashRamsimCtx fc[1] = {0}; |
1738 | 1743 | whFlashRamsimCfg fc_conf[1] = {{ |
1739 | 1744 | .size = FLASH_RAM_SIZE, |
1740 | 1745 | .sectorSize = FLASH_RAM_SIZE/2, |
1741 | 1746 | .pageSize = 8, |
1742 | 1747 | .erasedByte = (uint8_t)0, |
| 1748 | + .memory = memory, |
1743 | 1749 | }}; |
1744 | 1750 | const whFlashCb fcb[1] = {WH_FLASH_RAMSIM_CB}; |
1745 | 1751 |
|
@@ -1825,12 +1831,14 @@ static int wh_ClientServer_PosixMemMapThreadTest(void) |
1825 | 1831 | }}; |
1826 | 1832 |
|
1827 | 1833 | /* RamSim Flash state and configuration */ |
| 1834 | + uint8_t memory[FLASH_RAM_SIZE] = {0}; |
1828 | 1835 | whFlashRamsimCtx fc[1] = {0}; |
1829 | 1836 | whFlashRamsimCfg fc_conf[1] = {{ |
1830 | 1837 | .size = FLASH_RAM_SIZE, |
1831 | 1838 | .sectorSize = FLASH_RAM_SIZE / 2, |
1832 | 1839 | .pageSize = 8, |
1833 | 1840 | .erasedByte = (uint8_t)0, |
| 1841 | + .memory = memory, |
1834 | 1842 | }}; |
1835 | 1843 | const whFlashCb fcb[1] = {WH_FLASH_RAMSIM_CB}; |
1836 | 1844 |
|
|
0 commit comments