2020-07-10 21:58:32 +08:00
|
|
|
CONFIG_SOF=y
|
|
|
|
CONFIG_LOG=y
|
2022-04-08 18:06:20 +08:00
|
|
|
CONFIG_LOG_PRINTK=y
|
2020-11-03 19:32:24 +08:00
|
|
|
CONFIG_BUILD_OUTPUT_BIN=n
|
2022-03-03 21:42:10 +08:00
|
|
|
CONFIG_HAVE_AGENT=n
|
2020-07-10 21:58:32 +08:00
|
|
|
|
|
|
|
# Requires heap_info() be implemented, but no Zephyr wrapper
|
|
|
|
CONFIG_DEBUG_MEMORY_USAGE_SCAN=n
|
2021-04-01 23:27:35 +08:00
|
|
|
|
2022-01-04 02:21:48 +08:00
|
|
|
# Ensure -O2 (or similar) is used for optimization
|
|
|
|
CONFIG_SPEED_OPTIMIZATIONS=y
|
|
|
|
|
samples/subsys/audio/sof: use -fstrict-overflow for SOF
Align compiler flags of SOF Zephyr build with the build SOF XTOS
and use -fstrict-overflow.
With -fno-strict-overflow, some versions of XCC compiler (e.g. xt-xcc
12.0.8) always emit a "bltu" instruction to check for overflow in loops
like:
unsigned int n;
for(n = 0; n < 1024; n++)
do_arithmetic();
With "-fno-strict-overflow", you'll have:
18: 068076 loop a0, 22 <dummy_dspload+0x22>
1b: 445a add.n a4, a4, a5
1d: 551b addi.n a5, a5, 1
1f: 023657 bltu a6, a5, 25 <dummy_dspload+0x25>
22: fffc86 j 18 <dummy_dspload+0x18>
With "-fstrict-overflow":
16: 038476 loop a4, 1d <dummy_dspload+0x1d>
19: 223a add.n a2, a2, a3
1b: 331b addi.n a3, a3, 1
As this is a common pattern in audio DSP code, change the default
for SOF builds to -fstrict-overflow.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-01-04 02:32:18 +08:00
|
|
|
# Zephyr top-level default of -fno-strict-overflow is
|
|
|
|
# not a good fit for audio DSP code
|
|
|
|
CONFIG_COMPILER_OPT="-fstrict-overflow"
|
|
|
|
|
2021-04-01 23:27:35 +08:00
|
|
|
CONFIG_SCHED_DEADLINE=y
|
|
|
|
CONFIG_SCHED_CPU_MASK=y
|
|
|
|
CONFIG_SMP_BOOT_DELAY=y
|
2022-06-21 23:09:34 +08:00
|
|
|
|
|
|
|
# Fix the sys ticks value until following bugs are solved:
|
|
|
|
# - https://github.com/zephyrproject-rtos/zephyr/issues/46378
|
|
|
|
CONFIG_SYS_CLOCK_TICKS_PER_SEC=15000
|