monoZ docs
STM32CubeIDE

1. Overview

STM32CubeIDE, an opensource IDE tool which is part of the STM32Cube software ecosystem, is required by users to build user application with monoZ SDK libraries. This document provides an overview for using STM32CubeIDE from installation, importing monoZ Click generated project file and flashing firmware to monoZero board.

2. System Requirements

STM32CubeIDE is tested and verified on the Microsoft® Windows® 64-bit OS versions. The functionality has been tested to work for the following windows versions.

Microsoft® Windows®

  • Microsoft® Windows 7®
  • Microsoft® Windows 8®
  • Microsoft® Windows 10®
  • Microsoft® Windows 11®

3. Installation of STM32CubeIDE

This section describes how to install the STM32CubeIDE product on Microsoft® Windows®.
Note: The installation is done through a product installer. Make sure that the user account, from which the installer is launched, has administrative privileges.
Proceed as follows:

i. Launch the product installer (.exe file) st-STM32CubeIDE_VERSION_ARCHITECHURE.exe

ii. During the installation process, the operating system may display a dialog stating: “Do you want to allow this app to make changes to your device?” with info “Verified publisher: STMicroelectronics Software AB”. Accept 'YES' to proceed with installation.

iii. Wait for the installer Welcome dialog to be displayed and click on 'Next >'.

stm1

iv. Read the license agreement. Click on 'I Agree' to accept the terms of the agreement, or 'Cancel' to abort the installation. If the agreement is accepted, the installation wizard continues.

stm2

v. In this dialog, the user selects the location for the installation. It is recommended to choose a short path to avoid facing Windows® limitations with too long paths for the workspace.

stm3

vi. Wait for the "Choose Components" dialog to be displayed. Select the GDB Server components to be installed together with STM32CubeIDE. A server is needed for each type of JTAG probe used for debugging with STM32CubeIDE.

stm4

vii. Click on 'Install' to start the installation. The drivers that were selected are installed in parallel with this installation of STM32CubeIDE from here on.

stm5

viii. Click on 'Next' to continue to the final step of the installation process. That is a Confirmation dialog informing the user that the installation is finished. Once the user clicks on 'Finish', the installation process is complete.

stm6

4. Importing Project file

Follow the steps below to import the monoZ Click generated files into STM32CubeIDE.

i. Open STM32CubeIDE and select/create the workspace to launch it.

stm11

ii. Go to "File" and select "open projects from file system".

stm12

iii. Select the file directory of the project file generated through monoZ Click and click 'Finish'.

stm13


stm14

iv. The project created from the monoZ Click shall now be loaded in the IDE workspace visible in "Project Explorer".

stm15

The required SDK library header files and c files generated using monoZ Click can be navigated in Project Explorer tab to create user application. After creating the application, it can be flashed and debugged on any debug console. Basic configuration for debug console is given in Debug Console Configuration.

5. Build and Flash Project

Follow the steps below to build and flash the user application to monoZero Hardware through STM32CubeIDE.

  1. Hardware setup:
    i. Ensure that the Port switch S2 on the board is turn towards STM side.

    b1

    ii. Use any SWD debugger, such as ST-Link V2, and connect the GND, SWCLK & SWDIO of the debugger to the SWD port J2 on the board. Note that the pin layout may differ based on the ST-Link manufacturer.

    b2
  2. Connect to the debugger to windows system and power on the monoZero hardware. Setup and open CLI console in the windows system.
  3. STM32CubeIDE operations:
    i. Open project file in STM32CubeIDE
    ii. Go to Run -> Debug Configurations and confirm if installer is set to SWD mode in “Interface section” of “Debugger tab”. If it is in JTAG mode, then change it to SWD mode and Close.

    man1


    man2

    iii. After confirmation of hardware setup, right click on the project name and “Build Project”. Once executed, the project get build in the IDE environment and build result is shown in the Console menu of STM32CubeIDE. In case of any error or warnings, retry build or rework on the user application code.

    man3

    iv. Upon successful build, right click on project name and go to Run As -> STM32 Cortex -M C/C++ Application, to flash the firmware into the monoZero hardware. Once executed, the project gets flashed to hardware and successful flash result is shown in the Console menu as “Download Verified Successfully”. In case of any error, check ST-Link connection or proceed with appropriate steps based on the error description.

    man4


    man5

    v. After successful flash, the firmware being processed by the hardware can be visualised in the CLI console.

    deb1