FreeRTOS 10.2.0 + MPU on TI Hercules RM48L952

Hello,

I am a university student working on a project that aims to introduce some security hardening capabilities to FreeRTOS. Currently, I am trying to set up FreeRTOS 10.2.0 with MPU on TI RM48L952 using the CCS compiler. Halcogen has an example project for FreeRTOS 9.0.0 with MPU enabled and I am using this as a reference while creating the MPU port for 10.2.0 since unfortunately there is no MPU port for this version. I was wondering if any guidance could be provided in doing this. Up until now, the main differences I’ve encountered are in the port.c file where the 9.0.0 example includes the MPU specific port functions which I have moved to my port.c of 10.2.0. It seems that 10.2.0 also contains vPortExitCritical and vPortEnterCritical in port.c while 9.0.0 does not.

I also noticed significant differences in the files portasm.asm and portmacro.h between 9.0.0 and 10.2.0, some of which include the swi functions that are present in 10.2.0, the MPU port functions in 9.0.0, and changes in asm functions such as portRESTORE_CONTEXT that involve MPU-related handling.

Regarding the standard FreeRTOS kernel source files like tasks.c I was planning to just replace the 9.0.0 files with 10.2.0.

I was wondering if there is anything specific I should pay special attention to when doing this. Any pointers, suggestions, help is appreciated!

Thank you

I think your approach is right. Since you are targeting security hardening, you should consider using the latest FreeRTOS version as it has a new MPU wrapper with several security enhancements. You should also refer to this threat model - Kernel threat model - FreeRTOS™.