Hi @HugPeter-9392 That is the preferred way to do it - have the module create a queue and share a pointer to that queue with the resident application. Any object (e.g. a queue) that a module creates will be allocated from the pool created by txm_module_manager_object_pool_create
. Modules must use txm_module_object_allocate((void*)&queue_0, sizeof(TX_QUEUE));
to allocate the queue object. The queue buffer also needs to reside either in the module's data region or in a shared memory region, otherwise ThreadX will return an error. Alternatively, the resident application can create a queue and the module can use txm_module_object_pointer_get_extended
to get a pointer to the queue for sending and receiving messages. This also applies to your last question about inter-module communication, one module can create a queue and the other can use txm_module_object_pointer_get_extended
to get a pointer to that queue. See attachment for a module-module example. demo_module1.txt
Regarding TrustZone, ARM and Microsoft recommend running the RTOS and user application in non-secure space. Queues and their buffers would need to be created in non-secure space.