Handling MPU violations

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:

Thanks.