Using MPU feature of Cortex M3 with FreeRTOS

owaisfazal wrote on Monday, October 07, 2013:

Hello, I have just started working with FreeRTOS using Arduino DUE as a testing platform. I have read about the MPU feature and how it can be used to protect memory regions. However, it is a bit unclear as to what has to be defined in the normal FreeRTOS source files to use the MPU feature. Secondly, I have read through several posts that FreeRTOS only supports MPU for M3 architecture, can it also be used for M4 as well?
Regards.

rtel wrote on Monday, October 07, 2013:

If your M4 has no FPU, or if it has an FPU but the FPU is never enabled or used, then you can use the same code.

The MPU port is separate to the non-MPU port though.

The non MPU port layer is in \FreeRTOS\Source\portable\GCC\ARM_CM3
The MPU port layer is in \FreeRTOS\Source\portable\GCC\ARM_CM3_MPU

Regards.