-
Notifications
You must be signed in to change notification settings - Fork 8.2k
doc: guide for optimizing zephyr #15969
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
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,3 +25,4 @@ User and Developer Guides | |
| test/index | ||
| tracing/index | ||
| west/index | ||
| optimizations/index | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| .. _footprint: | ||
|
|
||
| Optimizing for Footprint | ||
| ######################## | ||
|
|
||
| Stack Sizes | ||
| *********** | ||
|
|
||
| Stack sizes of various system threads are specified generously to allow for | ||
| usage in different scenarios on as many supported platforms as possible. You | ||
| should start the optimization process by reviewing all stack sizes and adjusting | ||
| them for your application: | ||
|
|
||
| :option:`CONFIG_ISR_STACK_SIZE` | ||
| Set to 2048 by default | ||
|
|
||
| :option:`CONFIG_MAIN_STACK_SIZE` | ||
| Set to 1024 by default | ||
|
|
||
| :option:`CONFIG_IDLE_STACK_SIZE` | ||
| Set to 320 by default | ||
|
|
||
| :option:`CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE` | ||
| Set to 1024 by default | ||
|
|
||
| :option:`CONFIG_OFFLOAD_WORKQUEUE_STACK_SIZE` | ||
| Set to 1024 by default | ||
|
|
||
| :option:`CONFIG_PRIVILEGED_STACK_SIZE` | ||
| Set to 1024 by default, depends on userspace feature. | ||
|
|
||
|
|
||
| Unused Peripherals | ||
| ****************** | ||
|
|
||
| Some peripherals are enabled by default. You can disable unused | ||
| peripherals in your project configuration, for example:: | ||
|
|
||
|
|
||
| CONFIG_GPIO=n | ||
| CONFIG_SPI=n | ||
|
|
||
| Various Debug/Informational Options | ||
| *********************************** | ||
|
|
||
| The following options are enabled by default to provide more information about | ||
| the running application and to provide means for debugging and error handling: | ||
|
|
||
| :option:`CONFIG_BOOT_BANNER` | ||
| This option can be disabled to save a few bytes. | ||
|
|
||
| :option:`CONFIG_DEBUG` | ||
| This option can be disabled for production builds | ||
nashif marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
| MPU/MMU Support | ||
| *************** | ||
|
|
||
| Depending on your application and platform needs, you can disable MPU/MMU | ||
| support to gain some memory and improve performance. Consider the consequences | ||
| of this configuration choice though, because you'll lose advanced stack | ||
| checking and support. | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| .. _optimizations: | ||
|
|
||
| Optimizations | ||
| ############## | ||
|
|
||
| Guides on how to optimize Zephyr for performance, power and footprint. | ||
|
|
||
nashif marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| .. toctree:: | ||
| :maxdepth: 1 | ||
|
|
||
| footprint.rst | ||
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.
Uh oh!
There was an error while loading. Please reload this page.