]> rtime.felk.cvut.cz Git - can-benchmark.git/blob - rtems/gw/README.gw
Add a simple user space gateway for measuring routing latencies
[can-benchmark.git] / rtems / gw / README.gw
1 Quick README regarding compilation of CAN GW for RTEMS
2
3
4 Preparing Toolchain
5 1) RTEMS compilation setup requires quite recent autoconf (2.68+) and automake (1.12+), so if your version is older, build those two first.
6 2) For compilation itself, you will need Binutils, GCC, Newlib. Their version is normally specified
7 by RTEMS git, for our GW setup it is by http://git.rtems.org/rtems-source-builder/tree/rtems/config/4.10/rtems-powerpc.bset.
8  -- At the time of making of this README it was binutils-2.20.1, gcc-4.4.7(core + g++) and newlib-1.18.0.
9 You can get those from RTEMS ftp, ftp://www.rtems.com/pub/rtems/SOURCES/4.10/. You will also need RTEMS patches from the same location.
10
11 Binutils and gcc need to be configured with --target=powerpc-rtems4.10, gcc needs to have newlib symlinked into its source directory
12 and specified --with-newlib --enable-threads.
13
14 For more specifics refer either to http://www.rtems.org/wiki/index.php/Building_Tools or http://aps.anl.gov/epics/base/RTEMS/Building-4.10.2.txt
15
16
17
18
19 Building RTEMS
20 Assuming you have downloaded sources from RTEMS git.
21 1) Run ./bootstrap from RTEMS directory.
22 2) Create build directory, run rtems.cfg from there. (Note: it assumes that you used --prefix/opt/rtems-4.10 while configuring build tools)
23 3) Build RTEMS with make RTEMS_BSP="icecube"
24 4) Install RTEMS, and add RTEMS_MAKEFILE_PATH=<PREFIX>/powerpc-rtems4.10/icecube to your bash profile.
25
26
27 Building GW
28 Note: You will need mkimage tool from uboot.
29 1) Run make default-config
30 2) Run make to compile the GW
31 3) Run ./mkimg to create bootable uboot image from the GW.
32
33 This will create build that has RTEMS shell enabled along with commands for starting and stopping the gateway, enabling eth driver and
34 starting and stopping CPU load generator. Because we had trouble communicating with the board over serial, there are also "bench builds",
35 which deactivate shell, autostart CAN gateway and possible autoactivate CPU load. Currently those can be build via uncommenting defines
36 inside app_def.h (I will change this to make targets in the future.)
37