Using unique_ptr in FreeRTOS
Overview:
In relation to the message queue:

Since you are doing a manual new and delete that seems a bit of a waste.
Also the only thing you are creating is a unique_ptr.
The unique_ptr is never in stored correctly typed so it never does any work.

So I would not store a pointer to a std::unique_ptr I would just store the original pointer. I like the idea of passing in and retrieving a unique_ptr to the access function.

Why are you passing a pointer to CommandMessage? It can't be null (you never check so must be valid. To make this more formal pass by reference to indicate to the user that it should be a normal object.
void setTestMessage(CommandMessage *testMsg, uint8_t someResource)
std::unique_ptr&lt;DummyHelper&gt; getUniquePtr(CommandMessage *testMsg)

// I would do this:

void setTestMessage(CommandMessage&amp; testMsg, uint8_t someResource)
std::unique_ptr&lt;DummyHelper&gt; getUniquePtr(CommandMessage&amp; testMsg)

Note: Putting the '*' on the right by the variable is very &quot;C&quot; like. C++ considers this part of the type information so it is usually on the left with the type.

Why is the input message different from the output message?
void setTestMessage(CommandMessage *testMsg, uint8_t someResource)
std::unique_ptr&lt;DummyHelper&gt; getUniquePtr(CommandMessage *testMsg)

So input is a uint8_t but the output is std::unique_ptr&lt;DummyHelper&gt;? I would expect the interface to be symmetric.
template&lt;typename T&gt;
void sendMessage(CommandMessage&amp; messageStream, std::unique_ptr&lt;T&gt;&amp;&amp; msg);

template&lt;typename T&gt;
std::unique_ptr&lt;T&gt; recvMessage(CommandMessage&amp; messageStream);


template&lt;typename T&gt;
std::unique_ptr&lt;T&gt; recvMessage(CommandMessage&amp; messageStream)
{
   // To store pointers in an integer type you should be using `std::intptr_t`
   // This is an int type that is guaranteed large enough to store a pointer.
   // Don't make the assumption that `uint64_t` is large enough.
   // It might be but that is not guaranteed for the future.
   std::intptr_t raw_ptr = messageStream.getParameter();

   return reinterpret_cast&lt;T*&gt;(raw_ptr);
}


template&lt;typename T&gt;
void sendMessage(CommandMessage&amp; messageStream, std::unique_ptr&lt;T&gt;&amp;&amp; msg)
{
    messageStream.setParameter(msg.release());
}