2023-05-24 07:44 AM
Hi Team,
Currently my Project have 2 Build variants (Managed via Manage configuration), build are placed in root directory inside Configuration name.
I'm looking for below solution:
Kindly let me know how to achieve above needs.
Thanks & Regards,
Subramanya A
Solved! Go to Solution.
2023-05-27 12:29 PM
Some ST examples have a directory structure where the .project and .cproject are in a subdirectory (CubeIDE), rather than in the root of the project. IIRC if you uncheck "generate under root" in Cube, it creates the same structure. Then the subdirectory with .project & .cproject is the build directory that you want. The per-config subdirs are created under it.
2023-05-24 08:09 AM
Build products for different configurations are placed under different subdirs exactly because they depend on the configuration details (defines, optimization level...). So it's an unusual wish.
If you want to build more than one configuration, you can select this in the GUI or use the command line (aka "headless") builder.
For post-build script IMHO the .sh files are easier to write, and they work even in Windows because CubeIDE toolkit comes with the MinGW busybox.
By the way, the current directory for post-build scripts is the per-config build sub-directory mentioned above. So it's not hard to find it.
2023-05-25 10:28 PM
@Pavel A. Thanks for the answers, now it is clear to me for point 2 & 3, sorry for my bad, for point 1 here is what I was expecting.
Directory of <Project-root>
- app
- build
+- variant1
+- variant2
- core
- drivers
- middleware
I tried by inserting the output prefix path in build properties, "./build/variant1/" and "./build/variant2/".
build was not successfully, error which I received was "c:\st\stm32cubeide_1.9.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.0.202111181127\tools\arm-none-eabi\bin\ld.exe: cannot open map file ./build/variant1/prj-variant1.map: No such file or directory"
if any one achieved this folder structure for build artifacts, kindly let me know for the same.
Thanks & Regards,
Subramanya A
2023-05-27 12:29 PM
Some ST examples have a directory structure where the .project and .cproject are in a subdirectory (CubeIDE), rather than in the root of the project. IIRC if you uncheck "generate under root" in Cube, it creates the same structure. Then the subdirectory with .project & .cproject is the build directory that you want. The per-config subdirs are created under it.