I am trying to use puncover to estimate the maximum stack size for the created thread.
We also tried the thread analyzer, but gave up on it because it did not seem to be able to analyze thread size without running the program.
However, I believe puncover can estimate the maximum stack size after the build.
I want to run puncover, but I get an error and cannot proceed.
https://docs.zephyrproject.org/latest/develop/optimizations/tools.html
I entered the command by referring to this site.
The build result of the sample project is as follows
den-sekkei10-npc@DESKTOP-DHR8QT9 MINGW64 ~/ncs/v1.6.1/zephyr/samples/hello_world ((v2.6.0-rc1-ncs1)) $ west build -b DKLock2_nrf52832 -- west build: generating a build system Including boilerplate (Zephyr base): C:/Users/den-sekkei10-npc/ncs/v1.6.1/zephyr/cmake/app/boilerplate.cmake -- Application: C:/Users/den-sekkei10-npc/ncs/v1.6.1/zephyr/samples/hello_world -- Using NCS Toolchain 1.6.0 for building. (C:/Users/den-sekkei10-npc/ncs/v1.6.0/toolchain/cmake) -- Zephyr version: 2.6.0-rc1 (C:/Users/den-sekkei10-npc/ncs/v1.6.1/zephyr), build: v2.6.0-rc1-ncs1 -- Found Python3: C:/Users/den-sekkei10-npc/ncs/v1.6.0/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter -- Found west (found suitable version "0.11.0", minimum required is "0.7.1") -- Board: DKLock2_nrf52832 -- Cache files will be written to: C:/Users/den-sekkei10-npc/ncs/v1.6.1/zephyr/.cache -- Found dtc: C:/Users/den-sekkei10-npc/ncs/v1.6.0/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6") -- Found toolchain: gnuarmemb (C:/Users/den-sekkei10-npc/ncs/v1.6.0/toolchain/opt) -- Found BOARD.dts: C:/Users/den-sekkei10-npc/ncs/v1.6.1/zephyr/boards/arm/DKLock2_nrf52832/DKLock2_nrf52832.dts -- Generated zephyr.dts: C:/Users/den-sekkei10-npc/ncs/v1.6.1/zephyr/samples/hello_world/build/zephyr/zephyr.dts -- Generated devicetree_unfixed.h: C:/Users/den-sekkei10-npc/ncs/v1.6.1/zephyr/samples/hello_world/build/zephyr/include/generated/devicetree_unfixed.h -- Generated device_extern.h: C:/Users/den-sekkei10-npc/ncs/v1.6.1/zephyr/samples/hello_world/build/zephyr/include/generated/device_extern.h Parsing C:/Users/den-sekkei10-npc/ncs/v1.6.1/zephyr/Kconfig Loaded configuration 'C:/Users/den-sekkei10-npc/ncs/v1.6.1/zephyr/boards/arm/DKLock2_nrf52832/DKLock2_nrf52832_defconfig' Merged configuration 'C:/Users/den-sekkei10-npc/ncs/v1.6.1/zephyr/samples/hello_world/prj.conf' Configuration saved to 'C:/Users/den-sekkei10-npc/ncs/v1.6.1/zephyr/samples/hello_world/build/zephyr/.config' Kconfig header saved to 'C:/Users/den-sekkei10-npc/ncs/v1.6.1/zephyr/samples/hello_world/build/zephyr/include/generated/autoconf.h' -- The C compiler identification is GNU 9.2.1 -- The CXX compiler identification is GNU 9.2.1 -- The ASM compiler identification is GNU -- Found assembler: C:/Users/den-sekkei10-npc/ncs/v1.6.0/toolchain/opt/bin/arm-none-eabi-gcc.exe -- Configuring done -- Generating done -- Build files have been written to: C:/Users/den-sekkei10-npc/ncs/v1.6.1/zephyr/samples/hello_world/build -- west build: building application [1/144] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json [2/144] Generating include/generated/driver-validation.h [3/144] Generating include/generated/kobj-types-enum.h, include/generated/otype-to-str.h, include/generated/otype-to-size.h [4/144] Generating include/generated/syscall_dispatch.c, include/generated/syscall_list.h [5/144] Building C object zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj [6/144] Generating include/generated/offsets.h [7/144] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/nmi_on_reset.S.obj [8/144] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/cpu_idle.S.obj [9/144] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/vector_table.S.obj [10/144] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fault_s.S.obj [11/144] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/isr_wrapper.S.obj [12/144] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/reset.S.obj [13/144] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/exc_exit.S.obj [14/144] Building C object zephyr/arch/common/CMakeFiles/arch__common.dir/sw_isr_common.c.obj [15/144] Building C object zephyr/arch/common/CMakeFiles/isr_tables.dir/isr_tables.c.obj [16/144] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/nmi.c.obj [17/144] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/thread_abort.c.obj [18/144] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/prep_c.c.obj [19/144] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strstr.c.obj [20/144] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strspn.c.obj [21/144] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/irq_init.c.obj [22/144] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/stdout_console.c.obj [23/144] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/fatal.c.obj [24/144] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fpu.c.obj [25/144] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/scb.c.obj [26/144] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/string.c.obj [27/144] Linking C static library zephyr\arch\common\libisr_tables.a [28/144] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/atoi.c.obj [29/144] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/sprintf.c.obj [30/144] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/abort.c.obj [31/144] Building C object zephyr/arch/arch/arm/core/aarch32/mpu/CMakeFiles/arch__arm__core__aarch32__mpu.dir/arm_core_mpu.c.obj [32/144] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtol.c.obj [33/144] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtoul.c.obj [34/144] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/bsearch.c.obj [35/144] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strncasecmp.c.obj [36/144] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/malloc.c.obj [37/144] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/fprintf.c.obj [38/144] Linking C static library zephyr\arch\common\libarch__common.a [39/144] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/time/gmtime.c.obj [40/144] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/exit.c.obj [41/144] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fault.c.obj [42/144] Building C object zephyr/arch/arch/arm/core/aarch32/mpu/CMakeFiles/arch__arm__core__aarch32__mpu.dir/arm_mpu.c.obj [43/144] Building C object zephyr/soc/arm/common/cortex_m/CMakeFiles/soc__arm__common__cortex_m.dir/arm_mpu_regions.c.obj [44/144] Building C object zephyr/lib/posix/CMakeFiles/lib__posix.dir/nanosleep.c.obj [45/144] Building C object zephyr/lib/posix/CMakeFiles/lib__posix.dir/pthread_common.c.obj [46/144] Building C object modules/nrf/lib/fatal_error/CMakeFiles/..__nrf__lib__fatal_error.dir/fatal_error.c.obj [47/144] Linking C static library zephyr\arch\arch\arm\core\aarch32\mpu\libarch__arm__core__aarch32__mpu.a [48/144] Building C object zephyr/soc/arm/nordic_nrf/nrf52/CMakeFiles/soc__arm__nordic_nrf__nrf52.dir/soc.c.obj [49/144] Linking C static library zephyr\arch\arch\arm\core\aarch32\cortex_m\libarch__arm__core__aarch32__cortex_m.a [50/144] Building C object zephyr/kernel/CMakeFiles/kernel.dir/banner.c.obj [51/144] Linking C static library zephyr\lib\libc\minimal\liblib__libc__minimal.a [52/144] Linking C static library zephyr\soc\arm\common\cortex_m\libsoc__arm__common__cortex_m.a [53/144] Building C object zephyr/soc/arm/nordic_nrf/nrf52/CMakeFiles/soc__arm__nordic_nrf__nrf52.dir/power.c.obj [54/144] Linking C static library zephyr\lib\posix\liblib__posix.a [55/144] Building C object zephyr/kernel/CMakeFiles/kernel.dir/fatal.c.obj [56/144] Building C object zephyr/drivers/serial/CMakeFiles/drivers__serial.dir/uart_nrfx_uarte.c.obj [57/144] Building C object zephyr/drivers/gpio/CMakeFiles/drivers__gpio.dir/gpio_nrfx.c.obj [58/144] Building C object zephyr/kernel/CMakeFiles/kernel.dir/device.c.obj [59/144] Linking C static library modules\nrf\lib\fatal_error\lib..__nrf__lib__fatal_error.a [60/144] Building C object zephyr/kernel/CMakeFiles/kernel.dir/errno.c.obj [61/144] Linking C static library zephyr\soc\arm\nordic_nrf\nrf52\libsoc__arm__nordic_nrf__nrf52.a [62/144] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/nrfx_glue.c.obj [63/144] Building C object modules/segger/CMakeFiles/modules__segger.dir/SEGGER_RTT_zephyr.c.obj [64/144] Linking C static library zephyr\drivers\serial\libdrivers__serial.a [65/144] Building C object zephyr/kernel/CMakeFiles/kernel.dir/version.c.obj [66/144] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/Users/den-sekkei10-npc/ncs/v1.6.1/modules/hal/nordic/nrfx/mdk/system_nrf52.c.obj [67/144] Linking C static library zephyr\drivers\gpio\libdrivers__gpio.a [68/144] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/Users/den-sekkei10-npc/ncs/v1.6.1/modules/hal/nordic/nrfx/drivers/src/nrfx_clock.c.obj [69/144] Building C object zephyr/kernel/CMakeFiles/kernel.dir/idle.c.obj [70/144] Building C object zephyr/kernel/CMakeFiles/kernel.dir/kheap.c.obj [71/144] Building C object modules/segger/CMakeFiles/modules__segger.dir/C_/Users/den-sekkei10-npc/ncs/v1.6.1/modules/debug/segger/SEGGER/SEGGER_RTT.c.obj [72/144] Building C object zephyr/kernel/CMakeFiles/kernel.dir/thread.c.obj [73/144] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mem_slab.c.obj [74/144] Building C object zephyr/kernel/CMakeFiles/kernel.dir/init.c.obj [75/144] Building C object zephyr/kernel/CMakeFiles/kernel.dir/msg_q.c.obj [76/144] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/Users/den-sekkei10-npc/ncs/v1.6.1/modules/hal/nordic/nrfx/drivers/src/nrfx_ppi.c.obj [77/144] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mailbox.c.obj [78/144] Linking C static library modules\segger\libmodules__segger.a [79/144] Building C object zephyr/kernel/CMakeFiles/kernel.dir/queue.c.obj [80/144] Building C object zephyr/kernel/CMakeFiles/kernel.dir/pipes.c.obj [81/144] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/Users/den-sekkei10-npc/ncs/v1.6.1/modules/hal/nordic/nrfx/drivers/src/nrfx_gpiote.c.obj [82/144] Building C object zephyr/kernel/CMakeFiles/kernel.dir/system_work_q.c.obj [83/144] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mutex.c.obj [84/144] Building C object zephyr/kernel/CMakeFiles/kernel.dir/sem.c.obj [85/144] Building C object zephyr/kernel/CMakeFiles/kernel.dir/stack.c.obj [86/144] Building C object zephyr/kernel/CMakeFiles/kernel.dir/xip.c.obj [87/144] Building C object zephyr/kernel/CMakeFiles/kernel.dir/condvar.c.obj [88/144] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf.c.obj [89/144] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mempool.c.obj [90/144] Linking C static library modules\hal_nordic\nrfx\libmodules__hal_nordic__nrfx.a [91/144] Building C object CMakeFiles/app.dir/src/main.c.obj [92/144] Building C object zephyr/kernel/CMakeFiles/kernel.dir/work.c.obj [93/144] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc32c_sw.c.obj [94/144] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc32_sw.c.obj [95/144] Building C object zephyr/kernel/CMakeFiles/kernel.dir/timeout.c.obj [96/144] Building C object zephyr/kernel/CMakeFiles/kernel.dir/timer.c.obj [97/144] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc16_sw.c.obj [98/144] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_packaged.c.obj [99/144] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc7_sw.c.obj [100/144] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc8_sw.c.obj [101/144] Linking C static library app\libapp.a [102/144] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/dec.c.obj [103/144] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/hex.c.obj [104/144] Building C object zephyr/kernel/CMakeFiles/kernel.dir/sched.c.obj [105/144] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/notify.c.obj [106/144] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/fdtable.c.obj [107/144] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/thread_entry.c.obj [108/144] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/sem.c.obj [109/144] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj [110/144] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/printk.c.obj [111/144] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/onoff.c.obj [112/144] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/rb.c.obj [113/144] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/heap-validate.c.obj [114/144] Building C object zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj [115/144] Building C object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/validate_enabled_instances.c.obj [116/144] Linking C static library zephyr\kernel\libkernel.a [117/144] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_complete.c.obj [118/144] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/bitarray.c.obj [119/144] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/heap.c.obj [120/144] Building C object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/validate_base_addresses.c.obj [121/144] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/reboot.c.obj [122/144] Generating linker_zephyr_prebuilt.cmd [123/144] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/pm/pm_ctrl.c.obj [124/144] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/pm/power.c.obj [125/144] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/swap_helper.S.obj [126/144] Building C object zephyr/CMakeFiles/zephyr.dir/drivers/timer/sys_clock_init.c.obj [127/144] Building C object zephyr/CMakeFiles/zephyr_prebuilt.dir/misc/empty_file.c.obj [128/144] Building C object zephyr/CMakeFiles/zephyr.dir/drivers/console/uart_console.c.obj [129/144] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/pm/policy/policy_residency.c.obj [130/144] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/swap.c.obj [131/144] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/thread.c.obj [132/144] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/irq_manage.c.obj [133/144] Building C object zephyr/CMakeFiles/zephyr.dir/drivers/clock_control/clock_control_nrf.c.obj [134/144] Building C object zephyr/CMakeFiles/zephyr.dir/drivers/timer/nrf_rtc_timer.c.obj [135/144] Linking C static library zephyr\arch\arch\arm\core\aarch32\libarch__arm__core__aarch32.a [136/144] Linking C static library zephyr\libzephyr.a [137/144] Linking C executable zephyr\zephyr_prebuilt.elf [138/144] Generating linker.cmd [139/144] Generating isr_tables.c, isrList.bin [140/144] Generating dev_handles.c [141/144] Building C object zephyr/CMakeFiles/zephyr_final.dir/misc/empty_file.c.obj [142/144] Building C object zephyr/CMakeFiles/zephyr_final.dir/isr_tables.c.obj [143/144] Building C object zephyr/CMakeFiles/zephyr_final.dir/dev_handles.c.obj [144/144] Linking C executable zephyr\zephyr.elf Memory region Used Size Region Size %age Used FLASH: 16832 B 512 KB 3.21% SRAM: 5472 B 64 KB 8.35% IDT_LIST: 0 GB 2 KB 0.00% den-sekkei10-npc@DESKTOP-DHR8QT9 MINGW64 ~/ncs/v1.6.1/zephyr/samples/hello_world ((v2.6.0-rc1-ncs1)) $
After building the sample project, the following error message appears when puncover is run.den-sekkei10-npc@DESKTOP-DHR8QT9 MINGW64 ~/ncs/v1.6.1/zephyr/samples/hello_world ((v2.6.0-rc1-ncs1)) $ west build -t puncover -- west build: running target puncover ninja: error: unknown target 'puncover' FATAL ERROR: command exited with status 1: 'C:\Users\den-sekkei10-npc\ncs\v1.6.1\toolchain\opt\bin\cmake.EXE' --build 'C:\Users\den-sekkei10-npc\ncs\v1.6.1\zephyr\samples\hello_world\build' --target puncover
I have searched for a solution with the error code to resolve the issue, but have not found one, and have tried reinstalling puncover, etc., but have not resolved the issue.
Sorry, please tell me how to use puncover
Thank you for your cooperation.