Search code examples
dockermakefilearmdebianatmelstudio

How to build an embedded Atmelstudio project on Debian through commandline


So, I am working on an embedded project for a cortex m7 microcontroller (ATSAME70Q21). The code is written in Atmel Studio 7, but I want to build it in a Debian environment through Docker (gcc docker image is Debian-buster based if I'm not mistaken) so that I can work in a Continuous Integration workflow.

At the moment I am trying to manually construct a Makefile, based on the generated makefile by the IDE, but that seems like the wrong way to handle this problem. Maybe I am too tunnel-visioned to notice different solutions. So I would like some help from folks who maybe have struggled with this problem before.

Thanks in advance.


Solution

  • I solved this problem the following way by mimicking the output of Atmelstudio into a CMakeLists file.

    First I analyzed the generated makefile from the debug build to discover what files were built, what compiler flags were used and what programs were called.

    Then I compared the generated makefile from the release build with the debug build to discover the differences.

    With this information, I made a CMake file. For now, I GLOB_RECURSE all my source files, but I could crawl the Atmelstudio *.cproj file to find out what files are required.

    This might not be the ideal answer, but it solves my problem.