micro-ROS / micro-ROS/micro_ros_stm32cubemx_utils
Issue with rclc_support_init() on STM32H743ZI using FreeRTOS 10.3.1
- Dominant language
- C
- Stars
- 275
- Forks
- 100
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I'm encountering a similar issue as described in tickets #116 and #107 while working with an STM32H743ZI2. Specifically, the problem lies with the rclc_support_init() function, which does not appear to be functioning correctly. I've configured the settings in line with those mentioned in ticket #116.
The issue manifests as follows: after calling the rclc_support_init() function, the MCU exits the Task function but fails to return. When halting the debugger at various points, I've observed that the FreeRTOS functions vTaskSwitchContext() and vPortExitCritical() are being invoked.
It's worth noting that on another STM32 MCU using an older version of FreeRTOS (10.2.1), there were no issues. However, the STM32H743ZI2 MCU comes with FreeRTOS 10.3.1 as the default from MXCube. Since I managed to get micro-ROS working on a similar MCU I am quite certain I followed the right steps. I however suspect something changed in versions or there is some hardware incompatibility. It is mentioned that micro-ROS is compatible with the STM32H743ZI, so I am curious which versions/setup is used to make this work.
This problem appears to be a recurring issue that has been reported multiple times. The most recent suggested solution (#116) involves modifying the allocator functions, but this solution lacks clarity and hasn't resolved the problem for me.
I have attempted to use custom functionsi instead of the microros_xx functions by using the standard C malloc, free, realloc and calloc without improvement.
Also the FreeRTOS pvPortMalloc and vPortFree functions were attempted, but does not solve the problem.
When running the micro-ROS agent no sign of connection can be seen and no session is established, as is the case with my other MCU. The USB is connected since /dev/ttyACM0 is detected.
It's also worth noting that ticket #107 does not contain any suggestions on how to address this problem.
I would greatly appreciate any assistance or suggestions that could help me address this issue conclusively. Thank you in advance for your help.
Contributor guide
Research direction
Start by reviewing the related issues #116 and #107, then trace the rclc_support_init() call in the STM32H743ZI FreeRTOS 10.3.1 setup. Compare it with the working STM32 and FreeRTOS 10.2.1 configuration, including the allocator attempts and debugger behavior. Done means identifying a reproducible cause and documenting a confirmed setup or fix that establishes a micro-ROS agent session.
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