Book Image

Embedded Linux Development Using Yocto Project Cookbook - Second Edition

By : Alex Gonzalez
Book Image

Embedded Linux Development Using Yocto Project Cookbook - Second Edition

By: Alex Gonzalez

Overview of this book

The Yocto Project has become the de facto distribution build framework for reliable and robust embedded systems with a reduced time to market.You'll get started by working on a build system where you set up Yocto, create a build directory, and learn how to debug it. Then, you'll explore everything about the BSP layer, from creating a custom layer to debugging device tree issues. In addition to this, you’ll learn how to add a new software layer, packages, data, scripts, and configuration files to your system. You will then cover topics based on application development, such as using the Software Development Kit and how to use the Yocto project in various development environments. Toward the end, you will learn how to debug, trace, and profile a running system. This second edition has been updated to include new content based on the latest Yocto release.
Table of Contents (13 chapters)
Title Page
Dedication
Packt Upsell
Foreword
Contributors
Preface
Index

Native GDB debugging


On devices as powerful as the Wandboard, native debugging is also an option for debugging sporadic failures. This recipe will explore the native debugging method.

Getting ready

For native development, Yocto offers the -dev and -sdk target images. We can create -dev and -sdk versions of any image recipe by adding the following image features:

  • tools-sdk: Adds developing tools to the target image. This is already included in the available -sdk images but not on -dev images.
  • tools-debug: Adds debugging tools to the target image. This is already included in the available -sdk images but not on -dev images.
  • dev-pkgs: Adds development packages with headers and libraries to the target image. This is included in both -sdk and -dev image types available.
  • dbg-pkgs: Adds debug information to all packages in our image.

To just add native GDB debugging capabilities to an image such as core-image-minimal, we only need the dbg-pkgs and tools-debug features, which we can add with the following...