cancel
Showing results for 
Search instead for 
Did you mean: 

Toolchain Folder Location Ambiguity

Adam Hamilton
Senior

When creating a new CMake-based project in STM32CubeMX, the "Toolchain Folder Location" field is auto-populated with the project folder path upon entering a project name. This behaviour is misleading because the field is intended (at least by its description) to specify the location of the actual toolchain binaries (e.g., GCC ARM) and it is unlikely that a toolchain is installed in a specific project folder.

I have tried to understand what this is by consulting the User Manual UM1718 Revision 49, and there were two references that matched the text "toolchain folder", both of which provided no helpful guidance on what this is actually used for.

AdamHamilton_0-1767963469139.png

This is pretty much the only reference that describes what this option is for, which basically tells you nothing but confirms the toolchain is located in the project folder by default.

Steps to Reproduce:

  1. Launch STM32CubeMX.
  2. Select a target MCU (e.g., STM32C011F6Px).
  3. Choose CMake as the project type.
  4. Attempt to change the field before setting a valid project path—field remains inaccessible and a message box appears. See below for further detail and a screenshot.
  5. Observe that the "Toolchain Folder Location" field is auto filled with the project folder path.

Expected Behavior:

  • The field should either remain blank or use a previously saved toolchain.
  • It should not be populated with the project location.
  • Users should be able to set this field independently of the project path. Please see the below screen shot if I try to fill the toolchain folder location before I enter a project name.

AdamHamilton_0-1767962234433.png

The error message here seems incomplete and at odds with what the toolchain is for.

Impact:
This behaviour can lead to confusion because the toolchain is designed to be independent of any project you might develop. I have a toolchain installed on my computer and I would like to use this for every project I make.

Suggested Improvement Ideas:

  • Decouple the "Toolchain Folder Location" field from the project path initialization.
  • Add a tooltip or help text clarifying what this field is for.
  • Allow users to set this field before defining the project folder.
  • Persist this toolchain for future projects.
  • Provide a toolchain manager that allows you to save different toolchains, along with the ST provided build of gcc and then allow the user to select this with a dropdown combo box.

Thanks

Adam

3 REPLIES 3
Ghofrane GSOURI
ST Employee

Hello @Adam Hamilton 

Thank you for posting.

Toolchain Folder Location” does not point to your compiler installation (e.g., GCC ARM). Instead, it is simply the directory where CubeMX generates the toolchain/IDE-specific project files.

It is not used to locate arm-none-eabi-gcc or any other compiler binary.

It is the output folder for generated build-system artefacts, depending on the chosen “Toolchain/IDE”:
For CMake: CMakeLists.txt.

For  STM32CubeIDE: 

.project, .cproject (Eclipse project metadata)
.settings/ (Eclipse/STM32CubeIDE settings)
STM32xxxx_FLASH.ld, startup files, etc.

 

THX

Ghofrane

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi @Ghofrane GSOURI I think you completely misunderstood the intent of my post.

I am very much aware that the Toolchain Folder Location does not point to the compiler installation. This is the reason why I created the post in the first place.

I made the point that the name Toolchain Folder Location has a specific meaning. I am a software developer with more than 20 years experience; with around 10 of those being in a professional setting and in my time, the word toolchain means a set of tools used to transform source code into a final application, and certainly not the build script files.

Please look over my suggestions and see whether these can be incorporated into a future revision of the application because I really like the STM32CubeMX software but I don't want to be jumping through hoops every time I create an application.

At the very least, rename that text box field to Build Script Directory Location. Don't use Folder because this is very much a Windows only name whereas Directory is the proper name.

Hello @Adam Hamilton 

Your contribution is greatly appreciated.

Your change request has been escalated to dev team for feasibility check under internal ticket ID 225414 

I will keep you posted with updates.

THX

Ghofrane 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.