2021-08-29 11:19 AM
Not sure if this is the right place to post but for drone firmware such as betaflight or iNav that run off STM32 MCUs like F4xx, how would one go about importing and using the firmware files inside of CUBE IDE so that firmware itself can be changed and other libraries added?
All of the documentation provided is about using the GUI configurator/command line instead dealing with .c and header files directly and unless i'm missing something those .c and header files aren't well too documented either. I've noticed other firmwares like RepRap for 3D printing follow a very similar structure on github. Is there some sort of method to import them into a personal project or generally any tips to look out for?
in iNav's git, under inav/src/main, would all of these files and sub-files be necessary to add into a single project src folder along with inav/src/bl bootloader file to test and use the firmware? What else would be needed?
Github link to iNav: https://github.com/iNavFlight/inav
2021-08-30 12:13 AM
IMHO there is no simple way of doing so. This is because those projects are using their own build process, say cmake based, and folder structure. They may not use an .ioc file for MCU config, use dedicated startup code, dedicated linker files and all that. Some need extra post-processing steps before the firmware will "fly".
You may use the IDE just for editing and then issue the project specific build process. When you want to generate code, like adding a library, I would do that in a STM32CubeIDE dummy project and then copy&paste. You should also ask the project's community if someone did already dug deeper here.
hth
KnarfB
2024-04-18 04:43 AM
Hello
I have tried this for the last 9 months, without success. I even tried various other IDE's.
I had even tried importing the C files etc into C++ Builder for editing, but to no avail.
You will only get as far as editing the C files, but that you could do with any editor.
Trying to compile opensource projects is the worst nightmare for even professional programmers. Remember opensource is a free for all platform and no-one really cares about you. So to even ask a contributor to recompile his source with a couple of additions is an absolute futile exercise. After all, they get nothing in return. I even attempted to offer payment to one repository contributor who came back to me with a $500 price tag! So yes, either you pay your way through or abandon the issue
2024-04-18 04:59 AM - edited 2024-04-18 05:00 AM
Yes it's generally exceedingly difficult for a project of any complexity.
Stick with the prescribed build process for minimum friction. Contributors don't want to spend all their time explaining to every single user how to build the project, especially if it's a tool the user prefers.
That's not to say you can't use whatever editor or source code analysis tools you want to modify and understand the code. Just aren't going to be able to build and debug without effort on your part.
This might be sufficient to get the job done, and perhaps allow you to get a lay of the land as to how the project builds and comes together, and what it would take to import into your tool of choice.
Basically, Pick your battles..
2024-04-18 05:18 AM
Top of my list for things an IDE should be able to do is import a makefile.
After all these mechanically describe all the files and steps involved.
At the very least collect all the file trees into the project view and just run make when you choose Build..