2.2 Prepare Free IDEs for Developing STM32
Last updated
Last updated
Longer Vision Robot strongly recommend two free IDEs for developming STM32:
And GNU MCU Eclipse is adopted in our case.
It's supposed that students have already installed Eclipse. For the time being, the most recent Eclipse release is Eclipse Oxygen 3A, and what we are using is Eclipse IDE for C/C++ Developers - Linux 64-bit.
According to GNU MCU Eclipse:
GNU MCU Eclipse is an open source project that includes a family of Eclipse plug-ins and tools for multi-platform embedded ARM and RISC-V development, based on GNU toolchains. This project is hosted on GitHub. The former project was hosted on GitHub and SourceForge.
The right-hand sidebar on GNU MCU Eclipse clearly summarizes what's needed to be installed, as in the following image:
According to our summation, four things must be installed:
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-updates, you will possibly meet the following error message:
Therefore, we have this Eclipse Plugin installed from within Eclipse MarketPlace as follows:
It's clearly summarized in https://gnu-mcu-eclipse.github.io/toolchain/arm/install/ 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 GCC, and download the corresponding file. gnu-mcu-eclipse-arm-none-eabi-gcc-7.2.1-1.1-20180401-0515-centos64.tgz 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 SEGGER. In our case, DEB installer 64-bit is to be downloaded from https://www.segger.com/downloads/jlink/JLink_Linux_x86_64.deb. 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-Link 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
According to the description on https://gnu-mcu-eclipse.github.io/plugins/packs-manager/, we need to input http://www.keil.com/pack/index.pidx into URL in dialog MCU Packages - Repositories, as follows:
Click on Window->Perspective->Open Perspective->Other, you will see the following perspective:
Then double click Packs, and click the refresh button to Update the packages definitions from all repositories.
After around half an hour on my computer, and multiple times of clicking Retry and Ignore, I got the following views:
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.
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-cacerts. Be more specific, the solutions is:
Finally, we configure Eclipse IDE for STM32 MCU development. Click on Window->Preferences.
Global ARM Toolchains Paths
Alternatively, you can configure OpenOCD toolchain instead.
Alternatively, you can configure RISC-V toolchain instead.
Global QEMU Path
Global SEGGER J-Link Path
Just enable save automatically before build and UTF-8 encoding within Workspace Preference.
To install the free IDE System Workbench for STM32, ST's official website is redirected to OpenSTM32. Users must first register on OpenSTM32, and then strictly follow Installing System Workbench for STM32.
Since we are going to use 2.2.1 GNU MCU Eclipse throughout our course, we are NOT going to elaborate how to carry out the development for STM32 using System Workbench for STM32.