cancel
Showing results for 
Search instead for 
Did you mean: 

How do I change an STM32 project to a Non Managed Makefile MCU project

Pieter Conradie
Associate III

Hi everyone!

I am trying to create a new STM32 project (not based on STM32Cube) that uses my supplied Makefile to build the project. This means that it should not use the CDT Managed Makefile way of building the source, but should use a user supplied Makefile in the root of the project (in the same directory as .project and .cproject).

I create a new STM32 Project and specify the Targeted Project Type as "Empty":

0690X000009YdjEQAS.png

I then close STM32CubeIDE, delete the wizard generated source files, copy my source files into the project directory, restart STM32CubeIDE and press F5 to refresh the project.

0690X000009YdkHQAS.png

So far so good. It is displaying my source files including the Makefile, but here is where I hit the wall hard.

I can not tell STM32CubeIDE to use my Makefile to build the project. I see that under Project Natures, it is a "Managed Makefile MCU Project" and that a "Non Managed Makefile MCU Project" option does exist:

0690X000009YdkbQAC.png

I tried removing the "Managed Makefile MCU Project" and replacing it with the "Non Managed Makefile MCU Project" nature, but when I try to build I still got "Nothing to build for project gpio". I guess that I don't know enough about Project Natures to use it properly.

UPDATE: Here is the solution that found: I have to untick "Generate Makefiles automatically" and set the Build directory to the root of the project where my Makefile is located:

0690X000009YdnBQAS.png

This works a treat :) I am able to build and debug my project.

If someone finds a more elegant solution, please post to this thread.

Best regards,

Pieter

https://piconomix.com

1 ACCEPTED SOLUTION

Accepted Solutions
1 REPLY 1
Pieter Conradie
Associate III