diff --git a/Kconfig b/Kconfig index 45a47f94c2ed..d2a95bdff05f 100644 --- a/Kconfig +++ b/Kconfig @@ -127,39 +127,9 @@ config XT_INTERRUPT_LEVEL_5 rsource "src/Kconfig" -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 +if !ZEPHYR_SOF_MODULE + rsource "Kconfig.xtos-build" +endif menu "Debug" @@ -175,12 +145,6 @@ config GDB_DEBUG help Select for GDB debugging -config DEBUG_HEAP - bool "Heap debug" - default n - help - Select for enable heap alloc debugging - config DEBUG_MEMORY_USAGE_SCAN bool "Memory usage scan" default y @@ -189,15 +153,6 @@ config DEBUG_MEMORY_USAGE_SCAN This feature does not affect standard memory operations, especially allocation and deallocation. -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. - config DEBUG_LOCKS bool "Spinlock debug" default n @@ -214,12 +169,6 @@ config DEBUG_LOCKS_VERBOSE In addition to DEBUG_LOCKS it also adds spinlock traces every time the lock is acquired. -config BUILD_VM_ROM - bool "Build VM ROM" - default n - help - Select if you want to build VM ROM - config DEBUG_IPC_COUNTERS bool "IPC counters" depends on CAVS @@ -248,4 +197,8 @@ config DSP_RESIDENCY_COUNTERS R0, R1, R2 are abstract states which can be used differently based on platform implementation. +if !ZEPHYR_SOF_MODULE + rsource "Kconfig.xtos-dbg" +endif + endmenu diff --git a/Kconfig.xtos-build b/Kconfig.xtos-build new file mode 100644 index 000000000000..b2956a46bbf9 --- /dev/null +++ b/Kconfig.xtos-build @@ -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 + bool "Build VM ROM" + default n + help + Select if you want to build VM ROM diff --git a/Kconfig.xtos-dbg b/Kconfig.xtos-dbg new file mode 100644 index 000000000000..3082d7cfad04 --- /dev/null +++ b/Kconfig.xtos-dbg @@ -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.