2019-07-11 01:12 AM
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":
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.
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:
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:
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
Solved! Go to Solution.
2019-07-11 05:10 AM
For the record, Ethan HUANG posted the best answer here:
2019-07-11 05:10 AM
For the record, Ethan HUANG posted the best answer here: