2022-07-02 03:49 PM
I have read over: https://community.st.com/s/question/0D53W00000S6WiuSAF/stm32cubeide-cmake-integration
I want/need to be able to create a STM32 project external to the STM32Cube, I have about 40 to 50 small projects I have to create and these change quite a bit from time to time.
The example is a unit-test for 40 to 50 features, each unit test needs a separate private standalone buildable project that creates ONE executable that can be loaded into a board
*AND* that generally means 40 to 50 .project and .cproject files - each in their own directory.
Creating projects by hand and recreating is just not a viable solution.
I'd love to be able to script (via Python or something) a series of projects in a simple way
Yes I can generate Makefiles, but CUBE demands that each ".project" have its own source directory - I do not want to make 40 to 50 copies of my library, I would greatly prefer to have a single library source directory that multiple projects can use.
2022-07-02 06:48 PM
Makefiles are a good choice. Each Eclipse CDT project must have its own directory, but all projects can share same library and custom files. Just as you specify in the makefiles.
Also there's a CMake generator for Eclipse CDT (generic, not CubeIDE).
2022-07-03 01:16 AM
What's the role of the IDE interrupt this context? Could you just use make and GNU/GCC directly?
2022-07-03 08:54 AM
People like GUI. You know, browse the files, the indexer... build with a click...
2022-07-03 10:04 AM
As pavel said people like guis
so I want to create gui projects
and eclipse supports command line headless builds those are easy
2022-07-04 08:54 AM
a. Create all the required projects in a folder, i.e. D:\projects\git\SetOfProjects\ (I Refer to as Container Folder)
In MX you can open a created ioc (common settings for all your test code), then do save-as to save with new name and modify as required, then generate code. This will result in a set of similar projects in folders under the container folder.
b. If you use "open projects from filesystem" and select the container folder you can open all projects at once in IDE, and build/clean all at same time.
c. Create "Lib"/"Shared" folders in the container folder. If you "close" the container project (but not "delete" it) any non-project folders get hidden (but their files will show under each project if you defined them as source/includes in the IDE projects).
d. Put your common files in those "Lib" Folders, like LibMotors, LibDiag, LibMain. You can configure each project to use those "Lib" folders for Source & Include. You can also set each project to "exclude from build" for source/resources it doesn't need.
e. Then just main the main() generated in each project call main2() that is in LibMain\main2.c (or Main2.cpp)
Not perfect but works.
Alternate:
Paul
2022-07-04 09:01 AM
Oh I'm famiar with a "multi-call" binary (much like busy box) - I can also create a command line interface that the test harness types the test name into ... that's not a big deal
I also need to know the format of the IOC files that MX uses - and isn't MX dead?