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.
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
- 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
- install ARM toolchain
- source code: https://github.com/vedderb/summon-arm-toolchain/
- clone the code, cd into it, then run ./summon-arm-toolchain to install
- add the bin files to system PATH
- echo 'export PATH=/home/YOUR_USER/sat/bin:$PATH' > ~/.bashrc
- 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
- make
- open QSTLink2
- connect
- select bin file
- send to the board
No comments:
Post a Comment