Develop STM32F4 Discovery(Cortex m4) with Eclipse on Mac OS _ PART 1

Lutong Zhang
3 min readOct 18, 2017

--

Fig. 1 Stm32f4 Discovery Board

The STM32F4 Discovery Board is a very popular choice for beginners to learn how to use the ARM Cortex M4 MCUs. This post mainly introduce the process of setting up the development environment and the toolchain for STM32F4 Discovery Board on Macbook. The Mac OS on my Macbook Air is Sierra 10.12.6. Ok, let’s rock and roll.

Before we begin, let’s create an empty directory named as ‘WorkSpace’. In ‘WorkSpace’, let’s create two directory named as ‘EclipseWorkSpace’ and ‘tools’.The structure of ‘WorkSpace’ should looks like this.

-- WorkSpace
|
| -- EclipseWorkSpace
| -- tools

1.Download Eclipse

Eclipse is an open source IDE which is powerful as well as friendly. It can be downloaded from this link below.

https://www.eclipse.org/downloads/eclipse-packages/

The most updated version of Eclipse at this moment is Oxygen, so on the main page, click and download the Eclipse Oxygen package (Eclipse IDE for C/C++ Developers) and install it on your mac.

2. Download Cross-Toolchain for ARM Cortex Processor

The next step is to download the GNU ARM Embedded Toolchain to your mac from this link https://launchpad.net/gcc-arm-embedded.(Attention: 201808update: net link at https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads). Please save the file to the newly created folder ‘tools’ and un-zip the downloaded file. In the sub directory named ‘bin’, there store all the cross toolchain programs.

Fig. 2 Download Toolchain

3. Install GNU ARM Eclipse Plugins

In order to make the Eclipse micro-controller-develop-friendly, the GNU ARM Eclipse Plugins need to be installed in Eclipse. These plugins are stored on github page https://github.com/gnu-mcu-eclipse/ . Click on “eclipse-plugins” shown in the Fig. 3.

Fig. 3 Eclipse Plugins

and then click on the releases

Fig. 4 Releases for Eclipse Plugins

Click on the “GNU MCU Eclipse plug-ins” (the current version at this moment is v4.1.1–201707111115) and click again on Continue reading » will bring you to a blog. On the page of this informative blog, there’s one import link as shown in the figure below(http://gnu-mcu-eclipse.netlify.com/v4-neon-updates/). This is the link where we can extract our plugins in Eclipse.

Fig. 5 The blog of GNU MCU Eclipse plugins

Now open the Eclipse. On the startup, Eclipse will ask you to specify a workspace directory. Please put in the path of ‘EclipseWorkSpace’ created in the previous steps. After the Eclipse window shows, go to ‘help => Install New Software…’ as shown in the figure below.

Fig. 6 Install New Software in Eclipse

In the new window, click “Add…”

Fig. 7Install New Software in Eclipse

Write “GNU MCU Eclipse Plugins” in the “Name:” field and add “http://gnu-mcu-eclipse.netlify.com/v4-neon-updates/” this link to the “Location:” field. Then click “OK”. After this, click on “select all” and “next” all the way to the “finish”.

After the installation finished, the Eclipse is ready to develop software for STM32F4 Discovery Board.

The other posts of this series can be found at:

Develop STM32F4 Discovery(Cortex m4) with Eclipse on Mac OS _ PART #2

--

--