
On Linux and macOS, make sure to have the toolchain path in ~/.profile (not in a shell-specific config like ~/.bash_profile or ~/.zprofile). You can check it by running arm-none-eabi-gcc from the command line - your system should recognize this command. GNU ARM toolchain is a cross-platform set of tools which launches on desktop, while the build result can only run under the target ARM MCU environment.įor CLion to detect the toolchain, it should be presented in system PATH. It generates a stub project which CLion then converts into a CMake project. In CubeMX, you can set up both CPU and peripherals, and adjust frequencies and pin modes. Required toolsĬubeMX is a graphical tool that helps configure STM32 microcontrollers and generate the corresponding C code. The following board configurations are not supported at the moment: STM32MP1, dual-core lines of STM32H7, and STM32L5 with TrustZone(R) enabled. In the latter case, ignore the OpenOCD-related settings and steps of your project set up. However, STM32CubeMX projects are not limited to be used with OpenOCD only: you can also set up a more generic Embedded GDB Server run/debug configuration.

For this reason, project settings and certain steps of the project creation procedure are coupled with OpenOCD. STM32CubeMX support in CLion is a part of the bundled OpenOCD + STM32CubeMX plugin. Or you can start a new project from scratch - the wizard will help you configure it in CubeMX.

ioc file generated by CubeMX as project, and CLion will automatically create a CMake project structure. For embedded projects that target STM32 boards, CLion integrates with STM32CubeMX.
