Commit Graph

15 Commits

Author SHA1 Message Date
Guennadi Liakhovetski ae4f3143c1 llext: only enable on ACE platforms
cAVS platforms don't use LLEXT because memory mapping isn't supported
on them. Select LLEXT per platform, so far only for ACE 1.5 and 2.0.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-06-12 11:07:35 +01:00
Guennadi Liakhovetski 4d3c2ee51f lib-manager: add support for llext
Add support for loadable modules, built for dynamic linking with
Zephyr's LLEXT API.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-03-08 16:25:28 +02:00
Marc Herbert dd8b9328a9 app/prj.conf: stop forcing CONFIG_OUTPUT_DISASSEMBLY=y
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>
2024-02-02 17:19:38 +02:00
Marc Herbert 0061953a59 .github/sparse-zephyr: add -DCONFIG_MINIMAL_LIBC to avoid picolibc
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>
2023-09-27 14:00:10 +01:00
Marc Herbert 2a9473a17b app/prj.conf: disable PICOLIBC with CONFIG_MINIMAL_LIBC=y
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>
2023-09-25 15:04:17 +03:00
Marc Herbert 178f561b6e Revert "app/prj.conf: restore CONFIG_CLEANUP_INTERMEDIATE_FILES=n default"
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>
2023-08-31 11:37:01 +03:00
Kai Vehmanen 8f6018057b app: enable OUTPUT_DISASSEMBLY for Zephyr builds
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>
2023-08-15 10:48:38 +03:00
Marc Herbert 80c6738b89 app/prj.conf: restore the CONFIG_CLEANUP_INTERMEDIATE_FILES=n default
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>
2023-06-02 13:07:34 +03:00
Marc Herbert 945adb8d16 app/prj.conf: add CONFIG_BUILD_OUTPUT_STRIPPED=y
The discussion in
https://github.com/zephyrproject-rtos/zephyr/pull/51954 may take time
and we need reproducibility last year (who doesn't?)

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-11-30 11:59:33 +00:00
Kai Vehmanen 0654a66664 zephyr: app: increase log thread stack size to 4096
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>
2022-10-07 15:01:11 +03:00
Kai Vehmanen 529d593454 zephyr: app: increase log size to 4096 bytes
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>
2022-10-07 15:01:11 +03:00
Kai Vehmanen 576373594b zephyr: app: tune logging thread sleep and trigger threshold values
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>
2022-10-07 15:01:11 +03:00
Kai Vehmanen 19970d51d5 zephyr: app: explicitly use DEFERRED log mode
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>
2022-10-07 15:01:11 +03:00
Kai Vehmanen a815089a25 app: set CONFIG_SCHED_CPU_MASK_PIN_ONLY=y for all SOF builds
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>
2022-09-12 16:50:29 +01:00
Anas Nashif 00c407f8c9 zephyr: app: move main SOF app from zephyr samples
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>
2022-07-18 14:22:01 +01:00