Using SCons with GNU toolchain for ARM on Windows – part 1 : necessary tools

[part 1 part 2 part 3]

SCons is a software construction tool, a sort of alternative to the ubiquitous GNU make. What makes SCons very interesting in my opinion is that its configuration files are actually python scripts.
In this very brief – and probably imprecise – post I just want to jot down a way to use SCons with the GNU toolchain for ARM, under Windows 7.
What I’m going to do is produce the project infrastructure with the nice STM32CubeMX application from STMicroelectronics and compile it with SCons.
So, let’s start from the beginning.

1. Install GNU toolchain for ARM

Download and install GNU toolchain for ARM. Download it from launchpad.net; in my case I downloaded and installed “gcc-arm-none-eabi-4_9-2014q4-20141203-win32.exe“.
During installation, it’s better NOT to add the toolchain path to the environment, as this will be managed in a suitable batch file in order to keep the system environment clean.

2. Install OpenOCD

Download and install OpenOCD from sourceforge.net; in my case I downloaded and installed “openocd-0.8.0.7z“. Here, “installing” means extracting the content of the downloaded archive somewhere.

3. Install the cable drivers

Now I guess it’s a matter of which h/w is used. In my case I’m using an STM32F4Discovery board, which embeds an ST-LINK/V2 cable, and I’m working under Windows 7 64 bit, so I downloaded the STSW-LINK003 drivers from STMicroelectronics website.
After installation, the STM32F4Discovery board is recognized as a “STMicroelectronics STLink dongle” peripheral, under the “Universal Serial Bus devices” category in the device manager.

4. Install the Python language

I’m working under Windows 7, which does not include “native” support for python, so it must be installed. SCons requires version ❤ of python, so let’s download and install python 2.7.x from the official website.

5. Install SCons

Now we can download and install SCons. Download the archive from SCons website; in my case I downloaded the source version 2.3.4 and followed the instructions on the SCons manual (python setup.py install).

In the next posts the project will be generated and a SCons script will be produced.

Advertisements

2 thoughts on “Using SCons with GNU toolchain for ARM on Windows – part 1 : necessary tools

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s