Hi
How can I use ztest to calculate code coverage on the nrf54l15 platform, I tried to use the configurations of CONFIG_FORCE_COVERAGE=y, CONFIG_COVERAGE_GCOV=y, and CONFIG_COVERAGE=y to calculate the test coverage of ztest. However, after enabling these configurations, I encountered flash and RAM space overflow during compilation. The compilation log is as follows:
/opt/zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: region `FLASH' overflowed by 1541736 bytes
/opt/zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: region `RAM' overflowed by 697999 bytes
[441/446] Linking C executable zephyr/zephyr_pre0.elf
FAILED: [code=1] zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map /data/mengkang1/work/x933/SE_P1_factory_0417/lc_zprojects/build/X933/zephyr/zephyr_pre0.map
: && ccache /opt/zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -gdwarf-4 zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj -o zephyr/zephyr_pre0.elf zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj -T zephyr/linker_zephyr_pre0.cmd -Wl,-Map=/data/mengkang1/work/x933/SE_P1_factory_0417/lc_zprojects/build/X933/zephyr/zephyr_pre0.map -Wl,--whole-archive app/libapp.a zephyr/libzephyr.a zephyr/arch/common/libarch__common.a zephyr/arch/arch/arm/core/libarch__arm__core.a zephyr/arch/arch/arm/core/cortex_m/libarch__arm__core__cortex_m.a zephyr/arch/arch/arm/core/cortex_m/cmse/libarch__arm__core__cortex_m__cmse.a zephyr/arch/arch/arm/core/mpu/libarch__arm__core__mpu.a zephyr/lib/libc/picolibc/liblib__libc__picolibc.a zephyr/lib/libc/common/liblib__libc__common.a zephyr/lib/net_buf/liblib__net_buf.a zephyr/soc/soc/nrf54l15/libsoc__nordic.a zephyr/subsys/debug/coredump/libsubsys__debug__coredump.a zephyr/subsys/fs/libsubsys__fs.a zephyr/subsys/mgmt/mcumgr/mgmt/libsubsys__mgmt__mcumgr__mgmt.a zephyr/subsys/mgmt/mcumgr/smp/libsubsys__mgmt__mcumgr__smp.a zephyr/subsys/mgmt/mcumgr/util/libsubsys__mgmt__mcumgr__util.a zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/libsubsys__mgmt__mcumgr__grp__img_mgmt.a zephyr/subsys/mgmt/mcumgr/grp/os_mgmt/libsubsys__mgmt__mcumgr__grp__os_mgmt.a zephyr/subsys/mgmt/mcumgr/transport/libsubsys__mgmt__mcumgr__transport.a zephyr/subsys/random/libsubsys__random.a zephyr/subsys/testsuite/ztest/libsubsys__testsuite__ztest.a zephyr/subsys/bluetooth/common/libsubsys__bluetooth__common.a zephyr/subsys/bluetooth/host/libsubsys__bluetooth__host.a zephyr/subsys/dfu/boot/libsubsys__dfu__boot.a zephyr/subsys/zbus/libsubsys__zbus.a zephyr/drivers/adc/libdrivers__adc.a zephyr/drivers/cache/libdrivers__cache.a zephyr/drivers/clock_control/libdrivers__clock_control.a zephyr/drivers/console/libdrivers__console.a zephyr/drivers/entropy/libdrivers__entropy.a zephyr/drivers/flash/libdrivers__flash.a zephyr/drivers/gpio/libdrivers__gpio.a zephyr/drivers/hwinfo/libdrivers__hwinfo.a zephyr/drivers/i2c/libdrivers__i2c.a zephyr/drivers/pinctrl/libdrivers__pinctrl.a zephyr/drivers/rtc/libdrivers__rtc.a zephyr/drivers/serial/libdrivers__serial.a zephyr/drivers/spi/libdrivers__spi.a zephyr/drivers/timer/libdrivers__timer.a modules/nrf/lib/multithreading_lock/lib..__nrf__lib__multithreading_lock.a modules/nrf/subsys/bluetooth/controller/lib..__nrf__subsys__bluetooth__controller.a modules/nrf/subsys/nrf_security/src/zephyr/libmbedtls_zephyr.a modules/nrf/subsys/mpsl/init/lib..__nrf__subsys__mpsl__init.a modules/nrf/subsys/mpsl/fem/lib..__nrf__subsys__mpsl__fem.a modules/nrf/subsys/mpsl/hwres/lib..__nrf__subsys__mpsl__hwres.a modules/nrf/drivers/mpsl/clock_control/lib..__nrf__drivers__mpsl__clock_control.a modules/nrf/drivers/mpsl/flash_sync/lib..__nrf__drivers__mpsl__flash_sync.a modules/nrf/drivers/mpsl/temp_nrf5/lib..__nrf__drivers__mpsl__temp_nrf5.a modules/mcuboot/boot/bootutil/zephyr/libmcuboot_util.a modules/hal_nordic/modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a modules/littlefs/libmodules__littlefs.a modules/zcbor/libmodules__zcbor.a modules/drivers/onewire/YHM2010/lib..__lc_zprojects__drivers__onewire__YHM2010.a modules/drivers/aw2027/lib..__lc_zprojects__drivers__aw2027.a modules/drivers/ams/tcs3448/lib..__lc_zprojects__drivers__ams__tcs3448.a modules/drivers/semtech/sx9210/lib..__lc_zprojects__drivers__semtech__sx9210.a modules/drivers/st/lsm6dsv16x/lib..__lc_zprojects__drivers__st__lsm6dsv16x.a -Wl,--no-whole-archive zephyr/kernel/libkernel.a -L/data/mengkang1/work/x933/SE_P1_factory_0417/lc_zprojects/build/X933/zephyr modules/nrf/subsys/nrf_security/src/libmbedcrypto.a modules/nrf/subsys/nrf_security/src/core/nrf_oberon/libpsa_core.a modules/nrf/subsys/nrf_security/src/drivers/cracen/libcracen_psa_driver.a modules/nrf/subsys/nrf_security/src/libmbedcrypto_base.a modules/nrf/subsys/nrf_security/src/libnrf_security_utils.a zephyr/kernel/libkernel.a zephyr/arch/common/libisr_tables.a -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mfp16-format=ieee -mtp=soft -fuse-ld=bfd -Wl,--gc-sections -Wl,--build-id=none -Wl,--sort-common=descending -Wl,--sort-section=alignment -Wl,-u,_OffsetAbsSyms -Wl,-u,_ConfigAbsSyms -nostdlib -static -Wl,-X -Wl,-N -Wl,--orphan-handling=warn -Wl,-no-pie -specs=picolibc.specs -DPICOLIBC_DOUBLE_PRINTF_SCANF /data/mengkang1/work/x933/SE_P1_factory_0417/nrfxlib/softdevice_controller/lib/nrf54l/hard-float/libsoftdevice_controller_multirole.a /data/mengkang1/work/x933/SE_P1_factory_0417/nrfxlib/mpsl/fem/common/lib/nrf54l/hard-float/libmpsl_fem_common.a /data/mengkang1/work/x933/SE_P1_factory_0417/nrfxlib/mpsl/fem/nrf21540_gpio/lib/nrf54l/hard-float/libmpsl_fem_nrf21540_gpio.a /data/mengkang1/work/x933/SE_P1_factory_0417/nrfxlib/mpsl/fem/nrf21540_gpio_spi/lib/nrf54l/hard-float/libmpsl_fem_nrf21540_gpio_spi.a /data/mengkang1/work/x933/SE_P1_factory_0417/nrfxlib/mpsl/fem/nrf2220/lib/nrf54l/hard-float/libmpsl_fem_nrf2220.a /data/mengkang1/work/x933/SE_P1_factory_0417/nrfxlib/mpsl/fem/nrf2240/lib/nrf54l/hard-float/libmpsl_fem_nrf2240.a /data/mengkang1/work/x933/SE_P1_factory_0417/nrfxlib/mpsl/fem/nrf22xx/lib/nrf54l/hard-float/libmpsl_fem_nrf22xx.a /data/mengkang1/work/x933/SE_P1_factory_0417/nrfxlib/mpsl/fem/simple_gpio/lib/nrf54l/hard-float/libmpsl_fem_simple_gpio.a /data/mengkang1/work/x933/SE_P1_factory_0417/nrfxlib/mpsl/lib/nrf54l/hard-float/libmpsl.a -L"/opt/zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/thumb/v8-m.main+fp/hard" -lc -lgcc && cd /data/mengkang1/work/x933/SE_P1_factory_0417/lc_zprojects/build/X933/zephyr && /opt/cmake-4.0.2-linux-x86_64/bin/cmake -E true
/opt/zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/zephyr_pre0.elf section `text' will not fit in region `FLASH'
/opt/zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/zephyr_pre0.elf section `_GCOV_BSS_SECTION_NAME' will not fit in region `RAM'
/opt/zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: region `FLASH' overflowed by 1541736 bytes
/opt/zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: region `RAM' overflowed by 697999 bytes
/opt/zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: modules/nrf/subsys/nrf_security/src/drivers/cracen/libcracen_psa_driver.a(mac.c.obj): in function `sx_mac_hw_reserve':
/data/mengkang1/work/x933/SE_P1_factory_0417/nrf/subsys/nrf_security/src/drivers/cracen/sxsymcrypt/src/mac.c:53: undefined reference to `sx_handle_nested_error'
/opt/zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: modules/nrf/subsys/nrf_security/src/drivers/cracen/libcracen_psa_driver.a(mac.c.obj): in function `sx_mac_feed':
/data/mengkang1/work/x933/SE_P1_factory_0417/nrf/subsys/nrf_security/src/drivers/cracen/sxsymcrypt/src/mac.c:65: undefined reference to `sx_handle_nested_error'
/opt/zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /data/mengkang1/work/x933/SE_P1_factory_0417/nrf/subsys/nrf_security/src/drivers/cracen/sxsymcrypt/src/mac.c:68: undefined reference to `sx_handle_nested_error'
/opt/zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: modules/nrf/subsys/nrf_security/src/drivers/cracen/libcracen_psa_driver.a(mac.c.obj): in function `sx_mac_run':
/data/mengkang1/work/x933/SE_P1_factory_0417/nrf/subsys/nrf_security/src/drivers/cracen/sxsymcrypt/src/mac.c:83: undefined reference to `sx_handle_nested_error'
/opt/zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: modules/nrf/subsys/nrf_security/src/drivers/cracen/libcracen_psa_driver.a(mac.c.obj): in function `sx_mac_save_state':
/data/mengkang1/work/x933/SE_P1_factory_0417/nrf/subsys/nrf_security/src/drivers/cracen/sxsymcrypt/src/mac.c:152: undefined reference to `sx_handle_nested_error'
/opt/zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: modules/nrf/subsys/nrf_security/src/drivers/cracen/libcracen_psa_driver.a(mac.c.obj):/data/mengkang1/work/x933/SE_P1_factory_0417/nrf/subsys/nrf_security/src/drivers/cracen/sxsymcrypt/src/mac.c:155: more undefined references to `sx_handle_nested_error' follow
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
FAILED: [code=1] _sysbuild/sysbuild/images/X933-prefix/src/X933-stamp/X933-build /data/mengkang1/work/x933/SE_P1_factory_0417/lc_zprojects/build/_sysbuild/sysbuild/images/X933-prefix/src/X933-stamp/X933-build
cd /data/mengkang1/work/x933/SE_P1_factory_0417/lc_zprojects/build/X933 && /opt/cmake-4.0.2-linux-x86_64/bin/cmake --build .
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/local/bin/cmake --build /data/mengkang1/work/x933/SE_P1_factory_0417/lc_zprojects/build
Error: ztest_case version build failed!