STM32CubeIDE

Revision as of 16:39, 28 May 2020 by Registered User
Under construction.png Coming soon

This article explains some of the basics of STM32CubeIDE. It is an all-in-one multi-OS development tool, which is part of the STM32Cube software ecosystem. STM32CubeIDE is an advanced C/C++ development platform with peripheral configuration, code generation, code compilation, and debug features for STM32 microcontrollers and microprocessors. It is based on the ECLIPSE™/CDT framework and GCC toolchain for the development, and GDB for the debugging. It allows the integration of the hundreds of existing plugins that complete the features of the ECLIPSE™ IDE. STM32CubeIDE integrates all STM32CubeMX functionalities to offer all-in-one tool experience and save installation and development time.

1. Prerequisites[edit source]

The following tools are prerequisites for understanding the tutorial on this wiki page and developing an application based on the STM32MP1 Series:

  • STM32CubeIDE 1.1.0 or newer
  • STM32Cube_FW_MP 1.1.0 or newer
  • STM32CubeMX 5.4.0 or newer

2. How to get started with STM32CubeIDE[edit source]

This section links to two different how to articles depending on if you are moving from SW4STM32 to STM32CubeIDE or if you are starting a new project with STM32CubeIDE.

2.1. How to get started with STM32CubeIDE from scratch[edit source]

How to get started with STM32CubeIDE from scratch.

2.2. How to move from SW4STM32 to STM32CubeIDE[edit source]

How to move from SW4STM32 to STM32CubeIDE.

3. Project structure[edit source]

When an MPU project is created, its structure is automatically made hierarchical. The project structure for single-core projects is flat. On the contrary, in a multi-core project, the hierarchical project structure is used. When the user creates or imports an MPU project, it consists of one root project together with sub-projects, referred to as MCU projects, for each core. A hierarchical structure example is shown below.

Hierarchical project structure

4. Debug Cortex-M on MPU[edit source]

Two modes are used to debug MCU (Cortex-M based) firmware detailed in the chapters below.

4.1. Engineering mode[edit source]

Engineering mode dedicated to preliminary Cortex-M debug, it implies a specific Boot Mode: the Engineering boot where Cortex-M only is started and its firmware is loaded via JTAG/SWD into dedicated RAM.

This mode is not the default one, it has to be set in the Debug Configuration, in Debugger tab, check "thru JTGA/SWD link (Engineering mode)". Please note that initialization normally done in Cortex-A like (clock tree set-up, ...) have to be handle by Cortex-M.

Debugging in Engineering Mode is very similar to a MCU Debug in term of functionality, expect that Cortex-M memory is not a flash.

4.2. Production mode[edit source]

Production mode targeting product, it means a MPU target is up and running, firmware to debug is network downloaded to Cortex-A Linux file system and loaded to Cortex-M before launching debug session. Target is booted from flash (for example from SD-Card), it is network and JTAG/SWD connected. Network connection is available via Ethernet port onto a managed network, or via dedicated USB OTG connection for point to point Ethernet exchange.

This production mode is the default one when you create a new Debug Configuration: "thru Linux core (Production Mode)" in Debugger tab. So if your target is Linux booted, JTAG/SWD and network connected the Serial Console is discovered and the target IP address is retrieve thanks to Target Status widget. This allows to fulfill Debug Configuration information.

More information on how to use STM32CubeIDE Target Status, here.

Error creating thumbnail: Unable to save thumbnail to destination
frameless

On Debug launch some specific pop-up will appear:

  • The SSH Password is to complete: the default one is root.
frameless
  • The RSA key is to be approved.
thumbs

4.3. ST-Link Server support[edit source]

5. FAQ[edit source]

How to copy/paste in the STM32CubeIDE console