Difference between revisions of "Toolbox"

From eLinux.org
Jump to: navigation, search
(add link to benchmark programs page)
(add Editor tips)
(111 intermediate revisions by 27 users not shown)
Line 1: Line 1:
 
This page has information about developing Embedded Linux, including links to toolchains, debuggers and other development tools.  Also, it has links to pages with debugging tips.
 
This page has information about developing Embedded Linux, including links to toolchains, debuggers and other development tools.  Also, it has links to pages with debugging tips.
  
= Development Tools =
+
<div style="width=100%; background:#FFF;">
 +
{| width="100%" cellspacing="5" cellpadding="0" valign="top" style="background:inherit;"
 +
| valign="top" style="margin: 0 0 0.5em 1em; border:1px solid #aaa; text-align:left; width: 33%;" cellpadding="5"  |
 +
<div style="background: #eeeeee; border: 1px solid #2C547A; padding: 5px; margin: 3px; font-weight:bold;text-align:center;font-size:120%;">Development Tools</div>
 +
<div style="margin: 0 0 0 1em;">
 +
;[[Logic_Analyzers]]
 +
;[[Toolchains]]
 +
;[[Build Systems]]
 +
;[[Embedded Linux Distributions]]
 +
;[[Debuggers]]
 +
;[[Debug Assist Boards]]
 +
;[[Memory Debuggers]]
 +
;[[Tools]]
 +
;[[Integrated Development Environments]]
 +
;[[Emulators]]
 +
;[[Tracers and Profilers]]
 +
;[[Benchmark Programs | Benchmarks]]
 +
;[[Source Management Tools]]
 +
;[[Test Systems]]
 +
;[[Test Tools]]
 +
;[[Scripting]]
  
== Toolchains ==
 
A tool chain is basically defined as a compiler, linker and C library (I.e. GCC, binutils & glibc/uClibc). Optionally, a tool chain may contain a debugger and C++ compiler. Quite often, the tool chain used for embedded devices is a cross toolchain: All the programs (like GCC) run on a PC but produce binary code to run on a different architecture (e.g. ARM). This is called cross compilation and is assumed to be what you want to do. It is possible to compile natively, running gcc on your target. However, unless you have an x86 target, you need a tool chain on your device, which eats up your flash and will also take much longer to compile things than your far more powerful PC. Before going down the route of obtaining a toolchain, it's worth checking to see if one is included with your target's Board Support Package (BSP), if you have one.
 
  
=== Note about C libraries ===
+
</div>
Realistically, there are two options for the C Library: [http://en.wikipedia.org/wiki/Uclibc uClibc] & [http://en.wikipedia.org/wiki/Glibc glibc]. GLibc is what your PC is probably using. It's a bit of a brute, very powerful but a bit bloated. If flash space and memory footprint is an issue, using uClibc is likely to be the better option. However, the space advantages gained using uClibc are becoming less important as the price of memory & flash continues to drop. There are a few "gotcha"s when using uClibc. At time of writing(uClibc 0.9.28), locales are a bit ropey and the new Application Binary Interface (ABI) for ARM architectures (EABI) introduced with GCC 4.1.1 requires patches to be applied. This situation is likely to get better quickly as uClibc is under heavy development.
+
| valign="top" style="margin: 0 0 0.5em 1em; border:1px solid #aaa; text-align:left; width: 33%;" cellpadding="5"|
 +
<div style="background: #eeeeee; border: 1px solid #2C547A; padding: 5px; margin: 3px; font-weight:bold;text-align:center;font-size:120%;">Developer Resources </div>
 +
<div style="margin: 0 0 0 1em;">
 +
;[[Linux Kernel Resources]]
 +
;Kernel Subsystems
 +
*[http://www.linusakesson.net/programming/tty/index.php The TTY Demystified] - excellent explanation of kernel tty system
 +
* [[Device Tree]] - a structure used to describe system hardware at startup - can be passed or modified by firmware, or built into kernel
 +
;Online Documentation
 +
* [http://kernel.org/doc/ols/ Papers from the Ottawa Linux Symposium]
 +
* [http://free-electrons.com/training/devtools Free Software tools for embedded systems]
 +
* [http://free-electrons.com/articles/realtime/ Real time in embedded Linux systems]
 +
* [http://free-electrons.com/articles/optimizations Embedded Linux optimizations]
 +
* [http://free-electrons.com/training/audio Audio in embedded Linux systems]
 +
* [http://free-electrons.com/training/multimedia Multimedia in embedded Linux systems]
 +
* [http://free-electrons.com/articles/elfs/ Embedded Linux From Scratch... in 40 minutes!]
 +
* [http://www.makelinux.net/reference Linux technology reference]
 +
;[[:Category:Books| Books]]
 +
;[[Reference Material]]
 +
;[[Podcasts]]
 +
;[[Device drivers]]
 +
;[[Beginning Programming]]
  
=== Available Toolchains ===
+
</div>
Creating a cross development toolchain from sources can be a real pain. There are version dependency issues, patches required to make something work etc. etc. Check out the [http://kegel.com/crosstool/crosstool-0.43/buildlogs/ build matrix] for crosstool and look at all the red "failed" entries. Fortunately, there are several groups of people who have done all the hard work for you, producing scripts to create a toolchain or releases of binary toolchains.
+
|-
 +
| valign="top" style="margin: 0 0 0.5em 1em; border:1px solid #aaa; text-align:left; width: 33%;" cellpadding="5"|
 +
<div style="background: #eeeeee; border: 1px solid #2C547A; padding: 5px; margin: 3px; font-weight:bold;text-align:center;font-size:120%;">Tips and Tricks</div>
 +
<div style="margin: 0 0 0 1em;">
 +
;[[Chip_Identification|How to Identify IC Markings]]
 +
;[[Code Styling Tips]]
 +
;[[Debugging Tips]]
 +
;[[GDB Tips]]
 +
;[[GCC Tips]]
 +
;[[Editor Tips]]
 +
;[[:Category:Tips and Tricks]]
 +
</div>
  
==== Buildroot ====
+
| valign="top" style="margin: 0 0 0.5em 1em; border:1px solid #aaa; text-align:left; width: 33%;" cellpadding="5"|
Buildroot is a complete build system based on the Linux Kernel configuration system and supports a wide range of target architectures. It generates root file system images ready to be written to flash. In addition to having a huge number of packages which can be compiled into the image, it also generates a cross toolchain to build those packages from source. Even if you don't want to use buildroot for your root filesystem, it is a useful tool for generating a toolchain. It should be noted however that it only supports uClibc. If you want to use glibc, you'll need something else. Link: [http://buildroot.uclibc.org/ Buildroot homepage]
+
<div style="background: #eeeeee; border: 1px solid #2C547A; padding: 5px; margin: 3px; font-weight:bold;text-align:center;font-size:120%;">Misc & Wishlist</div>
 +
<div style="margin: 0 0 0 1em;">
 +
;[[Bluetooth Network| Setting up a Bluetooth Network]]
 +
;[[Continuous Logging for Watchdog Timer Expiration]]
 +
;[[Crash Diagnostics]]
  
==== Scratchbox ====
+
</div>
Scratchbox provides toolchains for ARM and x86 target architectures (with PowerPC, MIPS and CRIS in experimental stages). Both uClibc & glibc are supported. Scratchbox simplifies cross compiling software which is built using GNU autotools - Code tests performed by configure are run in an emulator or even on the actual target. The toolchains scratchbox ships with are based on gcc 3.3 and as such are quite old, but stable and well tested. It should be pointed out that scripts to build custom toolchains are also provided with scratchbox allowing more recent gcc versions to be used. Link: [http://www.scratchbox.org/ Scratchbox]
+
|}
 
+
</div>
==== Crossdev (Gentoo) ====
+
[[Category:Development Tools]]
Crossdev is specific to developers using Gentoo for their development PCs. It is a script which generates a cross toolchain using the portage build scripts for gcc etc. There are numerous architectures which are supported and both uClibc and glibc toolchains can be built. Link: [http://gentoo-wiki.com/HOWTO_Cross_Compile Gentoo Cross-Compile HOWTO]
+
[[Category:Tips and Tricks]]
 
 
==== Crosstool ====
 
Crosstool is a script which downloads source tar-balls and builds simple gcc/glibc cross toolchains. There is a build matrix which shows which versions of gcc/glibc work together with various architectures ([http://kegel.com/crosstool/crosstool-0.43/buildlogs/ link]). The inclusion of this matrix makes it easy to select which versions of gcc/glibc should be used to generate a toolchain for a particular architecture. Link: [http://kegel.com/crosstool/ Crosstool]
 
 
 
==== Code Sourcery ====
 
Code Sourcery is a commercial company which develops cross development tools for numerous architectures. Code Sourcery provides a "lite" version for their ARM, Coldfire & Power PC architecture development tools which is freely available. The toolchains are usually very up-to-date. Link: [http://www.codesourcery.com/ Code Sourcery]
 
 
 
==== Crossdev/tsrpm (Timesys) ====
 
Crossdev is a project sponsored by Timesys, completely unrelated to the Gentoo cross toolchain generation system. The projects main focus is on a tool called tsrpm which is used to build cross development toolchains and generate cross-compiled software packages. Currently only x86 and select PowerPC architectures are supported. Link: [https://crossdev.timesys.com/ Crossdev]
 
 
 
 
 
 
 
* FIXTHIS - need link for debuggers (DDD, gdb, kgdb, etc.)eclipse
 
* FIXTHIS - need link for IDEs (eclipse, etc.)
 
 
 
== Tracers and Profilers ==
 
* see [[Kernel Trace Systems]]
 
 
 
== Benchmarks ==
 
* see [[Benchmark Programs]]
 
 
 
== Source Management Tools ==
 
There are a number of tools for managing patches, which are useful for different tasks.
 
There's now a whole page devoted to this.  See [[Source Management Tools]]
 
 
 
For some simple tools for managing patches, see [[Diff And Patch Tricks]]
 
 
 
= Debugging Tips =
 
* See the [[Kernel Debugging Tips]] page
 

Revision as of 11:56, 4 December 2015