rtems stm32f4

RTEMS – stm32F407 Discovery Board


  • Environment :
Host O.S. : Windows 7 64bits With stlink v2 Driver + VMWare Workstation 10.0.0 build 1.295980.
Guest O.S. : Ubuntu 13.10 Desktop 64bits.
  • PreInstall :
sudo apt-get update;sudo apt-get upgrade -y
sudo apt-get install -y autoconf automake autotools-dev build-essential git \
dpkg-dev g++ g++-4.6 libalgorithm-diff-perl libalgorithm-diff-xs-perl \
libalgorithm-merge-perl libdpkg-perl libgmp-dev libgmp3-dev libgmpxx4ldbl \
libltdl-dev libmpc-dev libmpfr-dev libstdc++6-4.6-dev libtimedate-perl \
libtool texinfo flex bison gawk expat libexpat-dev libncurses5-dev \
libusb-1.0.0-dev libsgutils2-dev
mkdir for source & build
br prefix : for arm-rtems4.11 BSP
bre prefix : for arm-rtemseabi4.11 BSP
$ mkdir ~/rtems
$ mkdir ~/rtems/source
$ mkdir ~/rtems/build
$ mkdir ~/rtems/build/b-autoconf
$ mkdir ~/rtems/build/b-automake
$ mkdir ~/rtems/build/br-binutil
$ mkdir ~/rtems/build/bre-binutil
$ mkdir ~/rtems/build/br-gcc
$ mkdir ~/rtems/build/bre-gcc
$ mkdir ~/rtems/build/br-gdb
$ mkdir ~/rtems/build/bre-gdb
$ sudo mkdir /opt/rtems-4.11
$ sudo chown -R $USER /opt/rtems-4.11
$ export PATH=/opt/rtems-4.11/bin:$PATH
  •  Install autoconf & automake :
Download Source From :  http://www.rtems.org/ftp/pub/rtems/SOURCES/4.11/
$ mkdir b-autoconf
 $ cd b-autoconf/
 $ ../autoconf-2.69/configure --prefix=/usr
 $ make
 $ sudo make install
 $ cd ..
 $ rm -fr b-autoconf/
 $ mkdir b-automake
 $ cd b-automake/
 $ ../automake-1.12.2/configure --prefix=/usr
 $ make
 $ sudo make install
 $ cd ..
 $ rm -fr b-automake/
  • Build – Crosstool :
For BSP arm-rtems4.11
~/rtems/source/rtems$ export TARGET="arm-rtems4.11"
For BSP arm-rtemseabi4.11
~/rtems/source/rtems$ export TARGET="arm-rtemseabi4.11"
Get Tool Version For Build :  http://git.rtems.org/rtems-source-builder/tree/rtems/config/4.11
Download Source From :  http://www.rtems.org/ftp/pub/rtems/SOURCES/4.11/
Ref link :  http://www.rtems.org/wiki/index.php/Building_Tools

  • Build – O.S.  & test sample :
Download Source From :  http://www.rtems.org/ftp/pub/rtems/SOURCES/4.11/
Ref link :  http://www.rtems.org/wiki/index.php/GSoC_Getting_Started#Configure_and_Build_RTEMS_for_SPARC.2FSIS
~/rtems/source$ git clone git://git.rtems.org/rtems.git rtems
configure & build :
~/rtems/source/rtems$ ./bootstrap
~/rtems/source/rtems$ cd ~/rtems/build/br-stm32
~/rtems/build/br-stm32$ ../../source/rtems/configure --target=${TARGET} --enable-rtemsbsp=stm32f4 --enable-tests=samples --prefix=/opt/rtems-4.11
~/rtems/build/br-stm32$make
~/rtems/build/br-stm32$make install

  • Build – st-util :
~/rtems/source$ git clone git://github.com/texane/stlink.git stlink
~/rtems/source$ cd stlink
~/rtems/source/stlink$ sudo cp 49-stlinkv*.rules /etc/udev/rules.d/.
~/rtems/source/stlink$ sudo udevadm control --reload-rules
~/rtems/source/stlink$ ./autogen.sh
~/rtems/build/b-stlink$ ./configure --prefix=/opt/rtems-4.11
~/rtems/build/b-stlink$ make
~/rtems/build/b-stlink$ make install

  • Flush sample file (ex : hello[ps]) to stm32F407 Discovery Board :
...$ arm-rtemseabi4.11-objcopy -O binary hello.exe hello.bin
...$ st-flash write hello.bin 0x08000000
Screen Capture :

[ps]
Open407V-D With Extension Board Uart 3 pin def :
Tx : PC10
Rx : PC11
RTEMS Hello.exe :
Using UART 3, Pin Define :
Tx : PD8
Rx : PD9

RTEMS Source Builder For Debian / Ubuntu :
https://ftp.rtems.org/pub/rtems/people/chrisj/source-builder/source-builder.html#_ubuntu

你可能感兴趣的:(rtems stm32f4)