Search code examples
embedded-linuxyocto

Building two different builds for two different MCUs into one binary blob in one yocto project


We have two different MCUs on our system. The primary one runs an OS that controls the whole system, and the secondary one runs a small task on bare metal.

The secondary has no flash, so when the system starts, it will ask the primary for a program, which the primary will feed it from the primary's flash.

This all works fine, but we have 2 Yocto builds to build each of these, and we have to feed the secondary's software as a built binary blob to the primary's Yocto build.

Is there a way to get one Yocto project to build both, without us having to manually run one build, then the other?


Solution

  • Yocto is definitely not the tool you are looking for from my point of view.

    What you need is more a CI/CD platform like Gitlab which contains the project for the MCU. On each commit (or depending on your build policy) the project is built and binary is pushed to a web server then you Yocto can have a git based version recipe which can download the resulting binary.

    Alternatively, your CI can also manage the Yocto project and start the build triggered by the MCU firmware project.

    This is something common in embedded system to use directly binary instead of sources, e.g. the Linux kernel can embed binary blob for coprocessor but that's clearly not the job of Yocto to handle dependencies between multiple architecture types.