Normally a Yocto SDK includes all dependencies that are needed to build everything on your target image. But how can you add something to your SDK specifically? That might be useful if you want to build software components that are not included in your final image or you might want to provide developers with some development tools.
If you have done some Yocto development you might already have encounter them in the wild…
native
and nativesdk
recipes…
Recipes cannot only be built for the target, but also for your build host or your SDK host.
This post gives a short summary about what the different recipe “flavors” are used for
and how to add them to your recipes.
Another classic Gang of Four Pattern is the
Observer Pattern. In this
pattern, observers want to be notified about state changes of a subject.
In this post we will look how to easily implement this with std::function
.
Don’t worry. This is not yet another take on the classic Gang of Four Command Pattern. Instead we look at how we can use modern C++ features to solve the same problem in a different way. Namely we want to send commands to a (possibly) remote application, whilst choosing a testable and maintainable design.
C++ is an object-oriented language and inheritance can be used to define relationships between objects in the form of class hierarchies. It provides a mean to structure and organize your code. Assuming that you already know the basics of inheritance, we will look at how and when to best use it. Especially we look at how to use it for runtime and compile time polymorphism.
The singleton is one of the simplest object-oriented C++ patterns. Probably due to its simplicity, it is also an often misused one. It is easy to implement your own, and therefore one might tend to use it a bit too often as a design choice. When should you use a singleton then? The answer is quite obvious, when you need a unique global object. However remember, global variables are usually frowned upon and you shouldn’t treat a singleton any other way. Avoid global variables as much as you can, but in some cases they are valid design decisions.
Back to basics. When I started C++ programming I had a hard time figuring out how to organize my projects. Most text books or lectures were more focused on teaching either programming principles or language features. So in this post I would like to share what is in my opinion the best project structure.
In this post we are going to create our own yocto layer.
The Yocto Project is an open source project that lets you
create your own embedded linux distribution. You create recipes that are bundled
into layers (which are usually called meta-something
).
The recipes consist themselves of tasks (do_compile
, do_install
…) and let you
specify dependencies between tasks. These recipes are then baked into an image
with yocto’s build system called bitbake
.
The generated outputs of a recipe are called packages (one recipe can provide several packages).