STM32F767ZI Full Stack
  • Preface
  • Part 1 - Introduction
  • Chapter 1. Getting Started with STM32
    • 1.1 About STM32F767ZI
    • 1.2 STM32 Nucleo-144 Development Board with STM32F767ZI
    • 1.3 LVR Mini Drone
    • 1.4 Sensor Kits for STM32
    • 1.5 Parts For Drone
    • 1.6 STM32 Online Resource
  • Chapter 2. Programming for STM32
    • 2.1 STM32Cube MCU Packages
    • 2.2 Prepare Free IDEs for Developing STM32
    • 2.3 FIRST STM32 Project - Hello World
    • 2.4 QEMU Simulation - Blinky
    • 2.5 Test On STM32F767ZI - Blinky
  • Part 2 - Sensors
  • Chapter 3. Inertial Measurement Unit
    • 3.1 IMU MPU-6050
    • 3.2 Camera
  • Part 3 - Motors
  • Chapter 4. Motors
    • 4.1 Hollow Up DC Motor
  • Part 4 - Display
  • Chapter 5. Display
    • 5.1 Crystal Display 12864
  • Part 5 - Communication
  • Chapter 6. Communication
    • 6.1 Radio Frequency
    • 6.2 Wifi
    • 6.3 Bluetooth
    • 6.4 Integrate Wifi & Bluetooth
  • Part 6 - STM32 Based Mini Drone
  • Chapter 7. Assemble a Mini Drone
    • 7.1 4 Hollow Up DC-Motor Driven
  • Chapter 8. Remote Control
    • 8.1 RF Remote Control
    • 8.2 Bluetooth Remote Control
    • 8.3 Wifi Remote Control
    • 8.4 Automatic Control
Powered by GitBook
On this page
  • 2.2.1 GNU MCU Eclipse
  • Step 1: Install Eclipse
  • Step 2: Install GNU MCU Plug-ins for Eclipse
  • Step 3: Update Packs
  • Step 4: Window Preference
  • 2.2.2 SW4STM32 (System Workbench for STM32)
  1. Chapter 2. Programming for STM32

2.2 Prepare Free IDEs for Developing STM32

Previous2.1 STM32Cube MCU PackagesNext2.3 FIRST STM32 Project - Hello World

Last updated 7 years ago

strongly recommend two free IDEs for developming STM32:

And is adopted in our case.

2.2.1 GNU MCU Eclipse

Step 1: Install Eclipse

It's supposed that students have already installed . For the time being, the most recent Eclipse release is , and what we are using is .

Step 2: Install GNU MCU Plug-ins for Eclipse

According to :

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

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

According to our summation, four things must be installed:

A. Install Eclipse Plug-in

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

B. Install ARM Toolchain

/opt/GCCToolChains/gnu-mcu-eclipse/arm-none-eabi-gcc/7.2.1-1.1-20180401-0515/bin$ ls
arm-none-eabi-addr2line  arm-none-eabi-elfedit    arm-none-eabi-gcc-ranlib  arm-none-eabi-gprof    arm-none-eabi-ranlib
arm-none-eabi-ar         arm-none-eabi-g++        arm-none-eabi-gcov        arm-none-eabi-ld       arm-none-eabi-readelf
arm-none-eabi-as         arm-none-eabi-gcc        arm-none-eabi-gcov-dump   arm-none-eabi-ld.bfd   arm-none-eabi-size
arm-none-eabi-c++        arm-none-eabi-gcc-7.2.1  arm-none-eabi-gcov-tool   arm-none-eabi-nm       arm-none-eabi-strings
arm-none-eabi-c++filt    arm-none-eabi-gcc-ar     arm-none-eabi-gdb         arm-none-eabi-objcopy  arm-none-eabi-strip
arm-none-eabi-cpp        arm-none-eabi-gcc-nm     arm-none-eabi-gdb-py      arm-none-eabi-objdump

C. Install J-Link

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

/opt/SEGGER$ ls -ls
total 4
0 lrwxrwxrwx 1 root root   23 May 11 07:33 JLink -> /opt/SEGGER/JLink_V632c
4 drwxr-xr-x 8 root root 4096 May 15 13:04 JLink_V632c

D. Install ST-Link

$ git clone git@github.com:jiapei100/stlink.git
$ cd stlink
$ mkdir build
$ cd build
$ ccmake ../
$ make -j8
$ sudo make install

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

B. Packs: Open Perspective

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

C. Packs: Operation In Progress

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

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:

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

$ /usr/bin/printf '\xfe\xed\xfe\xed\x00\x00\x00\x02\x00\x00\x00\x00\xe2\x68\x6e\x45\xfb\x43\xdf\xa4\xd9\x92\xdd\x41\xce\xb6\xb2\x1c\x63\x30\xd7\x92' > /etc/ssl/certs/java/cacerts
$ /var/lib/dpkg/info/ca-certificates-java.postinst configure

Step 4: Window Preference

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

A. MCU Configuration

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

B. Workspace Preference

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

2.2.2 SW4STM32 (System Workbench for STM32)

Currently, if you install the plugin from within Eclipse by providing the plugin's update site URL , you will possibly meet the following error message:

It's clearly summarized in 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 , and download the corresponding file. 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 . In our case, DEB installer 64-bit is to be downloaded from . And to install it, we ONLY need to double-click this deb file under Ubuntu.

The reason why we need to install is that 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:

According to the description on , we need to input into URL in dialog MCU Packages - Repositories, as follows:

This is a bug from Java, and the solution can be found on . Be more specific, the solutions is:

To install the free IDE , is redirected to . Users must first register on , and then strictly follow .

Since we are going to use throughout our course, we are NOT going to elaborate how to carry out the development for STM32 using .

Eclipse Plug-in
ARM toolchain
J-Link
ST-Link
http://gnu-mcu-eclipse.netlify.com/v4-neon-updates
https://gnu-mcu-eclipse.github.io/toolchain/arm/install/
GNU MCU Eclipse ARM Embedded GCC
gnu-mcu-eclipse-arm-none-eabi-gcc-7.2.1-1.1-20180401-0515-centos64.tgz
SEGGER
https://www.segger.com/downloads/jlink/JLink_Linux_x86_64.deb
ST-Link
Nucleo-144 board with STM32F767ZI
https://gnu-mcu-eclipse.github.io/plugins/packs-manager/
http://www.keil.com/pack/index.pidx
https://github.com/mikaelhg/broken-docker-jdk9-cacerts
System Workbench for STM32
ST's official website
OpenSTM32
OpenSTM32
Installing System Workbench for STM32
2.2.1 GNU MCU Eclipse
System Workbench for STM32
Longer Vision Robot
GNU MCU Eclipse
System Workbench for STM32
GNU MCU Eclipse
Eclipse
Eclipse Oxygen 3A
Eclipse IDE for C/C++ Developers - Linux 64-bit
GNU MCU Eclipse
ARM
RISC-V
GitHub
GitHub
SourceForge
GNU MCU Eclipse
GNU MCU Eclipse: What's To Be Installed
GNU MCU Eclipse Plugin Content.xml Missing
GNU MCU Eclipse Marketplace
C/C++ - MCU Packages
C/C++ - MCU Packages Repositories
Open Perspective
Perspective - Packs: Operation In Progress
Perspective - Packs: STM32F7
Perspective - Packs: STM32F77xx_DFP Installed
MCU - Global ARM Toolchains Paths
MCU - Global OpenOCD Path
MCU - Global RISC-V Toolchains Paths
MCU - Global QEMU Path
MCU - Global SEGGER J-Link Path
Configuration in Workspace Preference