Please let me summarize.
1) Two functions SetVal and GetVal are declared in the CM4 firmware.
2) The function GetVal is called from the CM0 firmware.
In this case, there is a problem that it is not possible to call a function for CM4 from CM0.
If you want to use a common storage area from CM0 and CM4, please use the Inter Processor Communication (IPC) module. Please refer following documents.