Yocto Programming with CodeBlocks
Code::Blocks is a free C/C++ IDE built around a plugin framework, designed to be very extensible and fully configurable.
This guide demonstrates how to create and debug a C++ application using Code::Blocks on the DART-MX8M-MINI.
Create your rootfs with Code::Blocks debug support
Debugging with Code::Blocks requires your preferred SSH server (openssh, dropbear, etc), gdb, and gdbserver installed on the target device. Append the following to the conf/local.conf file in your Yocto build directory:
EXTRA_IMAGE_FEATURES = " \ tools-debug \ ssh-server-dropbear \ "
Now bitbake your image.
Setup Host Computer Environment
Please follow the steps below to prepare a fresh Ubuntu 20.04 installation for Code::Blocks debugging:
Install Dependencies
$ sudo apt-get -y update $ sudo apt-get -y install build-essential gdb gdb-multiarch git
Install Code::Blocks
$ sudo apt install codeblocks codeblocks-contrib
Install Yocto Toolchain
A toolchain is necessary for cross compiling applications. To install the toolchain, follow Variscite's Yocto Toolchain installation guide.