int main()
{
static StaticTask_t DummyTaskTCBBuffer;
static StackType_t DummyTaskStackBuffer[dummy_TASK_STACK_SIZE];
Std_ReturnType RetVal;
/* Hardware board initialization */
HwBoardInit();
xTaskCreateStatic(DummyTask, /* The function that implements the task being created. */
(const char * const) "DummyTask", /* Text name for the task - not used by the RTOS, its just to assist debugging. */
dummy_TASK_STACK_SIZE, /* Size of the buffer passed in as the stack - in words, not bytes! */
NULL, /* Parameter passed into the task - not used in this case. */
dummy_TASK_PRIORITY, /* Priority of the task. */
DummyTaskStackBuffer, /* The buffer to use as the task's stack. */
&DummyTaskTCBBuffer); /* The variable that will hold the task's TCB. */
#pragma default_variable_attributes = @ ".mcal_data_no_cacheable"
static uint8_t au8GeneratedRandomNumber[UDS_RANDOM_NUMBER_SIZE] = {0};
static uint32_t u32RandomNumberSz16 = 16;
/** Job TRNG ID and priority */
static Crypto_JobInfoType AppJobTrngInfo = {SEC_JOB_TRNG_ID, SEC_JOB_TRNG_PRIORITY};
static Crypto_PrimitiveInfoType AppTrngPrimitiveInfo = {
16,
CRYPTO_RANDOMGENERATE,
{CRYPTO_ALGOFAM_RNG, CRYPTO_ALGOFAM_NOT_SET, 16, (Crypto_AlgorithmModeType) CRYPTO_ALGOMODE_CUSTOM_DRBG_RS}
};
/** Structure which contains further information on True Random Number Generator Job */
static Crypto_JobPrimitiveInfoType AppJobTrngPrimitiveInfo = {0U, &AppTrngPrimitiveInfo, 0U, CRYPTO_PROCESSING_SYNC, FALSE};
/** Structure of the job to be passed to Crypto driver, request true random number from TRNG module */
static Crypto_JobType AppJobTrng = {
SEC_JOB_TRNG_ID,
CRYPTO_JOBSTATE_IDLE,
{
NULL_PTR, 0,
NULL_PTR, 0U,
NULL_PTR, 0U,
au8GeneratedRandomNumber, &u32RandomNumberSz16,
NULL_PTR, NULL_PTR,
0U, NULL_PTR,
NULL_PTR, CRYPTO_OPERATIONMODE_SINGLECALL,
0U, 0U,
},
&AppJobTrngPrimitiveInfo,
&AppJobTrngInfo,
NULL_PTR,
};
#pragma default_variable_attributes =
Crypto_ProcessJob(CryptoConf_CryptoDriverObject_CryptoDriverObject_1, &AppJobTrng);
vTaskStartScheduler();
for (;;)
{
}
return 0;
}