When using freeRTOS-MPU port, how does a user mode task access static variables/global variables if it could only access its stack?

Hi guys

When I was reading “Using_FreeRTOS_MPU_Chapter_LPC17xx.pdf”, I notice the following description. My questions is that if the running task only could access to its stack and no access to other RAM when this task is configured as user mode, then can this task still access to global variables or static variables ? For eg, there is a static variable called led_blink_status defined in led.c, and LED task needs to read and write led_blink_status.

Predefined Regions and Task Definable Regions
Regions zero to four are used by the kernel to pre-configure a usable run time environment
where:
 The Running state task has access to its own stack, but all other RAM is accessible
only when the LPC17xx is running in Privileged mode.

No, it cannot access global variables by default. You need to explicitly grant access at the time of task creation. Here is an example - FreeRTOS/FreeRTOS/Demo/Common/ARMv8M/mpu_demo/mpu_demo.c at main · FreeRTOS/FreeRTOS · GitHub.