When developing for embedded devices, turnaround times are often long and slow down the development experience. GammaRay - an open-source tool developed by KDAB - might help finding issues without even recompiling.
In this video, I explain how to install GammaRay and its -probe on an embedded target.
1. Get GammaRay from https://github.com/KDAB/GammaRay/ check out the right version by either building Host(UI) + (Crosscompile-)Probe or check on host: gammaray --version and use the same githash for the probe.
2. Use your SDK to build:
2.1 For a buildroot SDK, the line is -DCMAKE_TOOLCHAIN_FILE=<()path to buildroot sdk host>/host/share/buildroot/toolchainfile.cmake 2.2 For a Yocto SDK, the line (after sourcing the environment file) is -DCMAKE_TOOLCHAIN_FILE=../gammaray/cmake/Toolchain-Yocto.cmake
3. Cmake-configure your whole GammaRay with -DGAMMARAY_PROBE_ONLY_BUILD=true ##We only want the probe -DGAMMARAY_BUILD_UI=false ##We dont want the UI for the target -DCMAKE_INSTALL_PREFIX=$(pwd) ##We want GammaRay to install itself into our build folder -DCMAKE_BUILD_TYPE=Release ##We want GammaRay to be built in Release-Mode to work as efficient and fast as possible
4. Deploy your build result from lib/gammaray/* to /usr/lib on target. scp -r lib/gammaray/* <()yourtarget>:/usr/lib
5. You can now start your app with the GammaRayProbe inside with LD_PRELOAD=/usr/lib/gammaray/3.0/qt5_15-arm/gammaray_probe.so /path/to/<()yourapp>
6. Done: Connect to <()IP of target> with your Host Gammaray, and you are good! Link to the Install- for Platform-Builders(yocto):https://docs.kdab.com/gammaray-manual...
Links:
Link to the Install- for Platform-Builders(buildroot): https://docs.kdab.com/gammaray-manual...
Link to Gammaray Series: • GammaRay Tutorials
Link to the Install- for Platform-Builders(yocto):https://docs.kdab.com/gammaray-manual...
All 'Reducing your Qt Embedded development cycle time' videos: • Reducing your Qt Embedded Development Cycl...
All 'Embedded with Qt' videos: • Embedded with Qt
About the host:
Christoph has been developing with C++ for over 15 years, and Qt for the last 8. A contributor to Gammaray, KDAB’s in-depth Qt-Analysis-Tool, Christoph specializes in performance optimization for embedded systems.
Every month our newsletter is featuring technical blogs on Qt, C++ and 3D topics: https://www.kdab.com/development-reso...
About KDAB:
KDAB offers experienced software experts to help you deliver functional, high-performing, and innovative software across embedded, mobile, and desktop platforms for projects using C++, Qt, QML/Qt Quick, OpenGL, Qt 3D, and more. https://www.kdab.com/software-services
KDAB experts regularly take time out to deliver KDAB’s world class training, in-house or at open enrollment courses around the world. We are the market leaders for training in Qt, OpenGL, and C++.
Contact us to find out more at [email protected] or visit our website: https://www.kdab.com/software-service...
We are 100+ people, located all around the world. Our Head Office is in Sweden and we have other offices in Germany, France, the UK, and the USA. https://www.kdab.com/about/contact/