Just for info:
armclang optimizes memcpy() in a weird way (seen for ARMv7e-M), not respecting the order of access.
So a memcpy(RBAR, mputable,...) failes :(
Ronan Synnott said:They also suggested the 'Optimizing the MPU programming' section of the below blog:
He uses memcpy(). The reason for aliasing rabr and rasr was to allow memcpy to quickly program up to four regions.