The STM32CubeIDE is a powerful, free-to-use integrated development environment (IDE) from STMicroelectronics for creating applications on their STM32 family of microcontrollers.
It is built on the Eclipse platform and includes all the necessary tools for embedded development, including a code generator (STM32CubeMX), a compiler, a debugger, and various utility software. Installing it is a multi-step process that requires downloading the software from the official ST website and following a straightforward installation wizard.
Prerequisites
Before you begin, ensure your system meets the following requirements:
- Operating System: 64-bit Windows 10/11, Linux (e.g., Ubuntu, Fedora), or macOS.
- RAM: 4 GB recommended (2 GB minimum).
- Disk Space: 6 GB of free space is a good starting point, but having more is recommended for downloading additional firmware and libraries.
- Network Access: An internet connection is required for the download and for logging in to your ST account.
Step 1: Create an STMicroelectronics account
To download the installer, you must have an STMicroelectronics account.
- Navigate to the official STMicroelectronics website and find the STM32CubeIDE download page.
- Click the "Get Software" or "Download" button.
- The site will prompt you to log in or register. If you don't have an account, click the "Register" button.
- Fill out the required information to create your account.
- Check your email for a validation link to complete the registration.
Step 2: Download the STM32CubeIDE installer
Once your account is set up, you can proceed with the download.
- Log in to your ST account on the STM32CubeIDE download page.
- Agree to the software license agreement.
- Select the appropriate installer for your operating system (Windows, Linux, or macOS).
- The download will begin automatically. The downloaded file will likely be a compressed
.zipfile. - For best results, copy the installer from your browser's download folder to a local hard drive folder before running it.
Step 3: Run the installer
The installation process varies slightly depending on your operating system.
For Windows
- Extract the archive: Locate the downloaded
.zipfile, right-click, and select "Extract All". - Run as administrator: Inside the extracted folder, find the
.exefile (e.g.,st-stm32cubeide_version.exe), right-click, and select "Run as administrator". - Follow the wizard:
- Click Next and accept the license agreement.
- Confirm or change the installation path. It's recommended to use the default path and ensure it doesn't contain special characters.
- Select the components to install. The wizard pre-selects the essential drivers and tools, including ST-LINK drivers.
- Click Install. The process may take several minutes.
- When prompted, allow the installation of drivers for ST-LINK and J-Link debug probes.
For macOS
- Mount the disk image: Double-click the downloaded
.dmgfile. - Allow installation: You may encounter security warnings because the application isn't from the Apple App Store.
- Go to System Settings > Security & Privacy.
- Click "Open Anyway" for the blocked
st-stlink-serverand STM32CubeIDE applications. - Enter your administrator credentials when prompted.
- Drag and drop: Drag the STM32CubeIDE application icon into your "Applications" folder.
- Remove quarantine attribute: You may need to run a terminal command to remove the quarantine flag for the IDE to open correctly:
- Open Terminal.
- Run:
sudo xattr -dr com.apple.quarantine /Applications/STM32CubeIDE.app/
For Linux
- Extract the archive: Extract the downloaded
.zipfile. - Make installer executable: Open a terminal, navigate to the extracted folder, and grant execute permissions to the installer script:
chmod +x st-stm32cubeide_VERSION_ARCHITECTURE.sh - Run the installer: Launch the script from the terminal, using
sudofor full permissions, which is necessary for setting up USB permissions:sudo sh ./st-stm32cubeide_VERSION_ARCHITECTURE.sh - Follow console instructions: The installation will proceed via the terminal, prompting you to accept licenses and choose an installation directory.
- Install dependencies: If you encounter errors, you may need to install specific dependencies. For example, on Ubuntu, a missing
libncurses5.somay require runningsudo apt-get install libncurses5.
Step 4: First-time setup and workspace configuration
After the installation is complete, launch STM32CubeIDE for the first time.
- Launch the IDE: Use the desktop shortcut (Windows) or find the application in your applications folder (macOS, Linux).
- Select a workspace: The IDE will ask you to choose a workspace directory where your projects will be stored. Choose a location with enough disk space and, for simplicity, a path without spaces or special characters. You can also set this as the default to avoid being prompted again.
- Welcome screen: The IDE will display a welcome screen with various options. You can close this to see the main IDE interface.
- Log in to MyST: To access all features, libraries, and updates, you must log in to your ST account from within the IDE.
- Go to Help > My ST.
- Enter your credentials to log in.
Step 5: Install firmware packages
To develop for a specific STM32 microcontroller, you need to install the corresponding firmware package.
- Create a new project: Go to File > New > STM32 Project.
- Select your MCU/Board: In the target selector, find your specific STM32 series or board.
- Install firmware: If the necessary firmware isn't already installed, the IDE will automatically prompt you to download it. This is required for the code generation and project setup.
Troubleshooting tips
- Download issues: If the download fails, check your network connection and ensure your security software (firewall, antivirus) isn't blocking the download.
- Installation errors: Ensure you are running the installer with administrative privileges. Check that the installation path is valid and does not contain unusual characters.
- USB connectivity problems: If your ST-LINK programmer isn't recognized, check the following:
- Ensure the ST-LINK drivers were successfully installed during setup.
- Use a high-quality USB data cable, not a charge-only cable.
- On Windows, check Device Manager for the ST-LINK device under "Universal Serial Bus devices" or "Ports (COM & LPT)".
- Proxy settings: If you are behind a corporate proxy, you may need to configure the connection parameters within the IDE to allow updates and access to online repositories. Go to Help > Updater Settings > Connection Parameters.