micro-ROS / micro-ROS/micro_ros_setup

rclc_support_init is corrupting FreeRTOS Heap

Open
#657 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
509
Forks
183
Avg merge
22h 26m
Merged PRs (30d)
7

Description

## Issue template

- Hardware description: STM32L4
- RTOS: FreeRTOS
- Installation type: standard
- Version or commit hash: humble

#### Steps to reproduce the issue
I created a FreeRTOS heap with 16kByte and a 'Standard Task' with 12000 Bytes. Additionally I created 2 binary Semaphores.

#### Expected behavior
Semaphores stay as they are, completely independent of the micro ROS function cals
#### Actual behavior
in the function call rclc_support_init it seems that the FreeRTOS Heap gets corrupted and the semaphores get affected. Maybe other FreeRTOS elements as well
![beforeCorruption](https://github.com/micro-ROS/micro_ros_setup/assets/135316308/ce9e8a43-0a31-497d-825a-44abff95f8b3)

#### Additional information

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue on STM32L4 with FreeRTOS using a 16 kB heap, a 12,000-byte Standard Task, and two binary semaphores. Compare the semaphore state before and after rclc_support_init; done means identifying and preventing the heap corruption without affecting the semaphores.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.