Search code examples
mcu

How to build an MCUXpresso project with github actions?


I have an micro controller (MK22FX512) that I program with MCUXpresso. The project is on GitHub, now I want to build (on PR/PUSH) the project using GitHub Actions. Anybody has experience with that ?


Solution

  • This is a tricky question. Usually this is done with Docker/containers, but it is complicated. I can give you better solution. Make self-hosted runners and install on your build server MCUExpresso under Ubuntu OS. After that you have to install xvfb which will allow you to have headless X-org framebuffer needed by MCUExpresso/Eclipse IDE:

    apt install xvfb

    After that you have to edit your continuous integration yaml file with :

    1. Import project xvfb-run IDE -nosplash --launcher.suppressErrors -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data WORKSPACE -import PROJECT

    2. Clean and build project xvfb-run IDE -nosplash --launcher.suppressErrors -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data WORKSPACE -cleanBuild PROJECT/TARGET

    Where: IDE is location of the MCUExpresso. For Ubuntu it is : /usr/local/mcuxpressoide/ide/mcuxpressoide WORKSPACE is a dummy folder PROJECT is the project name. Note : if you rename your folder with the project, this is not your project name. You have to open .project file and to get project name from there. TARGET is the build target in the MCUExpresso. Usually this is Debug or Release.