puncover
puncover copied to clipboard
First time use not working
Hi all maybe someone can help me here. I tried to use puncover on a fresh debian 11 installation. I installed puncover with
apt-get install pip pip3 install puncover
When I try it with a simple little program, this is what I get (same result when setting --arm_tools_dir or --gcc_tools_base to the appropriate correct subdir (using xPacks arm-none-eabi for bare metal here):
dev@qemuarm:~/project_dir$ puncover --elf_file main.elf
DEPRECATED: argument --arm_tools_dir will be removed, use --gcc_tools_base instead.
parsing ELF at main.elf
Traceback (most recent call last):
File "/usr/local/bin/puncover", line 8, in
I am not a python expert. But searching around in the code a little makes me feel that the subprocess.Popen interface has changed and the "objcopy" executable parameter is not forwarded into this call??? I also have added some prints to gcc_tools.py and the subprocces call that is built up there can be executed on the command line without any problems...
Hope someone can help me with this
Didi
Hello @hudi84 , thank you for reporting this issue!
You'll need to specify the tools prefix as described in the help:
❯ puncover --help
usage: puncover [-h] [--arm_tools_dir ARM_TOOLS_DIR] [--gcc_tools_base GCC_TOOLS_BASE] --elf_file ELF_FILE [--src_root SRC_ROOT] [--build_dir BUILD_DIR] [--debug] [--port PORT] [--host HOST] [--no-open-browser]
Analyses C/C++ build output for code size, static variables, and stack usage.
options:
-h, --help show this help message and exit
--arm_tools_dir ARM_TOOLS_DIR
DEPRECATED! location of your arm tools.
--gcc_tools_base GCC_TOOLS_BASE
filename prefix for your gcc tools, e.g. ~/arm-cs-tools/bin/arm-none-eabi-
For example:
❯ puncover --elf_file test.elf --gcc_tools_base ~/Downloads/xpack-arm-none-eabi-gcc-11.2.1-1.2-linux-x64/bin/arm-none-eabi-
Notice the prefix includes arm-none-eabi-
.
Let us know if that fixes the problem!
Got hit by the same problem. A workaround was to pass an absolute path for the elf file. Like this:
puncover \
--elf_file /path/to/my/test.elf \
--gcc_tools_base ~/Downloads/xpack-arm-none-eabi-gcc-11.2.1-1.2-linux-x64/bin/arm-none-eabi-