cancel
Showing results for 
Search instead for 
Did you mean: 

What STM32 Project generation tools exist, that can create a project file that works with STM32 CUBE IDE? (I need to create 40 to 50 different ones)

delli
Associate II

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.

6 REPLIES 6
Pavel A.
Evangelist III

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).

What's the role of the IDE interrupt this context? Could yo​u just use make and GNU/GCC directly?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

People like GUI. You know, browse the files, the indexer... build with a click...

As pavel said people like guis

so I want to create gui projects

and eclipse supports command line headless builds those are easy

Paul1
Lead

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:

  • One code and a way to trigger it in 40 different modes, maybe by a command on USB/UART or other port, or by a voltage on an ADC, etc. UART and USB VCP can be minimal parts (Just couple resistors if connect with pogo pins, and either drivable by simple PC UART test code or single key on a terminal program). Or a resistor applied across a voltage divider also using pogo pins in each test jig. Have done similar to both in the past.

Paul

delli
Associate II

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?