Global variable and freetos

The only other thing that I want to add here is that you need to ensure that every memory region that you are granting a task access to satisfies hardware requirements such as size and alignment. For example, Cortex-M33 requires that minimum MPU region size is 32 bytes and every region is 32 bytes aligned. As a result, you cannot grant access to only one integer on a Cortex-M33. See this example how we allocate 32 bytes even though we use only one so that we control access to this region.

1 Like