Wednesday, October 9, 2013

STM32 Development Environment Setup on Ubuntu

Preface

During the class in "I/O and Drivers", I learned how to setup the environment on Windows including ARM GCC Tool Chain, GNUmake, and ST-Link Utility so that I can install our own code into the board, STM32.

Back to my home, I don't have any Windows machine. Then, I tried to build the same environment on Ubuntu or Mac OS X, which turned out that it’s much easier to setup the environment on Ubuntu. This report will cover the things I've done in order to install our own program on STM32 using Ubuntu.

Note: I'm using Ubuntu 12.04.

My Environment

  1. install the libraries or other dependencies we need
    • bash> sudo apt-get install build-essential git flex bison libgmp3-dev libmpfr-dev libncurses5-dev libmpc-dev autoconf texinfo libtool libftdi-dev libusb-1.0-0-dev && sudo apt-get build-dep gcc-4.5
  2. install ARM toolchain
  3. add the bin files to system PATH
    • echo 'export PATH=/home/YOUR_USER/sat/bin:$PATH' > ~/.bashrc
  4. install QSTLink2 (this program burns the bin files into the board)
    • install its dependencies: bash> sudo apt-get install qt4-qmake libqt4-dev libqt4-gui libqt4-xml qt4-designer qtcreator libusb-0.1-4 libusb-1.0-0-dev
    • download QSTLink2 source code: http://vedder.se/wp-content/uploads/2012/07/qstlink2.zip
    • unzip QSTLink2 source code
    • install QSTLink2: bash> qmake-qt4 && make && sudo make install && sudo reload udev

Run & Burn the Code

  1. make
  2. open QSTLink2
  3. connect
  4. select bin file
  5. send to the board

No comments:

Post a Comment