Skip to content

Network: add FreeRTOS support#140

Merged
RobertRostohar merged 2 commits intomainfrom
net_dev
Apr 13, 2026
Merged

Network: add FreeRTOS support#140
RobertRostohar merged 2 commits intomainfrom
net_dev

Conversation

@furbanc
Copy link
Copy Markdown
Collaborator

@furbanc furbanc commented Apr 9, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds FreeRTOS support to the Network component’s CMSIS-RTOS2 abstraction by extending the static control-block/stack allocation setup beyond RTX5.

Changes:

  • Introduces RTOS-specific type aliases for thread/mutex/semaphore/timer control blocks (RTX5 vs FreeRTOS) and a shared __STATIC_ALLOC path.
  • Updates core and interface resource declarations to use the generic __*_T aliases when static allocation is enabled.
  • Adjusts mutex attribute flags to omit osMutexRobust when building for FreeRTOS.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Components/Network/Source/net_rtos2.h Outdated
Comment thread Components/Network/Source/net_rtos2.h Outdated
Copy link
Copy Markdown
Collaborator

@RobertRostohar RobertRostohar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not go for static allocation for FreeRTOS objects. Including "FreeRTOS.h" might have unwanted sight effects. Also other MDK-Middleware components only allocate static memory for RTX5.

We should just keep the handling osMutexRobust attribute (using #ifdef RTE_CMSIS_RTOS2_RTX5)

@furbanc furbanc requested a review from RobertRostohar April 13, 2026 09:50
@RobertRostohar RobertRostohar merged commit 71bc347 into main Apr 13, 2026
3 checks passed
@RobertRostohar RobertRostohar deleted the net_dev branch April 13, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants