2021-09-10 09:57 AM
I'm trying to create process for development with CubeMX/CubeIDE projects.
I'm seeing pathing issues that show up when my project is moved. Which also means when it's cloned to another computer.
Simple steps I've done to reproduce this:
Created a new project with CubeMX. It generated the code and then imported to CubeIDE.
Project works and builds.
Now, I move the project to a different directory. (Which also happens when I clone it)
The project can no longer find files in the "Drivers" subfolder.
If I look at one of the files on the original (working) project I can see how it resolves:
Once I've moved the folder it resolves different and completely changes the pathing:
In practice will want to push and then clone these projects. However, each attempt ends the same way. The pathing resolves differently than where it was generated.
How can I make this work?
Solved! Go to Solution.
2021-09-10 02:28 PM
CubeMX -> Project Manager -> Code Generator -> Copy only the neccessary library files should do that.
2021-09-10 11:57 AM
The location vs. Resolved Location looks strange to me. I use git regularily without issues. In my case, each project folder gets its own git repo. The Ressource tab looks like
2021-09-10 12:03 PM
That's generally what the resource tab looks like for me too.
The image above is a specific file in the "Drivers" subfolder, which is not part of the project. It's linked back to the STM32Cube folder where the firmware and driver code it. The issue I am having is with that type of file, not one that's physically present in the folder.
2021-09-10 12:13 PM
I see. I'm always using deep copies of the lib code (Drivers...). You seem to use Eclipse linked files. Don't know how that could be integrated. Git submodules? Are there advantages of your approach? I like to keep the projects as self-contained as possible.
hth
KnarfB
2021-09-10 12:20 PM
This is how CubeMX generated the project. I checked to see if CubeMX had a "copy firmware/drivers to project" option but it doesn't seem to.
2021-09-10 02:28 PM
CubeMX -> Project Manager -> Code Generator -> Copy only the neccessary library files should do that.
2021-09-13 07:07 AM
Yup, that's the ticket! Thank you so much!
2021-09-19 06:54 AM
I find this simple procedure helpful: How to duplicate projects in STM32CubeIDE. Hopefully it solves your issue.
2021-09-19 08:56 AM
@Kmax18 this page is not relevant, sorry. The OPs question is about checking projects in version control so that they can be cloned on another computer.