1

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.

1 Answers1

1

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.

  • sadly I did the same way. I didn't find a 1to1 way to have atmlestudio7 project compiled under linux. So any modification (e.g. adding files) is not reflected to the origianl project and any project modification is not reflected into makefiles => it's a manual work, at least with my knowledge. – Luigi Pirelli Sep 10 '20 at 09:33
  • Since we just had the same issue, I started a tool (as2make) which actually loads the project file (.cproj) and the SDKs (CMSIS, DFP) package descriptors. Afterwards I generate a Makefile (and makedep.mk) file on-the-fly. At the moment the tool's pretty simple and can only what we need, but it is open source and written in Go. Happy to add more features to it: https://github.com/clevabit/as2make – noctarius Aug 23 '21 at 14:30