#include "cmsis_os.h" #include "ImC/imc_kernel.h" #include "ImC/imc_extension.h" #include void vBenchmarkDriver(void *_benchmark) { void (*benchmark)(void) = _benchmark; #if (imcBENCH_INFINITE_LOOP) while(1) { #endif portDISABLE_INTERRUPTS(); printf("Start benchmark\r\n"); portENABLE_INTERRUPTS(); benchmark(); #if(imcPRINT_STATS) portDISABLE_INTERRUPTS(); printf("(STAT) checkpoint triggered: %d\r\n", imc_checkpoint_triggered); printf("(STAT) checkpoint executed: %d\r\n", imc_checkpoint_executed); portENABLE_INTERRUPTS(); imc_checkpoint_triggered = 0; imc_checkpoint_executed = 0; #endif portDISABLE_INTERRUPTS(); printf("End benchmark\r\n"); portENABLE_INTERRUPTS(); imcREQUEST_CHECKPOINT(); #if (imcBENCH_INFINITE_LOOP) // osDelay(10); } #endif #if (imcUSE_IMC_KERNEL == 1) vImcInvalidateRecovery(); #endif }