This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

HalCoGen FreeRTOS wrappers missing?

Other Parts Discussed in Thread: HALCOGEN

Hi

I would like to use the FreeRTOS TaskNotify functions and find that those wrappers are missing from the HalCoGen generated code. Is it possible to add user code sections in the files?

It would be really nice to include something like this in the os_mpu_wrappers.c:

/* USER CODE BEGIN */

BaseType_t MPU_ulTaskNotifyTake( BaseType_t xClearCountOnExit, TickType_t xTicksToWait )
{
BaseType_t xReturn;
BaseType_t xRunningPrivileged = prvRaisePrivilege();
xReturn = ulTaskNotifyTake(xClearCountOnExit, xTicksToWait);
portRESET_PRIVILEGE( xRunningPrivileged );
return xReturn;
}

/* USER CODE END */

The section above will be wiped when generating new code. 

Even better would be if the HalCoGen team took the time to add all wrappers or add User Code sections like in the non FreeRTOS generated code.

Please also remove the "xReturn =" found in os_mpu_wrappers.c line 609.

Best Regards

Henrik

  • Hello Henrik:

    I am investigating your comments and will get back to you on my findings.
  • Hi Henrik,

    HALCoGen team is notified with your concern. 

    Meanwhile, instead of adding your wrapper function to os_mpu_wrapper.c, I would advise to create new files say "os_mpu_wrapper_missed.c" and "os_mpu_wrapper_missed.h" and add your implemented functions. You can add this along with the HALCoGen files in the CCS project ( or which ever tool you use). This way you do not loose the contents every time you regenerate HALCoGen code.