micro-ROS / micro-ROS/micro_ros_stm32cubemx_utils
UCLIENT_PROFILE_MULTITHREAD not working for FreeRTOS
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 275
- Forks
- 100
- PR merge metrics
- No merged PRs in 30d
Description
After generating the micro ros library with the multithread flag enabled (and adding the FreeRTOS headers to the compile search path) I realized that my application is broken. It seems to me that at least the custom transport for writing data to the host is not working properly. The data structure for the belong DMA receive channel is not initialized and the transmit doesn't seem to be correct (see screenshot on the right hand side).

If I use a non multithread version of the micro ros library the exact same position in the code (and also in the execution order) looks like:

From previous experience I assume that something is going wrong in allocating the memory for the protecting semaphores that are used in the ROS2 or DDS layers.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the generated multithread and non-multithread configurations, focusing on the custom transport's DMA receive initialization, transmit path, and protecting semaphore allocation. Done means the FreeRTOS multithread application initializes the transport correctly and writes data to the host as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100