WR Switch: How-To Cross Compile DIM
THIS HOWTO IS DEPRECATED
This describes the first try to cross compile
DIM for a White Rabbit switch. DIM is a communication system for distributed / mixed environments, it provides a network transparent inter-process communication layer. The idea is, that a DIM server on a White Rabbit switch could be useful.
- Follow the How-To for for cross-compiling Hello World.
- At this point, it might also a good idea to make sure, that the cross compiled hello world really runs on a White Rabbit switch.
- Download DIM including the sources.
- In case one is not familiar with DIM, it might be a good idea
- to have a look at the DIM website.
- try compiling DIM on the linux box (it works in 99.99% of all cases, IF you follow the three-step-recipe on the DIM web-site).
- try using the DIM tools dns, test_server, test_client, DID, DIMTree.exe (Windows). If it does not work, in 99% of all cases people forgot to start the dns and/or set the environment variable
DIM_DNS_NODE
. Again: Reading the very few steps of the documentation helps.
Cross Compile DIM
This was my first try, so this might not be optimal.
To cross compile DIM for the White Rabbit switch just do
-
#make clean
-
#make CPP=no THREADS=no SHAREABLE=no CC=arm-unknown-linux-uclibcgnueabi-gcc CXX=arm-unknown-linux-uclibcgnueabi-gcc all
Run the DIM test_server on a White Rabbit Switch
- The cross compiled binary
test_server
is available in linux
folder on the local linux box.
- Copy the binrary
test_server
to the White Rabbit switch using scp
.
- Before running the test_server, some minor things need to be done.
- With switch software v3.1, hostname is not set. Something like
#hostname 192.168.20.4
might be used to set the hostname to a defined value. Here, I have choosen the IP number but every other unique name would suffice as well.
- Don't forget to set the environment variable
DIM_DNS_NODE
on the switch: #export DIM_DNS_NODE=192.168.16.10
is used, if 192.168.16.10 is IP of your local linux box, where you cross compiled DIM and where DNS is still running.
-
#test_server serverName
starts the DIM server with name serverName on the White Rabbit switch
- The DIM tools DID, DIMTree.exe (on windows), the test_client of the DIM examples, or your application can be used on any other machine in the network to subscribe to the DIM server on the White Rabbit switch.
Issues
- Modification of DIM makefiles for proper endian and byte alignment is not yet tested and done.
- Still using an old version 1604
--
DietrichBeck - 30 Jan 2013