-
Notifications
You must be signed in to change notification settings - Fork 349
kconfig: move more XTOS-only options out from top-level Kconfig #4201
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| comment "XTOS options / compiler" | ||
|
|
||
| choice | ||
| prompt "Optimization" | ||
| default OPTIMIZE_FOR_PERFORMANCE | ||
| help | ||
| Controls how compiler should optimize binary. | ||
| This config should affect only compiler settings and is | ||
| not meant to be used for conditional compilation of code. | ||
|
|
||
| config OPTIMIZE_FOR_PERFORMANCE | ||
| bool "Optimize for performance" | ||
| help | ||
| Apply compiler optimizations prioritizing performance. | ||
| It means -O2 for GCC or equivalent for other compilers. | ||
|
|
||
| config OPTIMIZE_FOR_SIZE | ||
| bool "Optimize for size" | ||
| help | ||
| Apply compiler optimizations prioritizing binary size. | ||
| It means -Os for GCC or equivalent for other compilers. | ||
|
|
||
| config OPTIMIZE_FOR_DEBUG | ||
| bool "Optimize for debug" | ||
| help | ||
| Apply compiler optimizations prioritizing debugging experience. | ||
| It means -Og for GCC or equivalent for other compilers. | ||
|
|
||
| config OPTIMIZE_FOR_NONE | ||
| bool "Don't optimize" | ||
| help | ||
| Apply no compiler optimizations. | ||
| It means -O0 for GCC or equivalent for other compilers. | ||
|
|
||
| endchoice | ||
|
|
||
| config BUILD_VM_ROM | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is needed for Zephyr as it's a ROM stub that jumps to SOF bootloader code in qemu. Unless Zephyr has this jump built in when building a qemu target ?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @lgirdwood I was wondering the same, but this is not used in any of the Zephyr builds and the implementation is in xtensa specific XTOS code, so I moved this out. But let me check. @andyross and @lyakh -- is this used in in Zephyr (to boot in Qemu) via some other way I don't see.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IIRC to run Zephyr-generated SOF in Qemu I was using VMROM, built separately by a native SOF build. But this was a few months ago so I might be wrong |
||
| bool "Build VM ROM" | ||
| default n | ||
| help | ||
| Select if you want to build VM ROM | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| config DEBUG_HEAP | ||
| bool "Heap debug" | ||
| default n | ||
| help | ||
| Select for enable heap alloc debugging | ||
|
|
||
| config DEBUG_BLOCK_FREE | ||
| bool "Blocks freeing debug" | ||
| default n | ||
| help | ||
| It enables checking if free was called multiple times on | ||
| already freed block of memory. Enabling this feature increases | ||
| number of memory writes and reads, due to checks for memory patterns | ||
| that may be performed on allocation and deallocation. |
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.
I fetched and tested this and it works but I don't understand how, can you add a comment explaining why
git grep ZEPHYR_SOF_MODULES=> nothing?BTW https://docs.zephyrproject.org/latest/guides/kconfig/tips.html#lack-of-conditional-includes
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.
I found a few, auto-generated ZEPHYR_SOF_ variables but not this one at https://docs.zephyrproject.org/latest/guides/modules.html
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.
@marc-hb Working on a reply. I just observed this is defined in my build .config and used it (and it works). But let me dig into where it's actually defined.
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.
Thanks! https://www.google.com/search?q=programming+by+coincidence :-)
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.
@marc-hb Zephyr's build system adds this for each module. Code in here: zephyr/scripts/kconfig/kconfiglib.py
During build, e.g. ./zephyrproject/build-icl/Kconfig/Kconfig.modules is created, containing definition for CONFIG_ZEPHYR_SOF_MODULE.
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.
Thanks, @kv2019i can you please add a reference to
zephyr/modules/Kconfigin a comment? I think this is not a documented feature so it deserves at least that pointer.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.
Submitted in #4327