Buildroot Eclipse Bundle : A
powerful IDE for Embedded Linux
developers
Mélanie Bats
www.flickr.com/photos/playdogil/34085...
Who Am I ?
http://www.flickr.com/photos/anotherashia/5319361416
What is embedded Linux ?
Linux kernel
Open source
components
Specific
applications
(cc)http://www.flickr.com/photos/kafka4...
Building an embedded Linux
system
Building tools
PTXdistOpenWRT
●
Automate system
reconstruction from source
code
●
Suppor...
What is Buildroot  ?
●
Simple build system - http://buildroot.org :
– automate the cross compilation process
– generate ke...
Demo hardware platform
●
Fairly typical ARM
evaluation platform
●
Many devices: Screen,
Network, SD card, USB ...
●
Used t...
Buildroot Demo
m/photos/dierkschaefer/3454606933
Host (PC)
Buildroot
Buildroot generates
Target (ARM)
Toolchain
DirectFB
headers & lib
Openssh
headers & lib
BusyBox
source...
Why Integrating Buildroot in
Eclipse ?
System developers Application developers
http://www.flickr.com/photos/sontranphotos...
Why Integrating Buildroot in
Eclipse ?
●
Open source IDE for
Application developers
– Preconfigured with the
cross compila...
Buildroot toolchain Eclipse plugin
●
Integrate the toolchains to Eclipse CDT
– Read the toolchain description file (/home/...
Integration with CDT
●
Inspired by the Eclipse Blackfin plugin and the GNU ARM
Eclipse plugin
●
Use CDT extension point : ...
Managed build Integration
●
Add the Buildroot toolchains available for:
– Executable project
– Static library project
– Sh...
Buildroot Launch configurations
●
Provide Remote
configurations :
– Launch configuration :
execute the application on
targ...
Buildroot Eclipse plugin
demonstration
(cc) http://www.flickr.com/photos/buetts/1615300533
Pkg-config ?
●
Applications need other libraries than just the standard
C/C++ library
– Graphical, network, crypto librari...
Managed build Integration :
pkg-config plugin
●
Contribute to existing pkg-config plugin :
http://code.google.com/p/pkg-co...
Managed build Integration :
pkg-config plugin
●
Contribute to existing pkg-config plugin :
http://code.google.com/p/pkg-co...
Managed build Integration :
pkg-config plugin
●
Contribute to existing pkg-config plugin :
http://code.google.com/p/pkg-co...
Managed build Integration :
pkg-config plugin
●
Contribute to existing pkg-config plugin :
http://code.google.com/p/pkg-co...
Buildroot pkg-config plugin
demonstration
ww.flickr.com/photos/rpenalozan/5821522384
Autotools ?
●
The most common
configuration and build
system for Linux software
components
●
Composed of autoconf,
automak...
Autotools Integration
●
Autotools plugin already exists in CDT
●
Contribute the cross compiled Buildroot toolchains to
the...
Autotools Integration
●
Autotools plugin already exists in CDT
●
Contribute the cross compiled Buildroot toolchains to
the...
Buildroot Autotools integration
demonstration
(cc) http://www.flickr.com/photos/dierkschaefer/3454601339
Integration with Makefile
●
Add Buildroot toolchain
to Makefile projects
– Add some environment
variables :
●
PATH
●
CC
●
...
Buildroot Makefile integration
demonstration
Integration with CDT : Issues
●
V1.0 uses dynamicElementProvider
– Method returning a hierarchy of objects
implementing IM...
Integration with CDT
Buildroot Eclipse Update-site
●
Update-site integrating embedded Linux tools :
– Buildroot Toolchain Eclipse Plugin
– Pkg-...
Availability
●
Buildroot 2013.02 :
http://buildroot.org
●
Buildroot Eclipse plugin sources (EPL licence):
https://github.c...
Getting started
●
On Github :
https://github.com/mbats/eclipse-buildroot-bundle/wiki/
– Installation details 
– Tutorials
...
Future work
●
Contribute Autotools updates to CDT
●
Integrate :
– RX-TX
– LTTNG
– CMake
– Other relevant Eclipse plugins f...
Questions ?
Contact :
melanie.bats@obeo.fr
(cc) http://www.flickr.com/photos/blanc-pluvial/5614289320
Prochain SlideShare
Chargement dans…5
×

Eclipse Con US 2013 - Buildroot Eclipse Bundle : A powerful IDE for Embedded Linux developers

157 vues

Publié le

Buildroot is a tool designed by embedded Linux developers to build embedded Linux systems using cross-compilation. It allows to build a cross-compilation toolchain (or re-use an existing one), a root filesystem image with applications and libraries, a kernel image and a bootloader image or any combination of these. Buildroot is typically used to create the embedded Linux systems of industrial systems based on the ARM, PowerPC or x86 architectures, by integrating multiple existing open-source components (kernel, base components, graphical libraries, networking applications, etc.) and in-house components specific to the embedded system.

Many of the early embedded Linux developers are used to work with text editors such as Emacs or Vi. However, in the recent years, the major expansion of the embedded Linux platform has attracted many more developers that are more familiar with feature-full, integrated, and user-friendly development environments. To fulfill this need, Eclipse provides an excellent platform, especially with extensions such as CDT, the Autotools plugin, the multiple plugins from the Linux tools project, the Target Communication Framework, and more.

As many embedded Linux developers use Buildroot to build their system, it sounded natural to provide an easy-to-use integration with Eclipse. To achieve that, we:

Developed an Eclipse plugin that automatically registers the available Buildroot toolchains into Eclipse CDT. This allows application developers to transparently build their application, and then execute it and debug it on the embedded target platform directly within Eclipse.
Improved the pkg-config plugin for a better integration with different toolchains.
Created a specialized Eclipse version bundling all the useful existing plug-ins for embedded Linux developers: Eclipse CDT, our specialized Buildroot plugin, the latest remote debugging mechanisms, the Autotools plugin, Linux Tools plugins, etc.
At Eclipse Con Europe, we presented a first initial version of those developments, with basic support for compilation, remote execution and debugging. Through this new talk, we would like to present the improvements that have been brought to the project: integration with pkg-config, improvements of the remote debugging mechanisms, integration with the Autotools plugin and the LTT-ng plugins. We will demonstrate how Eclipse has been extended to match the needs of embedded Linux developers, and we will perform a live demonstration of these capabilities using an ARM development platform for which Eclipse will help build, execute and debug applications.

Publié dans : Logiciels
  • Soyez le premier à commenter

  • Soyez le premier à aimer ceci

Eclipse Con US 2013 - Buildroot Eclipse Bundle : A powerful IDE for Embedded Linux developers

  1. 1. Buildroot Eclipse Bundle : A powerful IDE for Embedded Linux developers Mélanie Bats www.flickr.com/photos/playdogil/3408511286/
  2. 2. Who Am I ? http://www.flickr.com/photos/anotherashia/5319361416
  3. 3. What is embedded Linux ? Linux kernel Open source components Specific applications (cc)http://www.flickr.com/photos/kafka4prez/57293210
  4. 4. Building an embedded Linux system Building tools PTXdistOpenWRT ● Automate system reconstruction from source code ● Support many more CPU architectures ● High flexibility on components configuration ● Most used solution Binary distributions ● Heavyweight systems ● Not all CPU architectures supported ● Not flexible to choose the configuration for each components c) http://www.flickr.com/photos/rpenalozan/5431731224
  5. 5. What is Buildroot  ? ● Simple build system - http://buildroot.org : – automate the cross compilation process – generate kernel images, file system and bootloader ● Developped by : – an open source community – vendor neutral – under GPLv2 ● Actively developped and used for many products ● Written in make language ● Choice of options in configuration interface (cc)http://www.flickr.com/photos/dierkschaefer/3455423900
  6. 6. Demo hardware platform ● Fairly typical ARM evaluation platform ● Many devices: Screen, Network, SD card, USB ... ● Used to develop prototypes ● Reference to design specific board Atmel AT91SAM9G45 (ARMv5) processor (cc) http://www.flickr.com/photos/zainx/5630952655
  7. 7. Buildroot Demo m/photos/dierkschaefer/3454606933
  8. 8. Host (PC) Buildroot Buildroot generates Target (ARM) Toolchain DirectFB headers & lib Openssh headers & lib BusyBox source DirectFB source Openssh source Specific Library source Target File System Kernel Image Applications BusyBox DirectFB Openssh Specific Library Libc Pre compiled Toolchain gcc gdb binutils Libc gcc gdb binutils Libc Specific lib headers & lib Various host utilities : Pkg- config... Kernel source InputsOutputs (cc)http://www.flickr.com/photos/dierkschaefer/3455423900
  9. 9. Why Integrating Buildroot in Eclipse ? System developers Application developers http://www.flickr.com/photos/sontranphotos/6305201837
  10. 10. Why Integrating Buildroot in Eclipse ? ● Open source IDE for Application developers – Preconfigured with the cross compilation toolchain – Easy access to the libraries available on the target – Transfer / Execute remote application – Remote Debug http://www.flickr.com/photos/catcrispi/3095995888
  11. 11. Buildroot toolchain Eclipse plugin ● Integrate the toolchains to Eclipse CDT – Read the toolchain description file (/home/<user>/.buildroot- eclipse.toolchains) – Register dynamically the toolchains in CDT for : ● Managed build projects : executable, static library, shared library ● Autotools projects ● Makefile projects http://www.flickr.com/photos/anotherashia/2573601237
  12. 12. Integration with CDT ● Inspired by the Eclipse Blackfin plugin and the GNU ARM Eclipse plugin ● Use CDT extension point : org.eclipse.cdt.managedbuilder.core.buildDefinitions – according to the Buildroot configuration file: ● declare toolchains ● register ProjectTypes (cc) http://www.flickr.com/photos/jendris/6960151583
  13. 13. Managed build Integration ● Add the Buildroot toolchains available for: – Executable project – Static library project – Shared library project ● Contribute to plugin.xml : <projectType buildArtefactType="org.eclipse.cdt.build.core.buil dArtefactType.exe" ...>
  14. 14. Buildroot Launch configurations ● Provide Remote configurations : – Launch configuration : execute the application on target – Remote Debug configuration : which point automatically on the correct cross- debugger (cc) http://www.flickr.com/photos/ejk/3255860779
  15. 15. Buildroot Eclipse plugin demonstration (cc) http://www.flickr.com/photos/buetts/1615300533
  16. 16. Pkg-config ? ● Applications need other libraries than just the standard C/C++ library – Graphical, network, crypto libraries … ● Manually adding compiler and linker flags is annoying ● Pkg-config is a standard Linux tool to query the compiler and linker flags for a given library $ pkg-config --cflags directfb -D_REENTRANT -I<...>/sysroot/usr/include/directfb $ pkg-config --libs directfb -ldirectfb -lfusion -ldirect -lpthread (cc) http://www.flickr.com/photos/adamfranco/5116575890
  17. 17. Managed build Integration : pkg-config plugin ● Contribute to existing pkg-config plugin : http://code.google.com/p/pkg-config-support-for-eclipse-cdt/ – Fix bugs on PKG_CONFIG_PATH and pkg-config binary path – Use the pkg-config environment variables directly on command – Move the pkg-config configuration to project-level – Improve the UI – Allow a per-toolchain specified pkg-config binary (cc) http://www.flickr.com/photos/rpenalozan/5240901575
  18. 18. Managed build Integration : pkg-config plugin ● Contribute to existing pkg-config plugin : http://code.google.com/p/pkg-config-support-for-eclipse-cdt/ – Fix bugs on PKG_CONFIG_PATH and pkg-config binary path – Use the pkg-config environment variables directly on command – Move the pkg-config configuration to project-level – Improve the UI – Allow a per-toolchain specified pkg-config binary (cc) http://www.flickr.com/photos/rpenalozan/5240901575
  19. 19. Managed build Integration : pkg-config plugin ● Contribute to existing pkg-config plugin : http://code.google.com/p/pkg-config-support-for-eclipse-cdt/ – Fix bugs on PKG_CONFIG_PATH and pkg-config binary path – Use the pkg-config environment variables directly on command – Move the pkg-config configuration to project-level – Improve the UI – Allow a per-toolchain specified pkg-config binary (cc) http://www.flickr.com/photos/rpenalozan/5240901575
  20. 20. Managed build Integration : pkg-config plugin ● Contribute to existing pkg-config plugin : http://code.google.com/p/pkg-config-support-for-eclipse-cdt/ – Fix bugs on PKG_CONFIG_PATH and pkg-config binary path – Use the pkg-config environment variables directly on command – Move the pkg-config configuration to project-level – Improve the UI – Allow a per-toolchain specified pkg-config binary (cc) http://www.flickr.com/photos/rpenalozan/5240901575
  21. 21. Buildroot pkg-config plugin demonstration ww.flickr.com/photos/rpenalozan/5821522384
  22. 22. Autotools ? ● The most common configuration and build system for Linux software components ● Composed of autoconf, automake and libtool ● Developers write : – Configure.ac – Makefile.am ● Final makefiles generated by those tools (cc)http://www.flickr.com/photos/rotia/8082650255
  23. 23. Autotools Integration ● Autotools plugin already exists in CDT ● Contribute the cross compiled Buildroot toolchains to the Autotools in CDT – Modify autotools.ui : ● Update the Autotools project creation wizard ● Update the Autotools specific menus – Modify autotools.core : ● Provide a way for toolchains to set a default value for the --host configure option (cc) http://www.flickr.com/photos/nukamari/3325435178
  24. 24. Autotools Integration ● Autotools plugin already exists in CDT ● Contribute the cross compiled Buildroot toolchains to the Autotools in CDT – Modify autotools.ui : ● Update the Autotools project creation wizard ● Update the Autotools specific menus – Modify autotools.core : ● Provide a way for toolchains to set a default value for the --host configure option (cc) http://www.flickr.com/photos/nukamari/3325435178
  25. 25. Buildroot Autotools integration demonstration (cc) http://www.flickr.com/photos/dierkschaefer/3454601339
  26. 26. Integration with Makefile ● Add Buildroot toolchain to Makefile projects – Add some environment variables : ● PATH ● CC ● CXX Those are typically used in standard makefiles (cc) http://www.flickr.com/photos/22425840@N00/2648507349
  27. 27. Buildroot Makefile integration demonstration
  28. 28. Integration with CDT : Issues ● V1.0 uses dynamicElementProvider – Method returning a hierarchy of objects implementing IManagedConfigElement – Contributing environment variables through configurationEnvironmentSupplier requires a DefaultManagedConfigElement ● Consequently for V2.0 build dynamically the plugin.xml – Use startup extension point ;( – Missing dynamic extension points in CDT ? ● scanner configuration discovery profile ● launch configuration
  29. 29. Integration with CDT
  30. 30. Buildroot Eclipse Update-site ● Update-site integrating embedded Linux tools : – Buildroot Toolchain Eclipse Plugin – Pkg-config – CDT – Linux tools – Autotools … ● Make a Ready-to-Use development platform for embedded Linux ● Use Tycho to create update-site (cc) http://www.flickr.com/photos/kafka4prez/56978610
  31. 31. Availability ● Buildroot 2013.02 : http://buildroot.org ● Buildroot Eclipse plugin sources (EPL licence): https://github.com/mbats/eclipse-buildroot-toolchain-plugin ● Buildroot Eclipse bundle sources : https://github.com/mbats/eclipse-buildroot-bundle ● Pkg-config Eclipse plugin : http://code.google.com/p/pkg-config-support-for-eclipse-cdt/ ● Buildroot Eclipse bundle update-site (based on Eclipse 4.2) (cc) http://www.flickr.com/photos/kaptainkobold/4249636579
  32. 32. Getting started ● On Github : https://github.com/mbats/eclipse-buildroot-bundle/wiki/ – Installation details  – Tutorials – Bug tracker ● Give us feedback ! (cc) http://www.flickr.com/photos/emeeelea/2425295021
  33. 33. Future work ● Contribute Autotools updates to CDT ● Integrate : – RX-TX – LTTNG – CMake – Other relevant Eclipse plugins for embedded Linux development ● Bug fixes ● What do you need ? (cc) http://www.flickr.com/photos/21649179@N00/335649202
  34. 34. Questions ? Contact : melanie.bats@obeo.fr (cc) http://www.flickr.com/photos/blanc-pluvial/5614289320

×