imc_kernel.h 822 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef INC_IMC_IMC_KERNEL_H_
  2. #define INC_IMC_IMC_KERNEL_H_
  3. #ifndef imcUSE_IMC_KERNEL
  4. #define imcUSE_IMC_KERNEL 1
  5. #endif
  6. #ifndef imcCHECKPOINT_PASS_COUNT
  7. #define imcCHECKPOINT_PASS_COUNT 100
  8. #endif
  9. #define imcSTM32_CUBE_IDE 0
  10. #define imcMAX_NUM_TASKS 2
  11. #define imcSTACK_SIZE (4096)
  12. #define IMC_GLOBAL __attribute__((section(".imc_global")))
  13. #define portSVC_IMC_REQUEST_CHECKPOINT 6
  14. #define imcREQUEST_CHECKPOINT() \
  15. { \
  16. __asm(" svc #6"); \
  17. }
  18. #include "cmsis_os.h"
  19. void imcInit();
  20. osThreadId_t imcOsThreadNew(osThreadFunc_t func, void *argument, const osThreadAttr_t *attr);
  21. int needCheckpointExecution();
  22. extern int checkpointCounter;
  23. extern const int checkpoint_pass_count;
  24. #ifndef imcUSE_IMC_EXTENSION
  25. #define imcUSE_IMC_EXTENSION 0
  26. #endif
  27. #endif