STM32CubeIDE Quick Start Guide

User Manual UM2553

Introduction

This document is a brief guide for users to get started quickly with STMicroelectronics STM32CubeIDE. STM32CubeIDE is an integrated development environment (IDE) based on the Eclipse® framework. It is aimed at users developing embedded software in C/C++ for STMicroelectronics STM32 MCUs and MPUs.

This manual provides basic information about:

Document UM2553 - Rev 2 - November 2020. For further information contact your local STMicroelectronics sales office. Visit www.st.com.

1 Information Center

When STM32CubeIDE is started for the first time, the Information Center opens.

Figure 1: STM32CubeIDE with Information Center

The Information Center enables the user to quickly reach information about the product and how to use it. By clicking on the corresponding hypertext links, manuals are opened and latest information is obtained from the STMicroelectronics website at www.st.com. It is not required to read all material before using STM32CubeIDE for the first time. Rather, it is recommended to consider the Information Center as a collection of reference information to return to. The Information Center window can be reached at any time via the [Help] > [Information Center] command. When the Information Center tab is closed, the standard views in the C/C++ perspective are opened.

STM32CubeIDE supports STM32 32-bit products based on the Arm® Cortex® processor.

Note: Arm is a registered trademark of Arm Limited (or its subsidiaries) in the US and/or elsewhere.

2 Workspace and Projects

Figure 2: STM32CubeIDE with C/C++ perspective open, no project defined yet

STM32CubeIDE is built using the Eclipse® framework; it inherits characteristics that may be unfamiliar to new users. The Eclipse® editing environment uses perspectives. A perspective is a set of windows dedicated to a purpose. The C/C++ perspective is dedicated to writing and editing code, and navigating through projects. Users spend a lot of time in this perspective.

Another popular perspective is the Debug perspective, where users debug and test. Switching back and forth between perspectives is easy, and can even be automatic in some cases.

Workspace and projects: The next thing to do is create a project, which requires introducing the concept of a workspace. A workspace is a container that includes project folders or information about project folders, and a .metadata folder that contains information about the projects. A workspace is simply a folder on a hard drive, which can be located anywhere in the storage media. When STM32CubeIDE starts up, it asks which workspace must be used. This may be changed at any time by selecting [File] > [Switch Workspace] and navigating to another folder.

Note: Workspace and project names must contain only ASCII characters. This is also valid for the path to the workspace.

Creating the first project: The easiest way to create a new embedded project is to use the STM32 Project wizard. It is selected through the [File] > [New] > [STM32 Project] menu command, and launches the embedded MCUFinder:

  1. Select the target MCU or board and go to the next page.
  2. Enter a project name and select the settings wanted for the project in the dialogue boxes.
  3. Click on [Finish]. This brings up the STM32CubeMX window for configuring the peripherals, clock, middleware, and the power consumption.

Information gathered by the Project Wizard includes:

Figure 3: New project wizard

3 Project Information

Figure 4: Project Explorer window populated with a project

Once the information is entered in the wizard, it is possible to work in the project itself:

Controls: All control icons have tool tips activated by hovering the mouse over the icon. The icons are shortcuts for the same functions that can be activated from the main menu bar. These icons control specific functions that pertain to code editing, building and project management; they are unique to the C/C++ perspective.

Figure 5: Main control icons for editing, building, and project management

4 Debugging

Once the project is built without errors, use the icon [run debugger] to launch the program code into the part together with the debugger. The first time a debug session is launched, STM32CubeIDE builds the project and then shows the debug launch configuration menu. This gives the user the opportunity to verify settings and make changes if desired.

Important: If the Serial Wire Viewer (SWV) is to be used during debugging, this must be explicitly enabled in the dialogue box:

  1. Click on the [Debugger] tab to reach the SWV settings and enable SWV (SWV is not enabled by default).
  2. If changes are made to the default settings in the launch configuration properties dialog box, they must be saved by clicking on the [Apply] button.

When ready to launch the debug session, click on [OK]. Several things happen "under the hood" including the launch of the debugger driver and GDB server, as well as the programming of the application into the part, and any other actions called for in the startup script. At this point, the application is normally halted at the first line of main().

The main control icons of the debugger are as follows:

Basic debugging techniques:

Configuring and using debugging tools, especially with SWV, is frequently more complicated than using the IDE for C/C++ code development. More details on this topic are provided by associated documents available on the STM32CubeIDE web page, which must be consulted for anything beyond the most basic operations.

Revision History

Table 1: Document revision history

DateVersionChanges
18-Apr-20191Initial version.
2-Nov-20202Updated window screenshots and icons.
Models: STMicroelectronics STM32CubeIDE

File Info : application/pdf, 11 Pages, 374.13KB

Antenna House PDF Output Library 7.0.1600; modified using iText 2.1.7 by 1T3XT C2 v4.2.0220 build 670 - c2 rendition config : Techlit Active

Related Documents

Preview STM32CubeIDE User Guide
Explore the features and usage of STM32CubeIDE, an all-in-one development tool for STM32-based products. This user guide covers project creation, building, debugging, and more.
Preview STM32 32-bit MCUs: STMicroelectronics Product Portfolio and Ecosystem
Explore the comprehensive STM32 32-bit microcontroller portfolio from STMicroelectronics, covering high-performance, mainstream, and ultra-low-power MCUs. Discover the STM32 ecosystem, hardware tools, software solutions, and community resources for embedded development.
Preview STM32L Series: Ultra-Low-Power 32-bit MCUs for Creative Applications
Explore the STM32L series of ultra-low-power 32-bit microcontrollers from STMicroelectronics. Discover the STM32L0, STM32L1, and STM32L4 product lines, their features, performance, and applications for energy-efficient embedded systems.
Preview USB Type-C Power Delivery with STM32 MCUs and MPUs - AN5225 Application Note
STMicroelectronics' AN5225 application note guides the implementation of USB Type-C Power Delivery using STM32 MCUs and MPUs, detailing standards, protection circuits (TCPP01-M12, TCPP02-M18, TCPP03-M20), and hardware/software integration.
Preview STM32CubeCLT: Command-line Toolset for STM32 MCUs | STMicroelectronics
STMicroelectronics STM32CubeCLT is an all-in-one command-line toolset for STM32 microcontrollers. It integrates GNU C/C++ toolchain, GDB debugger, and STM32CubeProgrammer, streamlining embedded development across Windows, Linux, and macOS.
Preview STM32 Overview and Development Tools
An overview of STMicroelectronics' STM32 microcontroller family, covering its diverse product lines, essential development tools such as STM32CubeMX and STM32CubeIDE, and practical examples for embedded system development, including LED blinking and button interrupt handling.
Preview STM32CubeIDE User Guide - Develop STM32 Applications
Comprehensive user guide for STM32CubeIDE, an all-in-one multi-OS development tool for STM32-based products. Learn about project creation, debugging, software analysis, and more.
Preview STM32WB0 HAL and Low-Layer Drivers User Manual
Explore STMicroelectronics' STM32WB0 HAL and Low-Layer drivers for enhanced developer productivity. This manual details software components for STM32 microcontrollers, covering HAL's portability and LL's direct hardware access.