-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Support allocating stack from separate heap #267
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The change adds support for allocating task stacks from separate heap. When configSTACK_ALLOCATION_FROM_SEPARATE_HEAP is defined as 1 in FreeRTOSConfig.h, task stacks are allocated and freed using pvPortMallocStack and vPortFreeStack functions. This allows the application writer to provide a separate allocator for task stacks. When configSTACK_ALLOCATION_FROM_SEPARATE_HEAP is defined as 0, task stacks are allocated and freed using FreeRTOS heap functions pvPortMalloc and vPortFree. For backward compatibility, configSTACK_ALLOCATION_FROM_SEPARATE_HEAP defaults to 0. Signed-off-by: Gaurav Aggarwal <[email protected]>
paulbartell
approved these changes
Feb 24, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a straightforward change.
paulbartell
reviewed
Feb 24, 2021
cobusve
approved these changes
Feb 24, 2021
mbruno-xmos
pushed a commit
to xmos/FreeRTOS-Kernel
that referenced
this pull request
Mar 9, 2021
* main: Add some assertions and coverage exceptions to queue.c (FreeRTOS#273) Moved git-secrets check to a different workflow (FreeRTOS#271) Comment: fix code comment for xTaskAbortDelay (FreeRTOS#272) Added git-secrets check to Github Actions (FreeRTOS#270) fixed documentation for ulTaskNotifyTake() and ulTaskNotifyTakeIndexed() (FreeRTOS#269) Add description for vTaskList (FreeRTOS#206) Support allocating stack from separate heap (FreeRTOS#267) Update python version to 3.7.10 (FreeRTOS#265) Update URL in history.txt (FreeRTOS#259) Remove unmatched braces in MessageBuffer pre tags (FreeRTOS#256) Check: improve verbosity of url verifier (FreeRTOS#260) Update issue templates incorporate updates from common (FreeRTOS#255) Typos (FreeRTOS#248) Delete gitattributes (FreeRTOS#253) Fix typo in comment in task.h (FreeRTOS#244) Fix Github checks after move from master to main (FreeRTOS#246)
mbruno-xmos
pushed a commit
to xmos/FreeRTOS-Kernel
that referenced
this pull request
Mar 9, 2021
* feature/xcore: Add some assertions and coverage exceptions to queue.c (FreeRTOS#273) Moved git-secrets check to a different workflow (FreeRTOS#271) Comment: fix code comment for xTaskAbortDelay (FreeRTOS#272) Added git-secrets check to Github Actions (FreeRTOS#270) fixed documentation for ulTaskNotifyTake() and ulTaskNotifyTakeIndexed() (FreeRTOS#269) Add description for vTaskList (FreeRTOS#206) Support allocating stack from separate heap (FreeRTOS#267) Update python version to 3.7.10 (FreeRTOS#265) Update URL in history.txt (FreeRTOS#259) Remove unmatched braces in MessageBuffer pre tags (FreeRTOS#256) Check: improve verbosity of url verifier (FreeRTOS#260) Update issue templates incorporate updates from common (FreeRTOS#255) Typos (FreeRTOS#248) Delete gitattributes (FreeRTOS#253) Fix typo in comment in task.h (FreeRTOS#244) Fix Github checks after move from master to main (FreeRTOS#246)
mbruno-xmos
pushed a commit
to xmos/FreeRTOS-Kernel
that referenced
this pull request
Mar 9, 2021
* main: Add some assertions and coverage exceptions to queue.c (FreeRTOS#273) Moved git-secrets check to a different workflow (FreeRTOS#271) Comment: fix code comment for xTaskAbortDelay (FreeRTOS#272) Added git-secrets check to Github Actions (FreeRTOS#270) fixed documentation for ulTaskNotifyTake() and ulTaskNotifyTakeIndexed() (FreeRTOS#269) Add description for vTaskList (FreeRTOS#206) Support allocating stack from separate heap (FreeRTOS#267) Update python version to 3.7.10 (FreeRTOS#265) Update URL in history.txt (FreeRTOS#259) Remove unmatched braces in MessageBuffer pre tags (FreeRTOS#256) Check: improve verbosity of url verifier (FreeRTOS#260) Update issue templates incorporate updates from common (FreeRTOS#255) Typos (FreeRTOS#248) Delete gitattributes (FreeRTOS#253) Fix typo in comment in task.h (FreeRTOS#244) Fix Github checks after move from master to main (FreeRTOS#246)
mbruno-xmos
pushed a commit
to xmos/FreeRTOS-Kernel
that referenced
this pull request
Mar 9, 2021
* feature/xcore: Add some assertions and coverage exceptions to queue.c (FreeRTOS#273) Moved git-secrets check to a different workflow (FreeRTOS#271) Comment: fix code comment for xTaskAbortDelay (FreeRTOS#272) Added git-secrets check to Github Actions (FreeRTOS#270) fixed documentation for ulTaskNotifyTake() and ulTaskNotifyTakeIndexed() (FreeRTOS#269) Add description for vTaskList (FreeRTOS#206) Support allocating stack from separate heap (FreeRTOS#267) Update python version to 3.7.10 (FreeRTOS#265) Update URL in history.txt (FreeRTOS#259) Remove unmatched braces in MessageBuffer pre tags (FreeRTOS#256) Check: improve verbosity of url verifier (FreeRTOS#260) Update issue templates incorporate updates from common (FreeRTOS#255) Typos (FreeRTOS#248) Delete gitattributes (FreeRTOS#253) Fix typo in comment in task.h (FreeRTOS#244) Fix Github checks after move from master to main (FreeRTOS#246)
aggarg
added a commit
to aggarg/FreeRTOS-Kernel
that referenced
this pull request
Mar 31, 2021
configSTACK_ALLOCATION_FROM_SEPARATE_HEAP was added recently in FreeRTOS#267. This macro was used in portable.h before its default value was defined, resulting in a warning when built with -Wundef. This changes moves the default value definition for configSTACK_ALLOCATION_FROM_SEPARATE_HEAP to portable.h to ensure that it is defined before first use. portUSING_MPU_WRAPPERS check in mpu_wrappers.h was updated in FreeRTOS#285. The new check results in a warning when built with -Wundef because portUSING_MPU_WRAPPERS is not defined yet. This changes adds the default value definition for portUSING_MPU_WRAPPERS to portable.h to ensure that it is defined before first use. Signed-off-by: Gaurav Aggarwal <[email protected]>
n9wxu
pushed a commit
that referenced
this pull request
Apr 2, 2021
configSTACK_ALLOCATION_FROM_SEPARATE_HEAP was added recently in #267. This macro was used in portable.h before its default value was defined, resulting in a warning when built with -Wundef. This changes moves the default value definition for configSTACK_ALLOCATION_FROM_SEPARATE_HEAP to portable.h to ensure that it is defined before first use. portUSING_MPU_WRAPPERS check in mpu_wrappers.h was updated in #285. The new check results in a warning when built with -Wundef because portUSING_MPU_WRAPPERS is not defined yet. This changes adds the default value definition for portUSING_MPU_WRAPPERS to portable.h to ensure that it is defined before first use. Signed-off-by: Gaurav Aggarwal <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The change adds support for allocating task stacks from separate heap. When
configSTACK_ALLOCATION_FROM_SEPARATE_HEAP
is defined as 1 inFreeRTOSConfig.h
, task stacks are allocated and freed usingpvPortMallocStack
andvPortFreeStack
functions. This allows the application writer to provide a separate allocator for task stacks.When
configSTACK_ALLOCATION_FROM_SEPARATE_HEAP
is defined as 0, task stacks are allocated and freed using FreeRTOS heap functionspvPortMalloc
andvPortFree
.For backward compatibility,
configSTACK_ALLOCATION_FROM_SEPARATE_HEAP
defaults to 0.This change was originally submitted by eboling in this PR: #262