1
votes

I'm using Ubuntu 18.04 VM and trying to find a way to valgrind check an arm-Linux executable. I've tried compiling with local gcc but ran into some problems. The executable is created by Makefile provided from project. I've tried linaro emulator, following guides online, but faced multiple issues which for each one I've searched on online for solutions but all failed. What are the ways I can valgrind?

As long as I can check program for memory leak, any way is fine. What I get when I valgrind executable now:

valgrind: failed to start tool 'memcheck' for platform 'arm-linux': No such file or directory

The file it self is fyi: nrf52832_xxaa.out: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, with debug_info, not stripped

I've searched through multiple posts for solutions but couldn't find any.

2

2 Answers

2
votes

Cross compile valgrind, and execute on the target. There are no other ways. Can't even use qemu to execute valgrind.

0
votes

It is mandatory to run the executable on the device. Please consider the option to download the precompiled package for your arch example from https://packages.debian.org/search?keywords=valgrind, follow the mandatory dependencies, and install all on you embedded device. I use to base the version according to the installed version of libc.