Add support for loadable modules, built for dynamic linking with
Zephyr's LLEXT API.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This reverts 8f6018057b ("app: enable OUTPUT_DISASSEMBLY for Zephyr
builds")
The disassembly is useful in some contexts but can't be parallelized and
takes an enormous amount of time. On my system OUTPUT_DISASSEMBLY
almost doubles the compilation time!
Quoting Zephyr commit cc5763344709:
> This on-by-default option takes the majority of "link" time. If people
> need the disassembly, they can turn it on.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Add a sparse-specific workaround for the incompatibility with
picolibc (the new Zephyr default)
https://github.com/zephyrproject-rtos/zephyr/issues/63003
Also fix comment in commit 2a9473a17b ("app/prj.conf: disable PICOLIBC
with CONFIG_MINIMAL_LIBC=y"): we don't need to disable PICOLIBC
_everywhere_; we only need to disable it when using sparse.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Starting from Zephyr commit f0daf904bb02, CONFIG_PICOLIBC is on by
default.
PICOLIBC does not seem compatible with sparse yet:
https://github.com/zephyrproject-rtos/zephyr/issues/63003
Even if it were compatible with sparse, it seems like a pretty big
change that we should not immediately and blindly accept.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This reverts commit 80c6738b89.
The Zephyr default changed in commit 385ad46a39ca so this is not needed
anymore.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
With Zephyr commit cc5763344709 ("Build system: disable
`OUTPUT_DISASSEMBLY` by default"), generation of zephyr.lst
is disabled by default.
Enable disassembly generation in SOF configuration as it is expected by
SOF builds rules for reproducible builds.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Zephyr has hardcoded this to 'y' because it saves CI some disk space
when compiling hundreds of different zephyr/tests/, each in a separate
build directory. But when compiling just one "sof/app" it saves
practically no space, breaks the incremental build and can make it more
difficult to troubleshoot some build issues. So, reset it to the default
value.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Set the logging thread stack size explicitly for SOF builds
and use a safe default of 4096 bytes. Individual board overlays
can override this default to save stack space.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Set CONFIG_LOG_BUFFER_SIZE=4096 for all SOF builds.
As SOF uses DEFERRED mode for logging, the frontend buffer for
logs must be large enough to cover all typical burts of messages.
Tests using CONFIG_LOG_MEM_UTILIZATION debugging infrastructure,
show that maximum buffer usage is over 2048 bytes in typical
sof-test run on a SOF nocodec topology, tested on Intel TGL
hardware.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Logging output of SOF is sporadic in nature (unless debug configuration
is used) and it cannot be assumed that a steady flow of log messages
is output at all times. During stable state, there are either no or very
few messages output. When the DSP pipeline state is modified, there is
a flurry of event. Similarly upon errors, a burst of log messages is
output.
For better balance between delay in writing logs, and limiting overhead
of the logging thread, set new defaults to:
CONFIG_LOG_PROCESS_TRIGGER_THRESHOLD=5
CONFIG_LOG_PROCESS_THREAD_SLEEP_MS=100
The SLEEP_MS sets an upper bound how long a single log message can
stay in the log frontend buffer.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Calls to log messages are done in many places in SOF code,
including latency sensitive low-latency code paths. To minimize
the cost to low-latency path, use CONFIG_LOG_MODE_DEFERRED=y
by default for all SOF Zephyr builds. This will offload log
processing and output to a separate low priority thread.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
In many places of SOF code, assumption is that code is only run
on a specific core. This allows to reduce overhead of cache
coherency management. For example this is used in the IPC stack.
In Zephyr, we can force threads to be pinned by default using
the CONFIG_SCHED_CPU_MASK_PIN_ONLY setting. Enable this setting
for all SOF builds.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Make the main SOF app part of SOF, where it belongs. No need for any
overlays (which just duplicated the sample .conf anyways) and one place
to build everything.
This now does not depend on zephyr samples, which have a different
purpose completely.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>