]> rtime.felk.cvut.cz Git - can-benchmark.git/blobdiff - rtems/gw/README.gw
Adds basic README for compiling the gw, fixed rtems.cfg.
[can-benchmark.git] / rtems / gw / README.gw
diff --git a/rtems/gw/README.gw b/rtems/gw/README.gw
new file mode 100644 (file)
index 0000000..ef03378
--- /dev/null
@@ -0,0 +1,37 @@
+Quick README regarding compilation of CAN GW for RTEMS
+
+
+Preparing Toolchain
+1) RTEMS compilation setup requires quite recent autoconf (2.68+) and automake (1.12+), so if your version is older, build those two first.
+2) For compilation itself, you will need Binutils, GCC, Newlib. Their version is normally specified
+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.
+ -- 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.
+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.
+
+Binutils and gcc need to be configured with --target=powerpc-rtems4.10, gcc needs to have newlib symlinked into its source directory
+and specified --with-newlib --enable-threads.
+
+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
+
+
+
+
+Building RTEMS
+Assuming you have downloaded sources from RTEMS git.
+1) Run ./bootstrap from RTEMS directory.
+2) Create build directory, run rtems.cfg from there. (Note: it assumes that you used --prefix/opt/rtems-4.10 while configuring build tools)
+3) Build RTEMS with make RTEMS_BSP="icecube"
+4) Install RTEMS, and add RTEMS_MAKEFILE_PATH=<PREFIX>/powerpc-rtems4.10/icecube to your bash profile.
+
+
+Building GW
+Note: You will need mkimage tool from uboot.
+1) Run make default-config
+2) Run make to compile the GW
+3) Run ./mkimg to create bootable uboot image from the GW.
+
+This will create build that has RTEMS shell enabled along with commands for starting and stopping the gateway, enabling eth driver and
+starting and stopping CPU load generator. Because we had trouble communicating with the board over serial, there are also "bench builds",
+which deactivate shell, autostart CAN gateway and possible autoactivate CPU load. Currently those can be build via uncommenting defines
+inside app_def.h (I will change this to make targets in the future.)
+