https://github.com/elmot/rpi-clion-example
Clion exapmple project for embedded Linux debug
https://github.com/elmot/rpi-clion-example
clion clion-cmake clion-embedded cmake gcc gdb raspberry-pi
Last synced: 27 days ago
JSON representation
Clion exapmple project for embedded Linux debug
- Host: GitHub
- URL: https://github.com/elmot/rpi-clion-example
- Owner: elmot
- License: apache-2.0
- Created: 2021-04-05T12:32:53.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-30T20:31:29.000Z (about 2 years ago)
- Last Synced: 2025-03-29T22:41:10.624Z (about 2 months ago)
- Topics: clion, clion-cmake, clion-embedded, cmake, gcc, gdb, raspberry-pi
- Language: CMake
- Homepage:
- Size: 14.6 KB
- Stars: 9
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Clion example project for embedded Linux debug
===This project demonstrates how to cross-compile and debug an application for Raspberry Pi(RPi).
A workaround for a feature request
[CPP-23898](https://youtrack.jetbrains.com/issue/CPP-23898) is also implemented here.The project is made for Raspberry Pi OS 64-bit, release date 21-Feb-2023,
Kernel version 5.15, Debian version 11 (bullseye)Raspberry Pi is configured to have IP address 192.168.0.101, *sshd* to be started on boot.
Cross-Compilation
---
RPi-compatible toolchain & sysroot are installed to
its standard location *C:\SysGCC\raspberry64*To optimize binary size a special build step is added (see `add_custom_target` clause in `CMakeLists.txt`).
Debugging
---
A run configuration of type `Remote GDB Server` copies the stripped binary to the target board
and starts it there under gdbserver.Generated '.gdbinit' script forces gdb to use symbols from full (i.e. non-stripped) binary.
WSL/Docker requirements
---
* Ubuntu 22.04LTS
* [CMake 3.23+](https://cmake.org/download/)
* Packages installed:
* binutils-aarch64-linux-gnu
* g++-aarch64-linux-gnu
* gcc-aarch64-linux-gnu
* makeReferences
* [CLion homepage](https://www.jetbrains.com/clion/)
* [CLion Remote debug via GDB/gdbserver](https://www.jetbrains.com/help/clion/remote-debug-via-gdb-gdbserver.html)
* [CMake](https://cmake.org/)
* [Raspberry Pi toolchain](https://gnutoolchains.com/raspberry64/)