Compiling and installing RTEMS for the Raspberry Pi

Compiling and installing RTEMS for the Raspberry Pi

OK, The RTEMS compiler is ready to go on your Ubuntu machine, so it’s time to download and build RTEMS for the Raspberry Pi.

If you have not installed the compiler, then go back and follow that step


Step 1: Download and Prepare RTEMS:

Start by check out the RTEMS head build from the git repository

$ cd $HOME/development/rtems
$ git clone git://git.rtems.org/rtems.git rtems-git

Before RTEMS can be built, the autotools scripts must be generated ( Don’t forget the ./ in front of bootstrap )

$ cd rtems-git
$ ./bootstrap

Now, RTEMS is ready to build for the Pi. When you compile RTEMS, you choose the architecture, Board Support Package (BSP) and a few other options such as POSIX API, networking, etc. When you compile RTEMS in this next step, you are not really compiling something you run on the Pi just yet. You are compiling all of the operating system libraries, drivers, and installing them along with the headers. When you build your own RTEMS application, you will then use these headers and libraries.


Step 2: Configure RTEMS:

$ cd $HOME/development/rtems
$ mkdir build-rtems-rpi
$ cd build-rtems-rpi

To build RTEMS for the Raspberry Pi use the following command:

$ ../rtems-git/configure --target=arm-rtems4.11 \
--enable-rtemsbsp=raspberrypi \
--enable-tests=samples \
--enable-networking \
--enable-posix \
--prefix=$HOME/development/rtems/bsps/4.11

When this step is is complete you should see something like this:

target architecture: arm.
available BSPs: raspberrypi.
'make all' will build the following BSPs: raspberrypi.
other BSPs can be built with 'make RTEMS_BSP="bsp1 bsp2 ..."'

config.status: creating Makefile

Step 3: Now, build and install:

$ make install

When the make and make install is complete, the RTEMS libraries, headers, and some sample programs are in:

$HOME/development/rtems/bsps/4.11/arm-rtems4.11/raspberrypi

All of these directories may seem a little complicated, but it starts to make sense when you want to have different RTEMS versions, different architectures, and different BSPs all on the same development machine, without getting anything mixed up.

So now you have a cross compiler, and have RTEMS compiled and installed, so what about getting an RTEMS program to actually run on the Pi ?


文章转自:http://alanstechnotes.blogspot.com/2013/03/compiling-and-installing-rtems-for.html

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值