Getting started with STM32F4Discovery in Gnu/Linux

 

Building Toolchain

To compile code for STM32F4Discovery we need to setup ARM Toolchain in our system whichsupport ARM Cortex M3.I used summon ARM toolchain which is available in github

https://github.com/esden/summon-arm-toolchain.git

First install the dependencies in our system

sudo apt-get install flex bison libgmp3-dev libmpfr-dev libncurses5-dev 
libmpc-dev autoconf texinfo build-essential libftdi-dev

We should also do this too

sudo apt-get build-dep gcc-4.5

Make a directory somewhere to do the whole build process i made a folder named stm32build in home directory

mkdir  ~/stm32build
cd  ~/stm32build

clone the summon-arm- toolchain

git clone https://github.com/esden/summon-arm-toolchain.git
cd summon-arm-toolchain

read the README  befor begining the build

$./summon-arm-toolchain LIBSTM32_EN=1

While building the toolchain i got an error on gdb like this

 

to fix this error i edited the summon-arm-toolchain file

 

 

 

 

 

 

I changed the GDB names from the default code and restarted the build and it worked fine.After final installation the output was like this

 

 

 

 

 

 

 

 

 

When the installation is completed afolder named sat will be created in your system insidethat folder there will bea bin folder where all the binaries will be located

 

 

 

 

export all these binaries to your $PATH so that we can acess it everywhere.

export PATH=~/sat/bin:$PATH

Add this to the end of your .bashrc file

So the toolchain is ready now…. 🙂

Advertisements

2 thoughts on “Getting started with STM32F4Discovery in Gnu/Linux

  1. ls: cannot access /home/beginow/stm32build/summon-arm-toolchain/sources/gdb-7.3.1.tar.*: No such file or directory

    What is this error??

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