Cortex_M55 and 16 region MPU support

Hi all,
When configuring FreeRTOS with (configTOTAL_MPU_REGIONS = 16), the Cortex_M55 is throwning compile errors. due to the check below.

the support for 16 regions seems to be there though.

is there any reason for that?

regards
Haithem.

Hi @rahmanih,

That restriction was put in place because the initial IAR did not support 16 MPU regions, but only 8. However, the MR Memory Protection Unit (MPU) Enhancements by kar-rahul-aws · Pull Request #705 · FreeRTOS/FreeRTOS-Kernel · GitHub added 16 MPU region support for IAR port, but it seems the restriction was not removed. Can you please try commenting this out and see if everything works as expected?

@aggarg Am I missing something?

Hi @urutva,

thanks for the prompt answer!
Indeed! just commenting out the check, the application is working correctly.

regards
Haithem.

Hi @urutva, you are exactly right. This PR addresses the issue - Remove error for 16 MPU resgion from IAR ports by aggarg · Pull Request #1149 · FreeRTOS/FreeRTOS-Kernel · GitHub.

Thank you for reporting this @rahmanih!

Hi @aggarg, @urutva
the patch works like a charm, there is one more issue though.

when compiling the IAR project with “Require prototypes” option
image
the compiler is complaining about the following APIs:

	mpu_wrappers.c			
	Error[Pa045]: function "MPU_vTaskSuspendAll" has no prototype	CM55_Project\FreeRTOS\Source\portable\Common\mpu_wrappers.c	392	
	Error[Pa045]: function "MPU_xTaskResumeAll" has no prototype	CM55_Project\FreeRTOS\Source\portable\Common\mpu_wrappers.c	412	
	Error[Pa045]: function "MPU_xTaskCatchUpTicks" has no prototype	CM55_Project\FreeRTOS\Source\portable\Common\mpu_wrappers.c	761	

these functions were removed from the mpu_prototypes.h. Do you have any suggestion how to fix this issue?

thanks and regards.

Seems like we need to add those prototypes. Let me get back to you on this.

This PR addresses this issue and some others - Update MPU prototypes by aggarg · Pull Request #1150 · FreeRTOS/FreeRTOS-Kernel · GitHub. Please let us know if it works for you.

1 Like