cancel
Showing results for 
Search instead for 
Did you mean: 

How to get started with STM32C5 microcontrollers

Sami GUIZANI
ST Employee

Introduction to the STM32C5 ecosystem

The STM32Cube ecosystem accelerates development and enables users to fully benefit from STM32C5 microcontroller features and architecture.

STM32Cube support for STM32C5 microcontrollers consists of a complete software solution that combines a high-quality development toolset with comprehensive embedded software. 

STM32C5 ecosystem support includes:

STM32C5 evaluation kits

A selection of ready-to-use development boards enables users to quickly transform ideas into prototypes. Select and order a preferred board at this link.

STM32CubeC5 embedded software

A set of industrial-grade embedded software. It includes:

  • Two hardware abstraction layers: LL (low-layer drivers) and HAL2 (optimized hardware abstraction layer built on top of LL), providing full access to STM32C5 features
  • A selection of middleware stacks, including FreeRTOS™, USB, file system, and TCP/IP, all efficiently ported to STM32C5 microcontrollers.
  • A large set of production-ready examples projects for drivers and middleware, ported to STM32C5 evaluation kits.
  • The STM32CubeC5 embedded software is further presented and accessible at this link
  • The STM32C5 examples are accessible at this link and on GitHub at this link.

STM32CubeMX2

A configuration and code generation tool that accelerates development on STM32C5 microcontrollers. The tool allows users to set pinout, clocks, peripherals, and middleware configurations and generate full projects with production-ready code in a few clicks. For more information, visit the STM32CubeMX page at this link.

STM32CubeIDE and STM32CubeIDE for VS Code

Two free integrated development environments accelerate code editing, building, and debugging. For more information, visit the STM32CubeIDE page at this link.

STM32CubeProgrammer

Free programming tool for hardware option settings, code loading, and code locking on STM32C5 microcontrollers. Visit the STM32CubeProgrammer page for more information.

STM32CubeMonitor

Free and non-intrusive tool for application monitoring. Visit the STM32CubeMonitor page for more information.

How to develop a prototype on STM32C5

Follow these steps to start a prototype on the STM32C5 microcontroller:

  1. Select and order your preferred STM32C5 evaluation kit

Here is the direct link to the STM32C5 boards portfolio.

  1. Obtain an example project from the STM32 Example Library
    • Access to the STM32 Example Library to this link.
    • Specify your target STM32C5 evaluation kit.
    • Browse and select the most appropriate example project for your needs.
    • Example projects are available with or without an associated STM32CubeMX2 configuration project (with or without an IOC2 file).

When an ioc file is provided, in addition to the available integrated development environment (IDE) project, users can access a companion STM32CubeMX project that manages the STM32C5 pinout, clock, peripherals, and middleware configurations associated with the selected example.

The example “example_start_from_nucleo” integrates the Nucleo board’s main features, including the LED, user button, and terminal connection, and can serve as a simple starting point.

  1. Select your preferred integrated development environment (IDE) and download your project.
  2. Open the downloaded project in your preferred IDE.

STM32C5 is supported by two free IDE options: STM32CubeIDE and STM32CubeIDE for VS Code. Visit this link for more details and to select your preferred option.

  • Build the project and load it onto your STM32C5 board.
  1. Add your application code, build it, and debug it.

If the project includes an IOC2 file, use the STM32CubeMX2 tool (in parallel with your selected IDE) to add or modify the STM32C5 microcontroller peripherals or middleware configurations and generate associated code. The tool automatically updates your IDE project code with the new configuration. Check this link to obtain the STM32CubeMX2 tool.

  • Double-click the IOC2 file to open the STM32CubeMX2 project. You can then access the pinout, clock, peripherals, and middleware configurations.
  • Modify existing configurations or add new ones as needed.

How to develop end applications on an STM32C5

Different user journeys exist when developing a project targeted for production on STM32C5 microcontrollers. The most common journeys are described below.

Journey 1: Using an STM32 native project structure and hardware abstraction layers

  1. Use the STM32CubeMX2 tool to set the STM32C5 configuration and generate the initial IDE project
  • Download STM32CubeMX2 from the STM32CubeMX page following this link.
  • Create a new project by selecting MCU as the target, then choose the STM32C5 part number and create the STM32CubeMX2 project.
  • Set the pinout, clock, peripherals, and middleware configuration as required.
  • In project settings, select the target IDE project format.

STM32C5 is supported by two free IDE options: STM32CubeIDE and STM32CubeIDE for VS Code. Visit this link to get more details and get your preferred option.

  • In project settings, choose CMake for STM32CubeIDE or STM32CubeIDE for VS Code, Open-CMSIS for Keil® Studio IDE, and IAR for IAR IDE project formats.
  • When the STM32C5 configuration and project settings are complete, generate the IDE project.
  1. Open your project in the IDE.
  • Build the project and load it onto the STM32C5 board.
  1. Add application code, build, load, and debug.

Refer to STM32CubeIDE and STM32CubeIDE for VS Code documentation at this link. Access hundreds of production-ready STM32C5 example projects in the STM32 Example Library at this link.

Obtain additional software components for STM32Cube expansions from ST GitHub.

  1. If required, update the STM32C5 configuration in STM32CubeMX2.
  • Change peripherals initialization as needed.
  • Enable and add new peripherals or middleware to the STM32CubeMX2 project.
  • Regenerate code with STM32CubeMX2. The generated code is kept in separate files in the IDE project to avoid overwriting application code.

Journey 2: Using a custom project structure and leveraging STM32 tools and hardware abstraction layers

  1. Start with your reference project structure in your preferred IDE.

Many partner IDEs offer native support for STM32C5 microcontrollers, such as Arm® Keil® and IAR EWARM.

STM32C5 is supported by two free IDE options: STM32CubeIDE and STM32CubeIDE for VS Code. Visit this link to get more details and get your preferred option.

You can also use STM32C5 projects templates containing STM32C5 startup files that are available in the STM32 Example Library.

  1. Create and maintain a STM32CubeMX2 parallel project

The STM32CubeMX2 project is a standalone companion project used to generate reference code snippets for copying into the IDE-managed project.

  • Create a new project by selecting MCU as the target, then choose the STM32C5 part number and create the STM32CubeMX2 project.
  • Set the pinout, clock, peripherals, and middleware configuration as required.
  • Use the STM32CubeMX2 code preview feature to access code snippets associated with the STM32C5 configuration.
  1. Add STM32-specific code to the project.
  • Access the STM32CubeC5 embedded software package and download required STM32C5 HAL2 and LL drivers as well as ported middleware.

Optionally, you can use your STM32CubeMX2 project and copy the STM32 drivers (HAL2 or LL) and middleware from the STM32CubeMX2 generated project directory on your PC.

  • Use the STM32CubeMX2 code preview feature to access and copy target configuration code snippets.

Leverage production-ready STM32C5 example projects for code reference in the STM32 Example Library.

  1. Develop and debug your application.
  • Add code, build, and debug in the preferred IDE.
  • Refer to STM32 examples for functionally validated implementations for debug.

Journey 3: Using a custom project structure and a custom hardware abstraction layer

  1. Start with your reference project structure in your preferred IDE.
    • Use STM32 project templates or STM32 example projects as references for STM32C5 startup code and peripherals usage.
  2. Build your own API to access the STM32C5 features.  

You can build your API on top of STM32C5 HAL2 or LL drivers that you can download from STM32CubeC5 embedded software package at this link.

Alternatively, develop your own drivers using STM32C5 hardware documentation at this link.

Journey 4: Porting an existing project to an STM32C5 microcontroller

  • Follow our STM32C5 porting guide at the following link.

Where to find main STM32C5 documentation

Refer to the following links to access STM32C5 microcontroller reference documentation.

Support channels for STM32C5 development

Several options are available to obtain ST support for STM32C5 development.

Version history
Last update:
‎2026-03-18 2:42 AM
Updated by: