|
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 |
@@ -534,12 +536,14 @@ int whTest_ClientServerSequential(void) |
534 | 536 | }}; |
535 | 537 |
|
536 | 538 | /* RamSim Flash state and configuration */ |
| 539 | + uint8_t memory[FLASH_RAM_SIZE] = {0}; |
537 | 540 | whFlashRamsimCtx fc[1] = {0}; |
538 | 541 | whFlashRamsimCfg fc_conf[1] = {{ |
539 | | - .size = 1024 * 1024, /* 1MB Flash */ |
540 | | - .sectorSize = 128 * 1024, /* 128KB Sector Size */ |
541 | | - .pageSize = 8, /* 8B Page Size */ |
| 542 | + .size = FLASH_RAM_SIZE, /* 1MB Flash */ |
| 543 | + .sectorSize = FLASH_SECTOR_SIZE, /* 128KB Sector Size */ |
| 544 | + .pageSize = FLASH_PAGE_SIZE, /* 8B Page Size */ |
542 | 545 | .erasedByte = ~(uint8_t)0, |
| 546 | + .memory = memory, |
543 | 547 | }}; |
544 | 548 | const whFlashCb fcb[1] = {WH_FLASH_RAMSIM_CB}; |
545 | 549 |
|
@@ -1556,12 +1560,14 @@ static int wh_ClientServer_MemThreadTest(void) |
1556 | 1560 | }}; |
1557 | 1561 |
|
1558 | 1562 | /* RamSim Flash state and configuration */ |
| 1563 | + uint8_t memory[FLASH_RAM_SIZE] = {0}; |
1559 | 1564 | whFlashRamsimCtx fc[1] = {0}; |
1560 | 1565 | whFlashRamsimCfg fc_conf[1] = {{ |
1561 | 1566 | .size = FLASH_RAM_SIZE, |
1562 | 1567 | .sectorSize = FLASH_RAM_SIZE/2, |
1563 | 1568 | .pageSize = 8, |
1564 | 1569 | .erasedByte = (uint8_t)0, |
| 1570 | + .memory = memory, |
1565 | 1571 | }}; |
1566 | 1572 | const whFlashCb fcb[1] = {WH_FLASH_RAMSIM_CB}; |
1567 | 1573 |
|
@@ -1647,12 +1653,14 @@ static int wh_ClientServer_PosixMemMapThreadTest(void) |
1647 | 1653 | }}; |
1648 | 1654 |
|
1649 | 1655 | /* RamSim Flash state and configuration */ |
| 1656 | + uint8_t memory[FLASH_RAM_SIZE] = {0}; |
1650 | 1657 | whFlashRamsimCtx fc[1] = {0}; |
1651 | 1658 | whFlashRamsimCfg fc_conf[1] = {{ |
1652 | 1659 | .size = FLASH_RAM_SIZE, |
1653 | 1660 | .sectorSize = FLASH_RAM_SIZE / 2, |
1654 | 1661 | .pageSize = 8, |
1655 | 1662 | .erasedByte = (uint8_t)0, |
| 1663 | + .memory = memory, |
1656 | 1664 | }}; |
1657 | 1665 | const whFlashCb fcb[1] = {WH_FLASH_RAMSIM_CB}; |
1658 | 1666 |
|
|
0 commit comments