I am trying to port FreeRTOS for STM32F446RE

signed int,  const long unsigned int,  void * const,  void (*)(struct tmrTimerControl *))'}
 3734 |         TimerHandle_t MPU_xTimerCreate( const char * const pcTimerName,
      |                       ^~~~~~~~~~~~~~~~
In file included from /home/asraful/Code/STM32/STM32F446xx/FreeRTOS/portable/Common/mpu_wrappers_v2.c:46:
/home/asraful/Code/STM32/STM32F446xx/FreeRTOS/include/mpu_prototypes.h:347:15: note: previous declaration of 'MPU_xTimerCreate' with type 'struct tmrTimerControl *(const char * const,  const TickType_t,  const BaseType_t,  void * const,  void (*)(struct tmrTimerControl *))' {aka 'struct tmrTimerControl *(const char * const,  const long unsigned int,  const long int,  void * const,  void (*)(struct tmrTimerControl *))'}
  347 | TimerHandle_t MPU_xTimerCreate( const char * const pcTimerName,
      |               ^~~~~~~~~~~~~~~~

getting this error while using the v2 wrapper

@undefined

Can you paste the full error?

Have you defined configUSE_MPU_WRAPPERS_V1 to 0 to use the new v2 MPU wrapper?

Yes I did make it 0 the thing is When I ported one without MPU it was really easy but porting one with MPU I was facing so many issue specially in linker_script after that I copied one form a demo porject. Since I was getting error related to timer configUSE_TIMERS I also made this 0

Are you able to compile after setting configUSE_TIMERS to 0 ?
Also in your initial error snippet, it shows the error as mismatch between the function declaration of MPU_xTimerCreate , in the defintion of BaseType_t
Can you check 2 things , if the issue still persists:

  1. Check the definition of MPU_xTimerCreate in mpu_wrappers_v2.c and in mpu_prototypes.h. From the error, it seems in one place we might be using UBaseType_t and in another BaseType_t
  2. Which version of FreeRTOS Kernel are you using ? If not using the latest version, can you please use this version and see if the same problems occur?

after setting configUSE_TIMERS 0 I was able to compile but and also even the scheduler starts it won’t switch task I was trying the latest version for now I switched to GCC_M4F and it is working just fine. I think GCC_M4_MPU version required some extra modification to run and I am new into FreeRTOS. That’s why facing these issues

I was trying the latest version for now; I switched to GCC_M4F and it is working just fine. I think GCC_M4_MPU version required some extra modification to run

Here is a STM32 M7 demo that uses the new MPU wrapper with the port files you initially used [Source/portable/GCC/ARM_CM4_MPU]:

You can find the STM32 Cube IDE projet file for the demo here.

How many application tasks do you have? I’d suggest to start with a very simple task:

void Task( void * params )
{
    uint32_t var;

    ( void ) params;

    for( ;; )
    {
        var = var + 1;

        vTaskDelay( pdMS_TO_TICKS( 1000 ) );
    }
}

Do not create any other task and see if you can get it running. Also, are you willing to share your complete project?