Install embedded Linux toolchain on windows

Install embedded Linux toolchain on windows

The toolchain for embedded Linux should be matched for the target image, and that is why we can’t just find and download it from somewhere. Therefore, we should be it. This is a tutorial on how to build and install YOCTO SDK on a windows machine. This allows developing embedded Linux on windows using eclipse or even visual studio.

Setup YOCTO build

If you already have a YOCTO build, you need to make the following simple steps:

add to conf/local.con the following 2 lines:


Download and install meta-mingw layer. Just add the following line to your conf/bblayer.conf. Just make sure that the branch of meta-mingw layer corresponds with the branch of the YOCTO installation.

BBLAYERS =+ "/path/to/meta-mingw"

Now it just has to type bitbake meta-toolchain, and the magic should happen.

What next

  • if everything was good. The toolchain will be deployed to build/tmp/deploy/sdk.
  • To embedded the toolchain in IDEs like eclipse and qt-creator. I usually work with CMake projects, and it is easy to port a CMake project for both IDEs on windows. See post the I wrote on it.
  • Using visual studio. See this ref.

trouble shout

When using the poky distribution like I did here there were no problems. I worked with the zues branch, and everything was by the book.

When I work with yocto distribution for stm32mp I had to work around some issues. I think it relates to the way the ST defines its yocto distribution.

  • As a result of the following error message.
ERROR: Task do_install in virtual:nativesdk:/path/to/yocto/layers/openembedded-core/meta/recipes-core/glibc/ depends upon non-existent task do_stash_locale in /path/yo/yocto/layers/meta-openembedded/meta-mingw/recipes-devtools/mingw-w64/
ERROR: Command execution failed: 1`

I had to add the following lines to this file

addtask do_stash_locale after do_install before do_populate_sysroot do_package
do_stash_locale() {
  • Added the disabling of TUI option in GDB (by –diable-tui) during the building of GDB at this file gdb-cross-canadian_%.bbappend. For some reason that I don’t understand, the TUI option was probably added in the ST yocto distribution.
EXTRA_OECONF_append_sdkmingw32 = "--disable-tui --without-curses --without-system-readline --with-python=no"
  • In this file I had to disable some native SDK packages that were filed during the compilation.
ST_DEPENDENCIES_BUILD_FOR_SDK_append = " nativesdk-openssl-dev "
comments powered by Disqus