2.2 Prepare Free IDEs for Developing STM32

Longer Vision Robotarrow-up-right strongly recommend two free IDEs for developming STM32:

And GNU MCU Eclipsearrow-up-right is adopted in our case.

2.2.1 GNU MCU Eclipse

Step 1: Install Eclipse

It's supposed that students have already installed Eclipsearrow-up-right. For the time being, the most recent Eclipse release is Eclipse Oxygen 3Aarrow-up-right, and what we are using is Eclipse IDE for C/C++ Developers - Linux 64-bitarrow-up-right.

Step 2: Install GNU MCU Plug-ins for Eclipse

According to GNU MCU Eclipsearrow-up-right:

GNU MCU Eclipse is an open source project that includes a family of Eclipse plug-ins and tools for multi-platform embedded ARMarrow-up-right and RISC-Varrow-up-right development, based on GNU toolchains. This project is hosted on GitHubarrow-up-right. The former project was hosted on GitHubarrow-up-right and SourceForgearrow-up-right.

The right-hand sidebar on GNU MCU Eclipsearrow-up-right clearly summarizes what's needed to be installed, as in the following image:

GNU MCU Eclipse: What's To Be Installed

According to our summation, four things must be installed:

A. Install Eclipse Plug-in

Currently, if you install the plugin from within Eclipse by providing the plugin's update site URL http://gnu-mcu-eclipse.netlify.com/v4-neon-updatesarrow-up-right, you will possibly meet the following error message:

GNU MCU Eclipse Plugin Content.xml Missing

Therefore, we have this Eclipse Plugin installed from within Eclipse MarketPlace as follows:

GNU MCU Eclipse Marketplace

B. Install ARM Toolchain

It's clearly summarized in https://gnu-mcu-eclipse.github.io/toolchain/arm/install/arrow-up-right that there are 2 ways to carry out the installation for GNU MCU Eclipse ARM Embedded GCC: The xPack install and Manual install.

The manual install is strongly recommended. You ONLY need to visit GNU MCU Eclipse ARM Embedded GCCarrow-up-right, and download the corresponding file. gnu-mcu-eclipse-arm-none-eabi-gcc-7.2.1-1.1-20180401-0515-centos64.tgzarrow-up-right is downloaded and extracted under /opt/GCCToolChains in our case. Let's have a look at what files are under the ARM toolchain folder:

The J-Link binaries are available at SEGGERarrow-up-right. In our case, DEB installer 64-bit is to be downloaded from https://www.segger.com/downloads/jlink/JLink_Linux_x86_64.debarrow-up-right. And to install it, we ONLY need to double-click this deb file under Ubuntu.

J-Link is defaultly installed under folder /opt/SEGGER.

The reason why we need to install ST-Linkarrow-up-right is that Nucleo-144 board with STM32F767ZI comes with a ST-Link on board. The processes on how to checkout and build the source code are clearly displayed by the following commands:

Four exe files are respectively installed as:

  • /usr/local/bin/st-flash

  • /usr/local/bin/st-info

  • /usr/local/bin/st-util

  • /usr/local/bin/stlink-gui

Step 3: Update Packs

A. Set MCU Packages and Package Repositories

C/C++ - MCU Packages

According to the description on https://gnu-mcu-eclipse.github.io/plugins/packs-manager/arrow-up-right, we need to input http://www.keil.com/pack/index.pidxarrow-up-right into URL in dialog MCU Packages - Repositories, as follows:

C/C++ - MCU Packages Repositories

B. Packs: Open Perspective

Click on Window->Perspective->Open Perspective->Other, you will see the following perspective:

Open Perspective

C. Packs: Operation In Progress

Then double click Packs, and click the refresh button to Update the packages definitions from all repositories.

Perspective - Packs: Operation In Progress

D. Packs: Install Required Packs

After around half an hour on my computer, and multiple times of clicking Retry and Ignore, I got the following views:

Perspective - Packs: STM32F7

It's NOT hard to find STMicroelectronics->STM32F7 Series and have STM32F7xx_DFP installed. The NEWEST version 2.10.0 will be installed by default.

Perspective - Packs: STM32F77xx_DFP Installed

Note: You might meet this ERROR while installing a pack. java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

This is a bug from Java, and the solution can be found on https://github.com/mikaelhg/broken-docker-jdk9-cacertsarrow-up-right. Be more specific, the solutions is:

Step 4: Window Preference

Finally, we configure Eclipse IDE for STM32 MCU development. Click on Window->Preferences.

A. MCU Configuration

Global ARM Toolchains Paths

MCU - Global ARM Toolchains Paths

Alternatively, you can configure OpenOCD toolchain instead.

MCU - Global OpenOCD Path

Alternatively, you can configure RISC-V toolchain instead.

MCU - Global RISC-V Toolchains Paths

Global QEMU Path

MCU - Global QEMU Path

Global SEGGER J-Link Path

MCU - Global SEGGER J-Link Path

B. Workspace Preference

Just enable save automatically before build and UTF-8 encoding within Workspace Preference.

Configuration in Workspace Preference

2.2.2 SW4STM32 (System Workbench for STM32)

To install the free IDE System Workbench for STM32arrow-up-right, ST's official websitearrow-up-right is redirected to OpenSTM32arrow-up-right. Users must first register on OpenSTM32arrow-up-right, and then strictly follow Installing System Workbench for STM32arrow-up-right.

Since we are going to use 2.2.1 GNU MCU Eclipsearrow-up-right throughout our course, we are NOT going to elaborate how to carry out the development for STM32 using System Workbench for STM32arrow-up-right.

Last updated