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.

Getting the Tools

  1. Follow the How-To for for cross-compiling Hello World.
  2. 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.
  3. Download DIM including the sources.
  4. 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
  1. #make clean
  2. #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

  1. The cross compiled binary test_server is available in linux folder on the local linux box.
  2. Copy the binrary test_server to the White Rabbit switch using scp.
  3. Before running the test_server, some minor things need to be done.
    1. 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.
    2. 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.
  4. #test_server serverName starts the DIM server with name serverName on the White Rabbit switch
  5. 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
Topic revision: r7 - 19 Jun 2019, DietrichBeck
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback