pcAString is a pointer to a const string, which is probably stored in Flash. The pointer contains the address of data that is in flash and is always there.
You have declared an array as a local (stack) variable within vFunctionWithQueueSend(). Once vFunctionWithQueueSend() exits the variable will no longer exist and its value in RAM will probably be overwritten during the next function call.
After thinking to understand the problem and after many trials I’m not able to pass the array in the queue like intendet in B.
If possible i want to avoid global arrays, so I have to use a local one.
I tryed to allocate dynamic memory for a pointer and copied each array element to the allocated memory, but it didn’t work.
Without using a queue I would try to call the function tranferring a pointer and work with a reference or maybe I would try a function which returns a pointer.
Since I have to use xQueueSend() and I read that the items are passed by copy, I have no ideas how to continue.
Are there any hints?
What possibilities do I have to send the array from example B threadsave to the Queue?