How does FreeRTOS handle a task attempting to write to an address it’s not holding a permission for?
Is the task terminated, is there some hook to be notified of such a violation?
It depends on that hardware you are using. The hardware triggers a either a MemManage Fault or Hard Fault - You can use the handlers for those faults to be notified of these violations.
Our MPU demos for ARMv8M show how to handle such access violations and recover from them:
- https://www.freertos.org/RTOS-Cortex-M33-Keil-Simulator.html
- https://freertos.org/RTOS-Cortex-M33-LPC55S69-MCUXpresso-GCC.html
- https://www.freertos.org/RTOS-Cortex-M23-NuMaker-PFM-M2351-Keil.html
Thanks.