Getting started with STM32C5/Journey 2

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

1.Start with the reference project structure in the 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.
  • STM32C5 project templates containing STM32C5 startup files are also available in the STM32 example library.

2.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.

3.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, an existing STM32CubeMX2 project can be used to copy the STM32 drivers (HAL2 or LL) and middleware from the STM32CubeMX2 generated project directory on the 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.

4.Develop and debug the application

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