Download The Buildroot user manual
Transcript
The Buildroot user manual 8.11 22 / 131 Integration with Eclipse While a part of the embedded Linux developers like classical text editors like Vim or Emacs, and command-line based interfaces, a number of other embedded Linux developers like richer graphical interfaces to do their development work. Eclipse being one of the most popular Integrated Development Environment, Buildroot integrates with Eclipse in order to ease the development work of Eclipse users. Our integration with Eclipse simplifies the compilation, remote execution and remote debugging of applications and libraries that are built on top of a Buildroot system. It does not integrate the Buildroot configuration and build processes themselves with Eclipse. Therefore, the typical usage model of our Eclipse integration would be: • Configure your Buildroot system with make menuconfig, make xconfig or any other configuration interface provided with Buildroot. • Build your Buildroot system by running make. • Start Eclipse to develop, execute and debug your own custom applications and libraries, that will rely on the libraries built and installed by Buildroot. The Buildroot Eclipse integration installation process and usage is described in detail at https://github.com/mbats/eclipse-buildrootbundle/wiki. 8.12 Advanced usage 8.12.1 Using the generated toolchain outside Buildroot You may want to compile, for your target, your own programs or other software that are not packaged in Buildroot. In order to do this you can use the toolchain that was generated by Buildroot. The toolchain generated by Buildroot is located by default in output/host/. The simplest way to use it is to add out put/host/usr/bin/ to your PATH environment variable and then to use ARCH-linux-gcc, ARCH-linux-objdump, ARCH-linux-ld, etc. It is possible to relocate the toolchain - but then --sysroot must be passed every time the compiler is called to tell where the libraries and header files are. It is also possible to generate the Buildroot toolchain in a directory other than output/host by using the Build options → Host dir option. This could be useful if the toolchain must be shared with other users. 8.12.2 Using gdb in Buildroot Buildroot allows to do cross-debugging, where the debugger runs on the build machine and communicates with gdbserver on the target to control the execution of the program. To achieve this: • If you are using an internal toolchain (built by Buildroot), you must enable BR2_PACKAGE_HOST_GDB, BR2_PACKAGE _GDB and BR2_PACKAGE_GDB_SERVER. This ensures that both the cross gdb and gdbserver get built, and that gdbserver gets installed to your target. • If you are using an external toolchain, you should enable BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY, which will copy the gdbserver included with the external toolchain to the target. If your external toolchain does not have a cross gdb or gdbserver, it is also possible to let Buildroot build them, by enabling the same options as for the internal toolchain backend. Now, to start debugging a program called foo, you should run on the target: gdbserver :2345 foo