File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed
Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 123123 DEF += -DWOLFHSM_CFG_IS_TEST_SERVER
124124endif
125125
126+ # Test NVM Flash Log implementation
127+ DEF += -DWOLFHSM_CFG_SERVER_NVM_FLASH_LOG
128+
126129# # Source files
127130# Assembly source files
128131SRC_ASM +=
Original file line number Diff line number Diff line change 3131#include "wolfhsm/wh_error.h"
3232#include "wolfhsm/wh_nvm.h"
3333#include "wolfhsm/wh_nvm_flash.h"
34+ #include "wolfhsm/wh_nvm_flash_log.h"
3435#include "wolfhsm/wh_flash_unit.h"
3536
3637/* NVM simulator backends to use for testing NVM module */
@@ -493,7 +494,21 @@ int whTest_NvmFlash_RamSim(void)
493494 whNvmFlashContext nvmFlashCtx [1 ] = {0 };
494495 const whNvmCb nvmFlashCb [1 ] = {WH_NVM_FLASH_CB };
495496
496- return whTest_NvmFlashCfg (& myNvmCfg , nvmFlashCtx , nvmFlashCb );
497+ WH_TEST_RETURN_ON_FAIL (whTest_NvmFlashCfg (& myNvmCfg , nvmFlashCtx , nvmFlashCb ));
498+
499+ #if defined(WOLFHSM_CFG_SERVER_NVM_FLASH_LOG )
500+ whNvmFlashLogConfig myLogCfg = {
501+ .flash_cb = myCb ,
502+ .flash_ctx = myHalFlashCtx ,
503+ .flash_cfg = myHalFlashCfg ,
504+ };
505+ whNvmFlashLogContext nvmLogCtx [1 ] = {0 };
506+ const whNvmCb nvmLogCb [1 ] = {WH_NVM_FLASH_LOG_CB };
507+ WH_TEST_RETURN_ON_FAIL (whTest_NvmFlashCfg (& myLogCfg , nvmLogCtx , nvmLogCb ));
508+ #endif /* WOLFHSM_CFG_SERVER_NVM_FLASH_LOG */
509+
510+ return 0 ;
511+
497512}
498513
499514
You can’t perform that action at this time.
0 commit comments