You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's been a while since I looked at this code, but I think your understanding of the intent is correct. But we never tested any of this beyond and M0 (stm32l0 to be precise) so there could easily be nuances per platform that were neglected.
Perhaps you could try other regions/boundaries? I forget what the rules were for the ARM MPU and if they change much per M0-M4, but it could hopefully be just a memory boundary nuance? Perhaps your current base is not at a good place for enabling MPU?
After doing some tests on an STM32F4, I think I can explain this.
The access permissions (when using the configure_unprivileged function) do not apply to privileged code. This example is all privileged code because it never switches to unprivileged mode. Therefore, the MPU configuration code in this example does not block any memory reads or writes.
I have a pull request that adds some functions to restrict reads and writes from privileged code.
I have some problems getting it working, but maybe I am just using it wrong.
I have a STM32F411 Nucleo board, so MPU should be supported to my understanding.
I set it up like this:
My expectation would be, that the point of "Whoopsie" is never reached. And it calls into the
fn MemoryManagement
instead.However, the code just runs past that point.
The text was updated successfully, but these errors were encountered: