Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add static allocation of RTOS objects for CMSIS-RTOSv2 API port #75626

Open
utsavm9 opened this issue Jul 8, 2024 · 1 comment
Open

Add static allocation of RTOS objects for CMSIS-RTOSv2 API port #75626

utsavm9 opened this issue Jul 8, 2024 · 1 comment
Labels
area: Portability Standard compliant code, toolchain abstraction RFC Request For Comments: want input from the community

Comments

@utsavm9
Copy link

utsavm9 commented Jul 8, 2024

Introduction

When creating Zephyr RTOS objects like mutex, timers or message queues via CMSIS-RTOSv2 API, there are two options for the users to choose - dynamic allocation or RTOS implementation-specific static allocation. Dynamic allocation is what's currently supported by Zephyr portability layer with static allocation left unimplemented.

Problem description

It is a hassle to keep a track of how many RTOS objects a project might be using. With dynamic allocation, we need to declare this via configs like CONFIG_CMSIS_V2_MUTEX_MAX_COUNT. Either memory is getting wasted by allocating huge pools which are not fully used, or these configs need manual update as different libraries get added/removed to a project.

Proposed change

The above will not be a problem if Zephyr's CMSIS-RTOSv2 port supports static memory allocation. I plan on

Dependencies

This would not impact existing use of dynamic allocation for creating RTOS objects via CMSIS-RTOSv2.

Concerns and Unresolved Questions

Let me know of any concerns or ideas, otherwise I am creating a pull request implementing this proposal.

@utsavm9 utsavm9 added the RFC Request For Comments: want input from the community label Jul 8, 2024
Copy link

github-actions bot commented Jul 8, 2024

Hi @utsavm9! We appreciate you submitting your first issue for our open-source project. 🌟

Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙

@henrikbrixandersen henrikbrixandersen added the area: Portability Standard compliant code, toolchain abstraction label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Portability Standard compliant code, toolchain abstraction RFC Request For Comments: want input from the community
Projects
Status: No status
Development

No branches or pull requests

2 participants