cancel
Showing results for 
Search instead for 
Did you mean: 

If you only have MX, how do you build the SW?

ubaldot
Senior

I am wondering, if one only downloads MX, then how the software is built? 
Is the standard arm-eabi-none toolchain enough? Are in the standard toolchain all the needed include files and libs present? Or ST used its own version of the toolchain, libs, etc? 

1 ACCEPTED SOLUTION

Accepted Solutions
Pavel A.
Evangelist III

Cortex-M toolchains bundled with CubeIDE are available separately. They contain the C header files (for GCC) and the runtime library (newlib-nano). So yes, with only a toolchain and the "Cube firmware" package you can build code produced with CubeMX to a working binary. Especially, if you have also make and generate the project as a makefile.

View solution in original post

7 REPLIES 7
SofLit
ST Employee

Not clear what you want to do.

CubeMx is the code generator. So all the code initialization as well as the related libraries are available in the project.

You can generate your project with IAR, KEIL, STM32CubeIDE and with makefile.

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.

MX is just a configuration utility; it is does not - and is not intended to - build the code.

You would need to separately install a toolchain to build the code.

You would also need something to write your application code; eg, an IDE.

If you install STM32CubeIDE, it includes MX.

Sorry, perhaps I was not clear enough. Say that you generate code with MX, say that you write your application. 

Then, can I use this: https://developer.arm.com/Tools%20and%20Software/GNU%20Toolchain

for building the software? Or I must use CubeIDE?

Or, in another words: Is the toolchain included in CubeIDE is a modified version of that toolchain I linked? Other than the toolchain, does CubeIDE include custom libraries that are not included in the toolchain that I linked? 

I finally wish to highlight that I am aware that CubeIDE does much more, but I am interested only in the building process. 

TDK
Guru

It is theoretically possible for you to build it yourself using the toolchain. All the necessary files should be present in the CubeMX output.

It is a lot more practical to use STM32CubeIDE to do so.

If you feel a post has answered your question, please click "Accept as Solution".
Pavel A.
Evangelist III

Cortex-M toolchains bundled with CubeIDE are available separately. They contain the C header files (for GCC) and the runtime library (newlib-nano). So yes, with only a toolchain and the "Cube firmware" package you can build code produced with CubeMX to a working binary. Especially, if you have also make and generate the project as a makefile.

I accepted your answer as solution because it really answers my question, thanks. 

However, 


@Pavel A. wrote:

Cortex-M toolchains bundled with CubeIDE are available separately. 


EDIT: I made my Research and I found CubeCLT which seems to meet my requirements, though a redistribution of the gnu-stm32-tools binaries for different platforms would be greatly appreciated by many! :) 

 


@Pavel A. wrote:

 Especially, if you have also make and generate the project as a makefile.


I actually generate MX projects with Makefile and use make. :) 

EDIT: I have just found this: https://community.st.com/t5/stm32cubeide-mcus/how-to-download-unbundled-gnu-tools-for-stm32/td-p/76450/page/2 which seems to be inline with my same problem :) 

Pavel A.
Evangelist III

Here are official ARM toolchains: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads

ST has their own fork; changes are documented in pdf files in the zip.

Good luck.