monoZ docs
|
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.
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®
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 >'.
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.
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.
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.
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.
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.
Follow the steps below to import the monoZ Click generated files into STM32CubeIDE.
i. Open STM32CubeIDE and select/create the workspace to launch it.
ii. Go to "File" and select "open projects from file system".
iii. Select the file directory of the project file generated through monoZ Click and click 'Finish'.
iv. The project created from the monoZ Click shall now be loaded in the IDE workspace visible in "Project Explorer".
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.
Follow the steps below to build and flash the user application to monoZero Hardware through STM32CubeIDE.
Hardware setup:
i. Ensure that the Port switch S2 on the board is turn towards STM side.
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.
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
.
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.
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.
v. After successful flash, the firmware being processed by the hardware can be visualised in the CLI console.